Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7696)

Unified Diff: chrome/browser/search_engines/template_url_service_test_util.h

Issue 2639153002: Make extensions DSE persistent in browser prefs (Reland) (Closed)
Patch Set: Rebased and updated after review, use new keyword conflicts resolution Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..6dc86c99d0b57935a196d1c101bae68019bdd303 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,18 @@ 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 the model and overrides default
+ // search pref in an extension controlled preferences, if extension wants to
+ // be default.
+ 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,
+ // 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(); }

Powered by Google App Engine
This is Rietveld 408576698