Split keyword related parts of WebDataService as KeywordWebDataService

The new class KeywordWebDataService will be moved to components/search_engines with KeywordTable later.

Move keyword related parts from web_data_service.{cc,h} to keyword_web_data_service.{cc,h}.
Add a new ProfileErrorType enum.

BUG=381572
TEST=build
[email protected] for the enum addition in histograms.xml corresponding to the one in chrome/browser/ui/profile_error_dialog.h

Review URL: https://codereview.chromium.org/355573008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280969 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/search_engines/util.h b/chrome/browser/search_engines/util.h
index 651f105..2d4c395 100644
--- a/chrome/browser/search_engines/util.h
+++ b/chrome/browser/search_engines/util.h
@@ -14,10 +14,10 @@
 #include "base/strings/string16.h"
 #include "chrome/browser/search_engines/template_url_service.h"
 
+class KeywordWebDataService;
 class PrefService;
 class TemplateURL;
 class WDTypedResult;
-class WebDataService;
 
 // Returns the short name of the default search engine, or the empty string if
 // none is set.
@@ -77,21 +77,21 @@
     const TemplateURLService::TemplateURLVector& existing_urls,
     const TemplateURL* default_search_provider);
 
-// Processes the results of WebDataService::GetKeywords, combining it with
-// prepopulated search providers to result in:
+// Processes the results of KeywordWebDataService::GetKeywords, combining it
+// with prepopulated search providers to result in:
 //  * a set of template_urls (search providers). The caller owns the
 //    TemplateURL* returned in template_urls.
 //  * whether there is a new resource keyword version (and the value).
 //    |*new_resource_keyword_version| is set to 0 if no new value. Otherwise,
 //    it is the new value.
-// Only pass in a non-NULL value for service if the WebDataService should be
-// updated. If |removed_keyword_guids| is not NULL, any TemplateURLs removed
-// from the keyword table in the WebDataService will have their Sync GUIDs
-// added to it. |default_search_provider| will be used to prevent removing the
-// current user-selected DSE, regardless of changes in prepopulate data.
+// Only pass in a non-NULL value for service if the KeywordWebDataService should
+// be updated. If |removed_keyword_guids| is not NULL, any TemplateURLs removed
+// from the keyword table in the KeywordWebDataService will have their Sync
+// GUIDs added to it. |default_search_provider| will be used to prevent removing
+// the current user-selected DSE, regardless of changes in prepopulate data.
 void GetSearchProvidersUsingKeywordResult(
     const WDTypedResult& result,
-    WebDataService* service,
+    KeywordWebDataService* service,
     PrefService* prefs,
     TemplateURLService::TemplateURLVector* template_urls,
     TemplateURL* default_search_provider,
@@ -107,7 +107,7 @@
 // that has been merged into the current keyword data.  On exit, this will be
 // set as in GetSearchProvidersUsingKeywordResult().
 void GetSearchProvidersUsingLoadedEngines(
-    WebDataService* service,
+    KeywordWebDataService* service,
     PrefService* prefs,
     TemplateURLService::TemplateURLVector* template_urls,
     TemplateURL* default_search_provider,
@@ -126,7 +126,7 @@
 // helper used by GetSearchProvidersUsingKeywordResult(), but is declared here
 // so it's accessible by unittests.
 void RemoveDuplicatePrepopulateIDs(
-    WebDataService* service,
+    KeywordWebDataService* service,
     const ScopedVector<TemplateURLData>& prepopulated_urls,
     TemplateURL* default_search_provider,
     TemplateURLService::TemplateURLVector* template_urls,