Chromium Code Reviews| Index: chrome/browser/extensions/extension_prefs.cc |
| diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc |
| index 0f1d7439e067f7f646fecc3591523c1644dd483d..6576fef9accf1690065a09795e653fbf171b6338 100644 |
| --- a/chrome/browser/extensions/extension_prefs.cc |
| +++ b/chrome/browser/extensions/extension_prefs.cc |
| @@ -1143,22 +1143,26 @@ void ExtensionPrefs::GetSavedFileEntries( |
| } |
| } |
| -ExtensionOmniboxSuggestion |
| +scoped_ptr<api::omnibox::SuggestResult> |
| ExtensionPrefs::GetOmniboxDefaultSuggestion(const std::string& extension_id) { |
| - ExtensionOmniboxSuggestion suggestion; |
| + scoped_ptr<api::omnibox::SuggestResult> suggestion; |
| const DictionaryValue* extension = GetExtensionPref(extension_id); |
| const DictionaryValue* dict = NULL; |
| - if (extension && extension->GetDictionary(kOmniboxDefaultSuggestion, &dict)) |
| - suggestion.Populate(*dict, false); |
| + if (extension && extension->GetDictionary(kOmniboxDefaultSuggestion, &dict)) { |
| + suggestion.reset(new api::omnibox::SuggestResult); |
| + api::omnibox::SuggestResult::Populate(*dict, suggestion.get()); |
| + } |
| - return suggestion; |
| + return suggestion.Pass(); |
| } |
| void ExtensionPrefs::SetOmniboxDefaultSuggestion( |
| const std::string& extension_id, |
| - const ExtensionOmniboxSuggestion& suggestion) { |
| - scoped_ptr<base::DictionaryValue> dict = suggestion.ToValue().Pass(); |
| + const api::omnibox::SuggestResult& suggestion) { |
| + scoped_ptr<base::DictionaryValue> dict = suggestion.ToValue(); |
| + // A default suggestion should not have the content field set. |
| + dict->SetString("content", ""); |
|
not at google - send to devlin
2013/03/22 23:30:32
dict->Remove("content")?
Aaron Jacobs
2013/03/22 23:56:40
Done.
|
| UpdateExtensionPref(extension_id, kOmniboxDefaultSuggestion, dict.release()); |
| } |