 Chromium Code Reviews
 Chromium Code Reviews Issue 2479113002:
  Make extensions DSE persistent in browser prefs  (Closed)
    
  
    Issue 2479113002:
  Make extensions DSE persistent in browser prefs  (Closed) 
  | Index: chrome/browser/search_engines/template_url_service_test_util.h | 
| diff --git a/chrome/browser/search_engines/template_url_service_test_util.h b/chrome/browser/search_engines/template_url_service_test_util.h | 
| index 566fb9215b536f1128a7ca0eb5b14ec9713568fa..3f311a1343baba6ca4fd1e3a3d3e1e58060d2e18 100644 | 
| --- a/chrome/browser/search_engines/template_url_service_test_util.h | 
| +++ b/chrome/browser/search_engines/template_url_service_test_util.h | 
| @@ -12,6 +12,7 @@ | 
| #include "base/macros.h" | 
| #include "base/memory/ref_counted.h" | 
| #include "base/strings/string16.h" | 
| +#include "components/search_engines/template_url.h" | 
| #include "components/search_engines/template_url_data.h" | 
| #include "components/search_engines/template_url_service_observer.h" | 
| @@ -65,6 +66,16 @@ class TemplateURLServiceTestUtil : public TemplateURLServiceObserver { | 
| // Sets the google base url. |base_url| must be valid. | 
| void SetGoogleBaseURL(const GURL& base_url); | 
| + // Adds extension controlled TemplateURL to model and overrides default search | 
| + // pref in extension controlled preferences if extension wants to be default. | 
| 
Peter Kasting
2017/01/06 01:44:57
Nit: This comment is missing articles ("an", "the"
 
Alexander Yashkin
2017/01/07 12:55:59
Tried to fix, hope I get it right.
 | 
| + TemplateURL* AddExtensionControlledTURL( | 
| + std::unique_ptr<TemplateURL> extension_turl, | 
| + std::unique_ptr<TemplateURL::AssociatedExtensionInfo> info); | 
| + // Removes a TemplateURL controlled by |extension_id| from the model, and, | 
| 
Peter Kasting
2017/01/06 01:44:57
Nit: Blank line above this
 
Alexander Yashkin
2017/01/07 12:55:59
Done.
 | 
| + // if necessary, from the extension-controlled default search preference. | 
| + // This TemplateURL must exist. | 
| + void RemoveExtensionControlledTURL(const std::string& extension_id); | 
| + | 
| KeywordWebDataService* web_data_service() { return web_data_service_.get(); } | 
| TemplateURLService* model() { return model_.get(); } | 
| TestingProfile* profile() { return profile_.get(); } |