autocomplete: Add AutocompleteMatch::MergeClassifications()

This just moves a classifications-merging loop from
ShortcutsProvider::ClassifyAllMatchesInString() into a
utility method.

BUG=141877
TEST=none


Review URL: https://chromiumcodereview.appspot.com/10911188

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155919 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/autocomplete/autocomplete_match.h b/chrome/browser/autocomplete/autocomplete_match.h
index 3296ac4..ca324581 100644
--- a/chrome/browser/autocomplete/autocomplete_match.h
+++ b/chrome/browser/autocomplete/autocomplete_match.h
@@ -144,6 +144,12 @@
                                        int style,
                                        ACMatchClassifications* classifications);
 
+  // Returns a new vector of classifications containing the merged contents of
+  // |classifications1| and |classifications2|.
+  static ACMatchClassifications MergeClassifications(
+      const ACMatchClassifications& classifications1,
+      const ACMatchClassifications& classifications2);
+
   // Converts classifications to and from a serialized string representation
   // (using comma-separated integers to sequentially list positions and styles).
   static std::string ClassificationsToString(