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

Unified Diff: components/search_engines/template_url.h

Issue 2814743006: Refactoring after comments in https://codereview.chromium.org/2639153002 (Closed)
Patch Set: Fixed after review, round 2 Created 3 years, 8 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: components/search_engines/template_url.h
diff --git a/components/search_engines/template_url.h b/components/search_engines/template_url.h
index 92fb852c1a5238b50f94686186b15ab758b33771..1aaa26451b93c36a5434759fc116cf45c31e9406 100644
--- a/components/search_engines/template_url.h
+++ b/components/search_engines/template_url.h
@@ -482,20 +482,31 @@ class TemplateURL {
// An AssociatedExtensionInfo represents information about the extension that
// added the search engine.
struct AssociatedExtensionInfo {
- explicit AssociatedExtensionInfo(const std::string& extension_id);
+ AssociatedExtensionInfo(const std::string& extension_id,
+ base::Time install_time,
+ bool wants_to_be_default_engine);
~AssociatedExtensionInfo();
std::string extension_id;
- // Whether the search engine is supposed to be default.
- bool wants_to_be_default_engine;
-
// Used to resolve conflicts when there are multiple extensions specifying
// the default search engine. The most recently-installed wins.
base::Time install_time;
+
+ // Whether the search engine is supposed to be default.
+ bool wants_to_be_default_engine;
};
explicit TemplateURL(const TemplateURLData& data, Type type = NORMAL);
+
+ // Constructor for extension controlled engine. |type| must be
+ // NORMAL_CONTROLLED_BY_EXTENSION or OMNIBOX_API_EXTENSION.
+ TemplateURL(const TemplateURLData& data,
+ Type type,
+ std::string extension_id,
+ base::Time install_time,
+ bool wants_to_be_default_engine);
+
~TemplateURL();
// Generates a suitable keyword for the specified url, which must be valid.
« no previous file with comments | « chrome/browser/search_engines/template_url_service_unittest.cc ('k') | components/search_engines/template_url.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698