Index: chrome/browser/extensions/api/omnibox/omnibox_api.cc |
diff --git a/chrome/browser/extensions/api/omnibox/omnibox_api.cc b/chrome/browser/extensions/api/omnibox/omnibox_api.cc |
index cff0c8420d85ab44daba9fb8ba96065bed3c991b..0a09d60bd4551cf6de4bc5acba1a12f41b8bf61b 100644 |
--- a/chrome/browser/extensions/api/omnibox/omnibox_api.cc |
+++ b/chrome/browser/extensions/api/omnibox/omnibox_api.cc |
@@ -86,17 +86,19 @@ scoped_ptr<omnibox::SuggestResult> GetOmniboxDefaultSuggestion( |
// Tries to set the omnibox default suggestion; returns true on success or |
// false on failure. |
-bool SetOmniboxDefaultSuggestion(Profile* profile, |
- const std::string& extension_id, |
- const omnibox::SuggestResult& suggestion) { |
+bool SetOmniboxDefaultSuggestion( |
+ Profile* profile, |
+ const std::string& extension_id, |
+ const omnibox::DefaultSuggestResult& suggestion) { |
ExtensionPrefs* prefs = |
ExtensionSystem::Get(profile)->extension_service()->extension_prefs(); |
if (!prefs) |
return false; |
scoped_ptr<base::DictionaryValue> dict = suggestion.ToValue(); |
- // A default suggestion should not have the content field set. |
- dict->Remove(kSuggestionContent, NULL); |
+ // Add the content field so that the dictionary can be used to populate an |
+ // omnibox::SuggestResult. |
+ dict->SetWithoutPathExpansion(kSuggestionContent, new base::StringValue("")); |
prefs->UpdateExtensionPref(extension_id, |
kOmniboxDefaultSuggestion, |
dict.release()); |