| Index: chrome/browser/extensions/extension_web_ui.cc
|
| diff --git a/chrome/browser/extensions/extension_web_ui.cc b/chrome/browser/extensions/extension_web_ui.cc
|
| index fc851b9681cfc5078a46cbb654f74e54bc5409fc..b62af29dadd38d805ca2d2a3fb361e3b65ee21b7 100644
|
| --- a/chrome/browser/extensions/extension_web_ui.cc
|
| +++ b/chrome/browser/extensions/extension_web_ui.cc
|
| @@ -45,7 +45,7 @@ using extensions::URLOverrides;
|
| namespace {
|
|
|
| // De-dupes the items in |list|. Assumes the values are strings.
|
| -void CleanUpDuplicates(ListValue* list) {
|
| +void CleanUpDuplicates(base::ListValue* list) {
|
| std::set<std::string> seen_values;
|
|
|
| // Loop backwards as we may be removing items.
|
| @@ -178,10 +178,10 @@ bool ExtensionWebUI::HandleChromeURLOverride(
|
| return false;
|
|
|
| Profile* profile = Profile::FromBrowserContext(browser_context);
|
| - const DictionaryValue* overrides =
|
| + const base::DictionaryValue* overrides =
|
| profile->GetPrefs()->GetDictionary(kExtensionURLOverrides);
|
| std::string page = url->host();
|
| - const ListValue* url_list = NULL;
|
| + const base::ListValue* url_list = NULL;
|
| if (!overrides || !overrides->GetList(page, &url_list))
|
| return false;
|
|
|
| @@ -244,7 +244,7 @@ bool ExtensionWebUI::HandleChromeURLOverride(
|
| bool ExtensionWebUI::HandleChromeURLOverrideReverse(
|
| GURL* url, content::BrowserContext* browser_context) {
|
| Profile* profile = Profile::FromBrowserContext(browser_context);
|
| - const DictionaryValue* overrides =
|
| + const base::DictionaryValue* overrides =
|
| profile->GetPrefs()->GetDictionary(kExtensionURLOverrides);
|
| if (!overrides)
|
| return false;
|
| @@ -253,12 +253,13 @@ bool ExtensionWebUI::HandleChromeURLOverrideReverse(
|
| // internal URL
|
| // chrome-extension://eemcgdkfndhakfknompkggombfjjjeno/main.html#1 to
|
| // chrome://bookmarks/#1 for display in the omnibox.
|
| - for (DictionaryValue::Iterator it(*overrides); !it.IsAtEnd(); it.Advance()) {
|
| - const ListValue* url_list = NULL;
|
| + for (base::DictionaryValue::Iterator it(*overrides); !it.IsAtEnd();
|
| + it.Advance()) {
|
| + const base::ListValue* url_list = NULL;
|
| if (!it.value().GetAsList(&url_list))
|
| continue;
|
|
|
| - for (ListValue::const_iterator it2 = url_list->begin();
|
| + for (base::ListValue::const_iterator it2 = url_list->begin();
|
| it2 != url_list->end(); ++it2) {
|
| std::string override;
|
| if (!(*it2)->GetAsString(&override))
|
| @@ -283,22 +284,22 @@ void ExtensionWebUI::RegisterChromeURLOverrides(
|
|
|
| PrefService* prefs = profile->GetPrefs();
|
| DictionaryPrefUpdate update(prefs, kExtensionURLOverrides);
|
| - DictionaryValue* all_overrides = update.Get();
|
| + base::DictionaryValue* all_overrides = update.Get();
|
|
|
| // For each override provided by the extension, add it to the front of
|
| // the override list if it's not already in the list.
|
| URLOverrides::URLOverrideMap::const_iterator iter = overrides.begin();
|
| for (; iter != overrides.end(); ++iter) {
|
| const std::string& key = iter->first;
|
| - ListValue* page_overrides = NULL;
|
| + base::ListValue* page_overrides = NULL;
|
| if (!all_overrides->GetList(key, &page_overrides)) {
|
| - page_overrides = new ListValue();
|
| + page_overrides = new base::ListValue();
|
| all_overrides->Set(key, page_overrides);
|
| } else {
|
| CleanUpDuplicates(page_overrides);
|
|
|
| // Verify that the override isn't already in the list.
|
| - ListValue::iterator i = page_overrides->begin();
|
| + base::ListValue::iterator i = page_overrides->begin();
|
| for (; i != page_overrides->end(); ++i) {
|
| std::string override_val;
|
| if (!(*i)->GetAsString(&override_val)) {
|
| @@ -321,7 +322,7 @@ void ExtensionWebUI::RegisterChromeURLOverrides(
|
| // static
|
| void ExtensionWebUI::UnregisterAndReplaceOverride(const std::string& page,
|
| Profile* profile,
|
| - ListValue* list,
|
| + base::ListValue* list,
|
| const Value* override) {
|
| size_t index = 0;
|
| bool found = list->Remove(*override, &index);
|
| @@ -342,8 +343,8 @@ void ExtensionWebUI::UnregisterChromeURLOverride(const std::string& page,
|
| return;
|
| PrefService* prefs = profile->GetPrefs();
|
| DictionaryPrefUpdate update(prefs, kExtensionURLOverrides);
|
| - DictionaryValue* all_overrides = update.Get();
|
| - ListValue* page_overrides = NULL;
|
| + base::DictionaryValue* all_overrides = update.Get();
|
| + base::ListValue* page_overrides = NULL;
|
| if (!all_overrides->GetList(page, &page_overrides)) {
|
| // If it's being unregistered, it should already be in the list.
|
| NOTREACHED();
|
| @@ -360,11 +361,11 @@ void ExtensionWebUI::UnregisterChromeURLOverrides(
|
| return;
|
| PrefService* prefs = profile->GetPrefs();
|
| DictionaryPrefUpdate update(prefs, kExtensionURLOverrides);
|
| - DictionaryValue* all_overrides = update.Get();
|
| + base::DictionaryValue* all_overrides = update.Get();
|
| URLOverrides::URLOverrideMap::const_iterator iter = overrides.begin();
|
| for (; iter != overrides.end(); ++iter) {
|
| const std::string& page = iter->first;
|
| - ListValue* page_overrides = NULL;
|
| + base::ListValue* page_overrides = NULL;
|
| if (!all_overrides->GetList(page, &page_overrides)) {
|
| // If it's being unregistered, it should already be in the list.
|
| NOTREACHED();
|
|
|