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

Unified Diff: chrome/browser/extensions/api/omnibox/omnibox_api.h

Issue 10306015: Persist the extension omnibox default suggestion to Prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: empty.list Created 8 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/omnibox/omnibox_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/omnibox/omnibox_api.h
diff --git a/chrome/browser/extensions/api/omnibox/omnibox_api.h b/chrome/browser/extensions/api/omnibox/omnibox_api.h
index 8377e4958f02ce5fa696d3defa9bf59576ca132d..80f9845d7c16191d8377746ff6e9e7cc6455894d 100644
--- a/chrome/browser/extensions/api/omnibox/omnibox_api.h
+++ b/chrome/browser/extensions/api/omnibox/omnibox_api.h
@@ -9,6 +9,7 @@
#include <string>
#include <vector>
+#include "base/memory/scoped_ptr.h"
#include "base/string16.h"
#include "chrome/browser/autocomplete/autocomplete_match.h"
#include "chrome/browser/extensions/extension_function.h"
@@ -76,10 +77,18 @@ struct ExtensionOmniboxSuggestion {
ExtensionOmniboxSuggestion();
~ExtensionOmniboxSuggestion();
+ // Populate a suggestion value from a DictionaryValue. If |require_content|
+ // is false, then we won't fail if |content| is missing, to support
+ // default suggestions.
+ bool Populate(const base::DictionaryValue& value, bool require_content);
+
// Converts a list of style ranges from the extension into the format expected
// by the autocomplete system.
bool ReadStylesFromValue(const base::ListValue& value);
+ // Converts this structure to a DictionaryValue suitable for saving to disk.
+ scoped_ptr<base::DictionaryValue> ToValue() const;
+
// The text that gets put in the edit box.
string16 content;
« no previous file with comments | « no previous file | chrome/browser/extensions/api/omnibox/omnibox_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698