summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-23 21:16:21 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-23 21:16:21 +0000
commitc7c161a0bd2f64b1a6eca61dcd8417771950847e (patch)
tree7b43c6e0a1dc0c2d0f248523ed9cf4dec4069090
parent9c1ddc500c6f7a50d1219ad1d0ea1393df84a5d8 (diff)
downloadchromium_src-c7c161a0bd2f64b1a6eca61dcd8417771950847e.zip
chromium_src-c7c161a0bd2f64b1a6eca61dcd8417771950847e.tar.gz
chromium_src-c7c161a0bd2f64b1a6eca61dcd8417771950847e.tar.bz2
Update some uses of Value in chrome/browser to use the base:: namespace.
BUG=88666 TEST=no change TBR=ben@chromium.org Review URL: https://codereview.chromium.org/120833002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242406 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/webui/ntp/ntp_resource_cache.cc6
-rw-r--r--chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc21
-rw-r--r--chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.h6
-rw-r--r--chrome/browser/ui/webui/ntp/suggestions_combiner.cc2
-rw-r--r--chrome/browser/ui/webui/ntp/suggestions_combiner_unittest.cc4
-rw-r--r--chrome/browser/ui/webui/ntp/suggestions_page_handler.cc9
-rw-r--r--chrome/browser/ui/webui/ntp/suggestions_source_discovery.cc6
-rw-r--r--chrome/browser/ui/webui/ntp/suggestions_source_top_sites.cc6
-rw-r--r--chrome/browser/ui/webui/options/autofill_options_handler.cc88
-rw-r--r--chrome/browser/ui/webui/options/browser_options_handler.cc83
-rw-r--r--chrome/browser/ui/webui/options/browser_options_handler.h36
-rw-r--r--chrome/browser/ui/webui/options/certificate_manager_browsertest.cc2
-rw-r--r--chrome/browser/ui/webui/options/certificate_manager_handler.cc85
-rw-r--r--chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc26
-rw-r--r--chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc8
-rw-r--r--chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc6
-rw-r--r--chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc37
-rw-r--r--chrome/browser/ui/webui/options/chromeos/cros_language_options_handler_unittest.cc8
-rw-r--r--chrome/browser/ui/webui/options/chromeos/display_options_handler.cc2
-rw-r--r--chrome/browser/ui/webui/options/chromeos/display_overscan_handler.cc2
-rw-r--r--chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc7
-rw-r--r--chrome/browser/ui/webui/options/chromeos/keyboard_handler.h3
-rw-r--r--chrome/browser/ui/webui/options/chromeos/pointer_handler.cc3
-rw-r--r--chrome/browser/ui/webui/options/chromeos/pointer_handler.h3
-rw-r--r--chrome/browser/ui/webui/options/chromeos/proxy_handler.cc2
-rw-r--r--chrome/browser/ui/webui/options/chromeos/stats_options_handler.cc4
-rw-r--r--chrome/browser/ui/webui/options/clear_browser_data_handler.cc13
-rw-r--r--chrome/browser/ui/webui/options/clear_browser_data_handler.h5
-rw-r--r--chrome/browser/ui/webui/options/content_settings_handler.cc87
-rw-r--r--chrome/browser/ui/webui/options/cookies_view_handler.cc26
-rw-r--r--chrome/browser/ui/webui/options/core_options_handler.cc37
-rw-r--r--chrome/browser/ui/webui/options/core_options_handler.h29
-rw-r--r--chrome/browser/ui/webui/options/create_profile_handler.cc9
-rw-r--r--chrome/browser/ui/webui/options/font_settings_handler.cc12
-rw-r--r--chrome/browser/ui/webui/options/font_settings_handler.h5
-rw-r--r--chrome/browser/ui/webui/options/geolocation_options_handler.cc2
-rw-r--r--chrome/browser/ui/webui/options/geolocation_options_handler.h3
-rw-r--r--chrome/browser/ui/webui/options/handler_options_handler.cc38
-rw-r--r--chrome/browser/ui/webui/options/handler_options_handler.h14
-rw-r--r--chrome/browser/ui/webui/options/import_data_handler.cc9
-rw-r--r--chrome/browser/ui/webui/options/language_dictionary_overlay_handler.cc13
-rw-r--r--chrome/browser/ui/webui/options/language_options_handler.cc10
-rw-r--r--chrome/browser/ui/webui/options/language_options_handler_common.cc39
-rw-r--r--chrome/browser/ui/webui/options/language_options_handler_unittest.cc4
-rw-r--r--chrome/browser/ui/webui/options/manage_profile_handler.cc29
-rw-r--r--chrome/browser/ui/webui/options/managed_user_create_confirm_handler.cc2
-rw-r--r--chrome/browser/ui/webui/options/managed_user_import_handler.cc10
-rw-r--r--chrome/browser/ui/webui/options/media_devices_selection_handler.cc13
-rw-r--r--chrome/browser/ui/webui/options/media_galleries_handler.cc6
-rw-r--r--chrome/browser/ui/webui/options/options_ui.cc25
-rw-r--r--chrome/browser/ui/webui/options/password_manager_handler.cc33
-rw-r--r--chrome/browser/ui/webui/options/password_manager_handler.h11
-rw-r--r--chrome/browser/ui/webui/options/preferences_browsertest.cc4
-rw-r--r--chrome/browser/ui/webui/options/reset_profile_settings_handler.cc9
-rw-r--r--chrome/browser/ui/webui/options/search_engine_manager_handler.cc24
-rw-r--r--chrome/browser/ui/webui/options/startup_pages_handler.cc26
-rw-r--r--chrome/browser/ui/webui/options/startup_pages_handler.h19
-rw-r--r--chrome/browser/ui/webui/performance_monitor/performance_monitor_handler.cc99
-rw-r--r--chrome/browser/ui/webui/plugins_ui.cc49
-rw-r--r--chrome/browser/ui/webui/print_preview/print_preview_handler.cc60
-rw-r--r--chrome/browser/ui/webui/print_preview/sticky_settings.cc4
-rw-r--r--chrome/browser/ui/webui/profiler_ui.cc10
-rw-r--r--chrome/browser/ui/webui/set_as_default_browser_ui.cc4
-rw-r--r--chrome/browser/ui/webui/signin/user_manager_screen_handler.cc6
-rw-r--r--chrome/browser/ui/webui/signin_internals_ui.cc10
-rw-r--r--chrome/browser/ui/webui/signin_internals_ui.h3
-rw-r--r--chrome/browser/ui/webui/sync_file_system_internals/extension_statuses_handler.cc2
-rw-r--r--chrome/browser/ui/webui/sync_file_system_internals/sync_file_system_internals_handler.cc2
-rw-r--r--chrome/browser/ui/webui/sync_internals_ui.cc16
-rw-r--r--chrome/browser/ui/webui/sync_internals_ui_unittest.cc22
-rw-r--r--chrome/browser/ui/webui/sync_setup_handler.cc39
-rw-r--r--chrome/browser/ui/webui/sync_setup_handler_unittest.cc72
-rw-r--r--chrome/browser/ui/webui/system_info_ui.cc6
-rw-r--r--chrome/browser/ui/webui/task_manager/task_manager_dialog.cc4
-rw-r--r--chrome/browser/ui/webui/task_manager/task_manager_handler.cc111
-rw-r--r--chrome/browser/ui/webui/translate_internals/translate_internals_handler.cc8
-rw-r--r--chrome/browser/ui/webui/uber/uber_ui.cc2
-rw-r--r--chrome/browser/ui/webui/uber/uber_ui.h2
-rw-r--r--chrome/browser/ui/webui/version_handler.cc12
-rw-r--r--chrome/browser/ui/webui/version_handler.h2
-rw-r--r--chrome/browser/ui/webui/version_handler_chromeos.cc5
-rw-r--r--chrome/browser/ui/webui/version_handler_chromeos.h2
-rw-r--r--chrome/browser/ui/webui/web_ui_test_handler.cc2
-rw-r--r--chrome/browser/ui/webui/welcome_handler_android.cc7
-rw-r--r--chrome/browser/ui/webui/welcome_handler_android.h6
-rw-r--r--chrome/browser/ui/window_sizer/window_sizer.cc2
-rw-r--r--chrome/browser/value_store/leveldb_value_store.cc29
-rw-r--r--chrome/browser/value_store/leveldb_value_store.h6
-rw-r--r--chrome/browser/value_store/testing_value_store.cc20
-rw-r--r--chrome/browser/value_store/testing_value_store.h6
-rw-r--r--chrome/browser/value_store/value_store.cc4
-rw-r--r--chrome/browser/value_store/value_store_change.cc10
-rw-r--r--chrome/browser/value_store/value_store_change_unittest.cc24
-rw-r--r--chrome/browser/value_store/value_store_unittest.cc37
-rw-r--r--chrome/browser/value_store/value_store_unittest.h16
95 files changed, 922 insertions, 830 deletions
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
index 864a8f8..deb62e7 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -290,7 +290,7 @@ void NTPResourceCache::OnPreferenceChanged() {
}
void NTPResourceCache::CreateNewTabIncognitoHTML() {
- DictionaryValue localized_strings;
+ base::DictionaryValue localized_strings;
localized_strings.SetString("title",
l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE));
int new_tab_message_ids = IDS_NEW_TAB_OTR_MESSAGE;
@@ -347,7 +347,7 @@ void NTPResourceCache::CreateNewTabIncognitoHTML() {
}
void NTPResourceCache::CreateNewTabGuestHTML() {
- DictionaryValue localized_strings;
+ base::DictionaryValue localized_strings;
localized_strings.SetString("title",
l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE));
const char* new_tab_link = kLearnMoreGuestSessionUrl;
@@ -373,7 +373,7 @@ void NTPResourceCache::CreateNewTabHTML() {
// Show the profile name in the title and most visited labels if the current
// profile is not the default.
PrefService* prefs = profile_->GetPrefs();
- DictionaryValue load_time_data;
+ base::DictionaryValue load_time_data;
load_time_data.SetBoolean("bookmarkbarattached",
prefs->GetBoolean(prefs::kShowBookmarkBar));
load_time_data.SetBoolean("hasattribution",
diff --git a/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc b/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc
index 9704e6a..a08fb9a 100644
--- a/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc
+++ b/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc
@@ -25,7 +25,7 @@
namespace {
void TabToValue(const TabRestoreService::Tab& tab,
- DictionaryValue* dictionary) {
+ base::DictionaryValue* dictionary) {
const sessions::SerializedNavigationEntry& current_navigation =
tab.navigations.at(tab.current_navigation_index);
NewTabUI::SetUrlTitleAndDirection(dictionary, current_navigation.title(),
@@ -35,12 +35,12 @@ void TabToValue(const TabRestoreService::Tab& tab,
}
void WindowToValue(const TabRestoreService::Window& window,
- DictionaryValue* dictionary) {
+ base::DictionaryValue* dictionary) {
DCHECK(!window.tabs.empty());
- scoped_ptr<ListValue> tab_values(new ListValue());
+ scoped_ptr<base::ListValue> tab_values(new base::ListValue());
for (size_t i = 0; i < window.tabs.size(); ++i) {
- DictionaryValue* tab_value = new DictionaryValue();
+ base::DictionaryValue* tab_value = new base::DictionaryValue();
TabToValue(window.tabs[i], tab_value);
tab_values->Append(tab_value);
}
@@ -69,7 +69,7 @@ RecentlyClosedTabsHandler::~RecentlyClosedTabsHandler() {
tab_restore_service_->RemoveObserver(this);
}
-void RecentlyClosedTabsHandler::HandleReopenTab(const ListValue* args) {
+void RecentlyClosedTabsHandler::HandleReopenTab(const base::ListValue* args) {
if (!tab_restore_service_)
return;
@@ -119,14 +119,14 @@ void RecentlyClosedTabsHandler::HandleReopenTab(const ListValue* args) {
}
void RecentlyClosedTabsHandler::HandleClearRecentlyClosed(
- const ListValue* args) {
+ const base::ListValue* args) {
EnsureTabRestoreService();
if (tab_restore_service_)
tab_restore_service_->ClearEntries();
}
void RecentlyClosedTabsHandler::HandleGetRecentlyClosedTabs(
- const ListValue* args) {
+ const base::ListValue* args) {
EnsureTabRestoreService();
if (tab_restore_service_)
TabRestoreServiceChanged(tab_restore_service_);
@@ -134,7 +134,7 @@ void RecentlyClosedTabsHandler::HandleGetRecentlyClosedTabs(
void RecentlyClosedTabsHandler::TabRestoreServiceChanged(
TabRestoreService* service) {
- ListValue list_value;
+ base::ListValue list_value;
TabRestoreService::Entries entries = service->entries();
CreateRecentlyClosedValues(entries, &list_value);
@@ -148,7 +148,8 @@ void RecentlyClosedTabsHandler::TabRestoreServiceDestroyed(
// static
void RecentlyClosedTabsHandler::CreateRecentlyClosedValues(
- const TabRestoreService::Entries& entries, ListValue* entry_list_value) {
+ const TabRestoreService::Entries& entries,
+ base::ListValue* entry_list_value) {
const int max_count = 10;
int added_count = 0;
// We filter the list of recently closed to only show 'interesting' entries,
@@ -157,7 +158,7 @@ void RecentlyClosedTabsHandler::CreateRecentlyClosedValues(
for (TabRestoreService::Entries::const_iterator it = entries.begin();
it != entries.end() && added_count < max_count; ++it) {
TabRestoreService::Entry* entry = *it;
- scoped_ptr<DictionaryValue> entry_dict(new DictionaryValue());
+ scoped_ptr<base::DictionaryValue> entry_dict(new base::DictionaryValue());
if (entry->type == TabRestoreService::TAB) {
TabToValue(*static_cast<TabRestoreService::Tab*>(entry),
entry_dict.get());
diff --git a/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.h b/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.h
index 3808efc..73d8d1e 100644
--- a/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.h
+++ b/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.h
@@ -24,13 +24,13 @@ class RecentlyClosedTabsHandler : public content::WebUIMessageHandler,
// Callback for the "reopenTab" message. Rewrites the history of the
// currently displayed tab to be the one in TabRestoreService with a
// history of a session passed in through the content pointer.
- void HandleReopenTab(const ListValue* args);
+ void HandleReopenTab(const base::ListValue* args);
// Callback for the "getRecentlyClosedTabs" message.
- void HandleGetRecentlyClosedTabs(const ListValue* args);
+ void HandleGetRecentlyClosedTabs(const base::ListValue* args);
// Callback for the "clearRecentlyClosed" message.
- void HandleClearRecentlyClosed(const ListValue* args);
+ void HandleClearRecentlyClosed(const base::ListValue* args);
// Observer callback for TabRestoreServiceObserver. Sends data on
// recently closed tabs to the javascript side of this page to
diff --git a/chrome/browser/ui/webui/ntp/suggestions_combiner.cc b/chrome/browser/ui/webui/ntp/suggestions_combiner.cc
index 774a0bb..0b1486c 100644
--- a/chrome/browser/ui/webui/ntp/suggestions_combiner.cc
+++ b/chrome/browser/ui/webui/ntp/suggestions_combiner.cc
@@ -117,7 +117,7 @@ void SuggestionsCombiner::FillPageValues() {
}
// Fill in extra items, prioritizing the first source.
- DictionaryValue* item;
+ base::DictionaryValue* item;
// Rather than updating |next_item_index_for_source| we keep track of the
// number of extra items that were added and offset indices by that much.
size_t extra_items_added = 0;
diff --git a/chrome/browser/ui/webui/ntp/suggestions_combiner_unittest.cc b/chrome/browser/ui/webui/ntp/suggestions_combiner_unittest.cc
index 9b749a8..f74b81f 100644
--- a/chrome/browser/ui/webui/ntp/suggestions_combiner_unittest.cc
+++ b/chrome/browser/ui/webui/ntp/suggestions_combiner_unittest.cc
@@ -166,7 +166,7 @@ class SuggestionsSourceStub : public SuggestionsSource {
virtual base::DictionaryValue* PopItem() OVERRIDE {
if (items_.empty())
return NULL;
- DictionaryValue* item = items_.front();
+ base::DictionaryValue* item = items_.front();
items_.pop_front();
return item;
}
@@ -182,7 +182,7 @@ class SuggestionsSourceStub : public SuggestionsSource {
// Adds a fake suggestion. This suggestion is a DictionaryValue with a single
// "title" field containing |title|.
void AddSuggestion(const std::string& title) {
- DictionaryValue* item = new DictionaryValue();
+ base::DictionaryValue* item = new base::DictionaryValue();
item->SetString("title", title);
items_.push_back(item);
}
diff --git a/chrome/browser/ui/webui/ntp/suggestions_page_handler.cc b/chrome/browser/ui/webui/ntp/suggestions_page_handler.cc
index 778b1d9..0f3a5b6 100644
--- a/chrome/browser/ui/webui/ntp/suggestions_page_handler.cc
+++ b/chrome/browser/ui/webui/ntp/suggestions_page_handler.cc
@@ -112,7 +112,7 @@ void SuggestionsHandler::RegisterMessages() {
base::Unretained(this)));
}
-void SuggestionsHandler::HandleGetSuggestions(const ListValue* args) {
+void SuggestionsHandler::HandleGetSuggestions(const base::ListValue* args) {
if (!got_first_suggestions_request_) {
// If it's the first request we get, return the prefetched data.
SendPagesValue();
@@ -140,17 +140,18 @@ void SuggestionsHandler::SendPagesValue() {
}
}
-void SuggestionsHandler::HandleBlacklistURL(const ListValue* args) {
+void SuggestionsHandler::HandleBlacklistURL(const base::ListValue* args) {
std::string url = UTF16ToUTF8(ExtractStringValue(args));
BlacklistURL(GURL(url));
}
-void SuggestionsHandler::HandleRemoveURLsFromBlacklist(const ListValue* args) {
+void SuggestionsHandler::HandleRemoveURLsFromBlacklist(
+ const base::ListValue* args) {
DCHECK_GT(args->GetSize(), 0U);
// TODO(georgey) remove URLs from blacklist.
}
-void SuggestionsHandler::HandleClearBlacklist(const ListValue* args) {
+void SuggestionsHandler::HandleClearBlacklist(const base::ListValue* args) {
// TODO(georgey) clear blacklist.
}
diff --git a/chrome/browser/ui/webui/ntp/suggestions_source_discovery.cc b/chrome/browser/ui/webui/ntp/suggestions_source_discovery.cc
index 2381512..257c3d6 100644
--- a/chrome/browser/ui/webui/ntp/suggestions_source_discovery.cc
+++ b/chrome/browser/ui/webui/ntp/suggestions_source_discovery.cc
@@ -53,10 +53,10 @@ int SuggestionsSourceDiscovery::GetItemCount() {
return items_.size();
}
-DictionaryValue* SuggestionsSourceDiscovery::PopItem() {
+base::DictionaryValue* SuggestionsSourceDiscovery::PopItem() {
if (items_.empty())
return NULL;
- DictionaryValue* item = items_.front();
+ base::DictionaryValue* item = items_.front();
items_.pop_front();
return item;
}
@@ -71,7 +71,7 @@ void SuggestionsSourceDiscovery::FetchItems(Profile* profile) {
items_.clear();
for (SuggestedLinkList::const_iterator it = list->begin();
it != list->end(); ++it) {
- DictionaryValue* page_value = new DictionaryValue();
+ base::DictionaryValue* page_value = new base::DictionaryValue();
NewTabUI::SetUrlTitleAndDirection(page_value,
ASCIIToUTF16((*it)->link_text()),
GURL((*it)->link_url()));
diff --git a/chrome/browser/ui/webui/ntp/suggestions_source_top_sites.cc b/chrome/browser/ui/webui/ntp/suggestions_source_top_sites.cc
index 06a54e5..717add4 100644
--- a/chrome/browser/ui/webui/ntp/suggestions_source_top_sites.cc
+++ b/chrome/browser/ui/webui/ntp/suggestions_source_top_sites.cc
@@ -48,11 +48,11 @@ int SuggestionsSourceTopSites::GetItemCount() {
return items_.size();
}
-DictionaryValue* SuggestionsSourceTopSites::PopItem() {
+base::DictionaryValue* SuggestionsSourceTopSites::PopItem() {
if (items_.empty())
return NULL;
- DictionaryValue* item = items_.front();
+ base::DictionaryValue* item = items_.front();
items_.pop_front();
return item;
}
@@ -91,7 +91,7 @@ void SuggestionsSourceTopSites::OnSuggestionsUrlsAvailable(
if (suggested_url.url.is_empty())
continue;
- DictionaryValue* page_value = new DictionaryValue();
+ base::DictionaryValue* page_value = new base::DictionaryValue();
NewTabUI::SetUrlTitleAndDirection(page_value,
suggested_url.title,
suggested_url.url);
diff --git a/chrome/browser/ui/webui/options/autofill_options_handler.cc b/chrome/browser/ui/webui/options/autofill_options_handler.cc
index 7077915..34b8df1 100644
--- a/chrome/browser/ui/webui/options/autofill_options_handler.cc
+++ b/chrome/browser/ui/webui/options/autofill_options_handler.cc
@@ -43,18 +43,19 @@ const char kSettingsOrigin[] = "Chrome settings";
// Sets data related to the country <select>.
void SetCountryData(const PersonalDataManager& manager,
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
autofill::CountryComboboxModel model(manager);
const std::vector<AutofillCountry*>& countries = model.countries();
localized_strings->SetString("defaultCountryCode",
countries.front()->country_code());
// An ordered list of options to show in the <select>.
- scoped_ptr<ListValue> country_list(new ListValue());
+ scoped_ptr<base::ListValue> country_list(new base::ListValue());
// A dictionary of postal code and state info, keyed on country code.
- scoped_ptr<DictionaryValue> country_data(new DictionaryValue());
+ scoped_ptr<base::DictionaryValue> country_data(new base::DictionaryValue());
for (size_t i = 0; i < countries.size(); ++i) {
- scoped_ptr<DictionaryValue> option_details(new DictionaryValue());
+ scoped_ptr<base::DictionaryValue> option_details(
+ new base::DictionaryValue());
option_details->SetString("name", model.GetItemAt(i));
option_details->SetString(
"value",
@@ -64,7 +65,7 @@ void SetCountryData(const PersonalDataManager& manager,
if (!countries[i])
continue;
- scoped_ptr<DictionaryValue> details(new DictionaryValue());
+ scoped_ptr<base::DictionaryValue> details(new base::DictionaryValue());
details->SetString("postalCodeLabel", countries[i]->postal_code_label());
details->SetString("stateLabel", countries[i]->state_label());
country_data->Set(countries[i]->country_code(), details.release());
@@ -77,8 +78,8 @@ void SetCountryData(const PersonalDataManager& manager,
// Get the multi-valued element for |type| and return it in |ListValue| form.
void GetValueList(const AutofillProfile& profile,
ServerFieldType type,
- scoped_ptr<ListValue>* list) {
- list->reset(new ListValue);
+ scoped_ptr<base::ListValue>* list) {
+ list->reset(new base::ListValue);
std::vector<base::string16> values;
profile.GetRawMultiInfo(type, &values);
@@ -93,7 +94,7 @@ void GetValueList(const AutofillProfile& profile,
}
// Set the multi-valued element for |type| from input |list| values.
-void SetValueList(const ListValue* list,
+void SetValueList(const base::ListValue* list,
ServerFieldType type,
AutofillProfile* profile) {
std::vector<base::string16> values(list->GetSize());
@@ -107,8 +108,8 @@ void SetValueList(const ListValue* list,
// Get the multi-valued element for |type| and return it in |ListValue| form.
void GetNameList(const AutofillProfile& profile,
- scoped_ptr<ListValue>* names) {
- names->reset(new ListValue);
+ scoped_ptr<base::ListValue>* names) {
+ names->reset(new base::ListValue);
std::vector<base::string16> first_names;
std::vector<base::string16> middle_names;
@@ -126,7 +127,7 @@ void GetNameList(const AutofillProfile& profile,
}
for (size_t i = 0; i < first_names.size(); ++i) {
- ListValue* name = new ListValue; // owned by |list|
+ base::ListValue* name = new base::ListValue; // owned by |list|
name->Set(0, new base::StringValue(first_names[i]));
name->Set(1, new base::StringValue(middle_names[i]));
name->Set(2, new base::StringValue(last_names[i]));
@@ -135,14 +136,14 @@ void GetNameList(const AutofillProfile& profile,
}
// Set the multi-valued element for |type| from input |list| values.
-void SetNameList(const ListValue* names, AutofillProfile* profile) {
+void SetNameList(const base::ListValue* names, AutofillProfile* profile) {
const size_t size = names->GetSize();
std::vector<base::string16> first_names(size);
std::vector<base::string16> middle_names(size);
std::vector<base::string16> last_names(size);
for (size_t i = 0; i < size; ++i) {
- const ListValue* name;
+ const base::ListValue* name;
bool success = names->GetList(i, &name);
DCHECK(success);
@@ -169,9 +170,9 @@ void SetNameList(const ListValue* names, AutofillProfile* profile) {
// Pulls the phone number |index|, |phone_number_list|, and |country_code| from
// the |args| input.
-void ExtractPhoneNumberInformation(const ListValue* args,
+void ExtractPhoneNumberInformation(const base::ListValue* args,
size_t* index,
- const ListValue** phone_number_list,
+ const base::ListValue** phone_number_list,
std::string* country_code) {
// Retrieve index as a |double|, as that is how it comes across from
// JavaScript.
@@ -199,7 +200,7 @@ void ExtractPhoneNumberInformation(const ListValue* args,
// phone number values.
void RemoveDuplicatePhoneNumberAtIndex(size_t index,
const std::string& country_code,
- ListValue* list) {
+ base::ListValue* list) {
base::string16 new_value;
if (!list->GetString(index, &new_value)) {
NOTREACHED() << "List should have a value at index " << index;
@@ -225,13 +226,14 @@ void RemoveDuplicatePhoneNumberAtIndex(size_t index,
list->Remove(index, NULL);
}
-scoped_ptr<ListValue> ValidatePhoneArguments(const ListValue* args) {
+scoped_ptr<base::ListValue> ValidatePhoneArguments(
+ const base::ListValue* args) {
size_t index = 0;
std::string country_code;
- const ListValue* extracted_list = NULL;
+ const base::ListValue* extracted_list = NULL;
ExtractPhoneNumberInformation(args, &index, &extracted_list, &country_code);
- scoped_ptr<ListValue> list(extracted_list->DeepCopy());
+ scoped_ptr<base::ListValue> list(extracted_list->DeepCopy());
RemoveDuplicatePhoneNumberAtIndex(index, country_code, list.get());
return list.Pass();
}
@@ -251,7 +253,7 @@ AutofillOptionsHandler::~AutofillOptionsHandler() {
/////////////////////////////////////////////////////////////////////////////
// OptionsPageUIHandler implementation:
void AutofillOptionsHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
static OptionsStringResource resources[] = {
@@ -326,7 +328,7 @@ void AutofillOptionsHandler::OnPersonalDataChanged() {
}
void AutofillOptionsHandler::SetAddressOverlayStrings(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
localized_strings->SetString("autofillEditAddressTitle",
l10n_util::GetStringUTF16(IDS_AUTOFILL_EDIT_ADDRESS_CAPTION));
localized_strings->SetString("autofillFirstNameLabel",
@@ -363,7 +365,7 @@ void AutofillOptionsHandler::SetAddressOverlayStrings(
}
void AutofillOptionsHandler::SetCreditCardOverlayStrings(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
localized_strings->SetString("autofillEditCreditCardTitle",
l10n_util::GetStringUTF16(IDS_AUTOFILL_EDIT_CREDITCARD_CAPTION));
localized_strings->SetString("nameOnCardLabel",
@@ -384,29 +386,29 @@ void AutofillOptionsHandler::LoadAutofillData() {
AutofillProfile::CreateDifferentiatingLabels(profiles, &labels);
DCHECK_EQ(labels.size(), profiles.size());
- ListValue addresses;
+ base::ListValue addresses;
for (size_t i = 0; i < profiles.size(); ++i) {
- ListValue* entry = new ListValue();
- entry->Append(new StringValue(profiles[i]->guid()));
- entry->Append(new StringValue(labels[i]));
+ base::ListValue* entry = new base::ListValue();
+ entry->Append(new base::StringValue(profiles[i]->guid()));
+ entry->Append(new base::StringValue(labels[i]));
addresses.Append(entry);
}
web_ui()->CallJavascriptFunction("AutofillOptions.setAddressList", addresses);
- ListValue credit_cards;
+ base::ListValue credit_cards;
const std::vector<CreditCard*>& cards = personal_data_->GetCreditCards();
for (std::vector<CreditCard*>::const_iterator iter = cards.begin();
iter != cards.end(); ++iter) {
const CreditCard* card = *iter;
// TODO(estade): this should be a dictionary.
- ListValue* entry = new ListValue();
- entry->Append(new StringValue(card->guid()));
- entry->Append(new StringValue(card->Label()));
- entry->Append(new StringValue(
+ base::ListValue* entry = new base::ListValue();
+ entry->Append(new base::StringValue(card->guid()));
+ entry->Append(new base::StringValue(card->Label()));
+ entry->Append(new base::StringValue(
webui::GetBitmapDataUrlFromResource(
CreditCard::IconResourceId(card->type()))));
- entry->Append(new StringValue(card->TypeForDisplay()));
+ entry->Append(new base::StringValue(card->TypeForDisplay()));
credit_cards.Append(entry);
}
@@ -414,7 +416,7 @@ void AutofillOptionsHandler::LoadAutofillData() {
credit_cards);
}
-void AutofillOptionsHandler::RemoveData(const ListValue* args) {
+void AutofillOptionsHandler::RemoveData(const base::ListValue* args) {
DCHECK(IsPersonalDataLoaded());
std::string guid;
@@ -426,7 +428,7 @@ void AutofillOptionsHandler::RemoveData(const ListValue* args) {
personal_data_->RemoveByGUID(guid);
}
-void AutofillOptionsHandler::LoadAddressEditor(const ListValue* args) {
+void AutofillOptionsHandler::LoadAddressEditor(const base::ListValue* args) {
DCHECK(IsPersonalDataLoaded());
std::string guid;
@@ -445,9 +447,9 @@ void AutofillOptionsHandler::LoadAddressEditor(const ListValue* args) {
return;
}
- DictionaryValue address;
+ base::DictionaryValue address;
address.SetString("guid", profile->guid());
- scoped_ptr<ListValue> list;
+ scoped_ptr<base::ListValue> list;
GetNameList(*profile, &list);
address.Set("fullName", list.release());
address.SetString("companyName", profile->GetRawInfo(autofill::COMPANY_NAME));
@@ -469,7 +471,7 @@ void AutofillOptionsHandler::LoadAddressEditor(const ListValue* args) {
web_ui()->CallJavascriptFunction("AutofillOptions.editAddress", address);
}
-void AutofillOptionsHandler::LoadCreditCardEditor(const ListValue* args) {
+void AutofillOptionsHandler::LoadCreditCardEditor(const base::ListValue* args) {
DCHECK(IsPersonalDataLoaded());
std::string guid;
@@ -488,7 +490,7 @@ void AutofillOptionsHandler::LoadCreditCardEditor(const ListValue* args) {
return;
}
- DictionaryValue credit_card_data;
+ base::DictionaryValue credit_card_data;
credit_card_data.SetString("guid", credit_card->guid());
credit_card_data.SetString(
"nameOnCard",
@@ -507,7 +509,7 @@ void AutofillOptionsHandler::LoadCreditCardEditor(const ListValue* args) {
credit_card_data);
}
-void AutofillOptionsHandler::SetAddress(const ListValue* args) {
+void AutofillOptionsHandler::SetAddress(const base::ListValue* args) {
if (!IsPersonalDataLoaded())
return;
@@ -521,7 +523,7 @@ void AutofillOptionsHandler::SetAddress(const ListValue* args) {
std::string country_code;
base::string16 value;
- const ListValue* list_value;
+ const base::ListValue* list_value;
if (args->GetList(1, &list_value))
SetNameList(list_value, &profile);
@@ -561,7 +563,7 @@ void AutofillOptionsHandler::SetAddress(const ListValue* args) {
}
}
-void AutofillOptionsHandler::SetCreditCard(const ListValue* args) {
+void AutofillOptionsHandler::SetCreditCard(const base::ListValue* args) {
if (!IsPersonalDataLoaded())
return;
@@ -594,11 +596,11 @@ void AutofillOptionsHandler::SetCreditCard(const ListValue* args) {
}
}
-void AutofillOptionsHandler::ValidatePhoneNumbers(const ListValue* args) {
+void AutofillOptionsHandler::ValidatePhoneNumbers(const base::ListValue* args) {
if (!IsPersonalDataLoaded())
return;
- scoped_ptr<ListValue> list_value = ValidatePhoneArguments(args);
+ scoped_ptr<base::ListValue> list_value = ValidatePhoneArguments(args);
web_ui()->CallJavascriptFunction(
"AutofillEditAddressOverlay.setValidatedPhoneNumbers", *list_value);
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
index 975de12..f2dafb4 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -194,7 +194,7 @@ BrowserOptionsHandler::~BrowserOptionsHandler() {
select_folder_dialog_->ListenerDestroyed();
}
-void BrowserOptionsHandler::GetLocalizedValues(DictionaryValue* values) {
+void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
DCHECK(values);
static OptionsStringResource resources[] = {
@@ -457,7 +457,7 @@ void BrowserOptionsHandler::GetLocalizedValues(DictionaryValue* values) {
{ "proxiesLabelSystem", IDS_OPTIONS_SYSTEM_PROXIES_LABEL,
IDS_SETTINGS_APP_LAUNCHER_PRODUCT_NAME },
};
- DictionaryValue* app_values = NULL;
+ base::DictionaryValue* app_values = NULL;
CHECK(values->GetDictionary(kSettingsAppKey, &app_values));
RegisterStrings(app_values, app_resources, arraysize(app_resources));
#endif
@@ -565,7 +565,8 @@ void BrowserOptionsHandler::GetLocalizedValues(DictionaryValue* values) {
}
#if defined(ENABLE_FULL_PRINTING)
-void BrowserOptionsHandler::RegisterCloudPrintValues(DictionaryValue* values) {
+void BrowserOptionsHandler::RegisterCloudPrintValues(
+ base::DictionaryValue* values) {
values->SetString("cloudPrintOptionLabel",
l10n_util::GetStringFUTF16(
IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL,
@@ -913,7 +914,7 @@ void BrowserOptionsHandler::UpdateDefaultBrowserState() {
#endif
}
-void BrowserOptionsHandler::BecomeDefaultBrowser(const ListValue* args) {
+void BrowserOptionsHandler::BecomeDefaultBrowser(const base::ListValue* args) {
// If the default browser setting is managed then we should not be able to
// call this function.
if (default_browser_policy_.IsManaged())
@@ -995,14 +996,14 @@ void BrowserOptionsHandler::OnTemplateURLServiceChanged() {
template_url_service_->GetDefaultSearchProvider();
int default_index = -1;
- ListValue search_engines;
+ base::ListValue search_engines;
TemplateURLService::TemplateURLVector model_urls(
template_url_service_->GetTemplateURLs());
for (size_t i = 0; i < model_urls.size(); ++i) {
if (!model_urls[i]->ShowInDefaultList())
continue;
- DictionaryValue* entry = new DictionaryValue();
+ base::DictionaryValue* entry = new base::DictionaryValue();
entry->SetString("name", model_urls[i]->short_name());
entry->SetInteger("index", i);
search_engines.Append(entry);
@@ -1019,7 +1020,8 @@ void BrowserOptionsHandler::OnTemplateURLServiceChanged() {
template_url_service_->IsExtensionControlledDefaultSearch()));
}
-void BrowserOptionsHandler::SetDefaultSearchEngine(const ListValue* args) {
+void BrowserOptionsHandler::SetDefaultSearchEngine(
+ const base::ListValue* args) {
int selected_index = -1;
if (!ExtractIntegerValue(args, &selected_index)) {
NOTREACHED();
@@ -1084,7 +1086,7 @@ void BrowserOptionsHandler::OnCloudPrintPrefsChanged() {
}
#endif
-void BrowserOptionsHandler::ToggleAutoLaunch(const ListValue* args) {
+void BrowserOptionsHandler::ToggleAutoLaunch(const base::ListValue* args) {
#if defined(OS_WIN)
if (!auto_launch_trial::IsInAutoLaunchGroup())
return;
@@ -1104,15 +1106,15 @@ void BrowserOptionsHandler::ToggleAutoLaunch(const ListValue* args) {
#endif // OS_WIN
}
-scoped_ptr<ListValue> BrowserOptionsHandler::GetProfilesInfoList() {
+scoped_ptr<base::ListValue> BrowserOptionsHandler::GetProfilesInfoList() {
ProfileInfoCache& cache =
g_browser_process->profile_manager()->GetProfileInfoCache();
- scoped_ptr<ListValue> profile_info_list(new ListValue);
+ scoped_ptr<base::ListValue> profile_info_list(new base::ListValue);
base::FilePath current_profile_path =
web_ui()->GetWebContents()->GetBrowserContext()->GetPath();
for (size_t i = 0, e = cache.GetNumberOfProfiles(); i < e; ++i) {
- DictionaryValue* profile_value = new DictionaryValue();
+ base::DictionaryValue* profile_value = new base::DictionaryValue();
profile_value->SetString("name", cache.GetNameOfProfileAtIndex(i));
base::FilePath profile_path = cache.GetPathOfProfileAtIndex(i);
profile_value->Set("filePath", base::CreateFilePathValue(profile_path));
@@ -1147,9 +1149,9 @@ void BrowserOptionsHandler::SendProfilesInfo() {
*GetProfilesInfoList());
}
-void BrowserOptionsHandler::DeleteProfile(const ListValue* args) {
+void BrowserOptionsHandler::DeleteProfile(const base::ListValue* args) {
DCHECK(args);
- const Value* file_path_value;
+ const base::Value* file_path_value;
if (!args->Get(0, &file_path_value))
return;
@@ -1180,14 +1182,14 @@ void BrowserOptionsHandler::ObserveThemeChanged() {
enabled);
}
-void BrowserOptionsHandler::ThemesReset(const ListValue* args) {
+void BrowserOptionsHandler::ThemesReset(const base::ListValue* args) {
Profile* profile = Profile::FromWebUI(web_ui());
content::RecordAction(UserMetricsAction("Options_ThemesReset"));
ThemeServiceFactory::GetForProfile(profile)->UseDefaultTheme();
}
#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-void BrowserOptionsHandler::ThemesSetNative(const ListValue* args) {
+void BrowserOptionsHandler::ThemesSetNative(const base::ListValue* args) {
content::RecordAction(UserMetricsAction("Options_GtkThemeSet"));
Profile* profile = Profile::FromWebUI(web_ui());
ThemeServiceFactory::GetForProfile(profile)->SetNativeTheme();
@@ -1211,8 +1213,9 @@ void BrowserOptionsHandler::OnAccountPictureManagedChanged(bool managed) {
}
#endif
-scoped_ptr<DictionaryValue> BrowserOptionsHandler::GetSyncStateDictionary() {
- scoped_ptr<DictionaryValue> sync_status(new DictionaryValue);
+scoped_ptr<base::DictionaryValue>
+BrowserOptionsHandler::GetSyncStateDictionary() {
+ scoped_ptr<base::DictionaryValue> sync_status(new base::DictionaryValue);
Profile* profile = Profile::FromWebUI(web_ui());
if (profile->IsManaged()) {
sync_status->SetBoolean("supervisedUser", true);
@@ -1270,7 +1273,7 @@ scoped_ptr<DictionaryValue> BrowserOptionsHandler::GetSyncStateDictionary() {
}
void BrowserOptionsHandler::HandleSelectDownloadLocation(
- const ListValue* args) {
+ const base::ListValue* args) {
PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
select_folder_dialog_ = ui::SelectFileDialog::Create(
this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
@@ -1326,7 +1329,7 @@ void BrowserOptionsHandler::OnSigninAllowedPrefChange() {
UpdateSyncState();
}
-void BrowserOptionsHandler::HandleAutoOpenButton(const ListValue* args) {
+void BrowserOptionsHandler::HandleAutoOpenButton(const base::ListValue* args) {
content::RecordAction(UserMetricsAction("Options_ResetAutoOpenFiles"));
DownloadManager* manager = BrowserContext::GetDownloadManager(
web_ui()->GetWebContents()->GetBrowserContext());
@@ -1334,7 +1337,7 @@ void BrowserOptionsHandler::HandleAutoOpenButton(const ListValue* args) {
DownloadPrefs::FromDownloadManager(manager)->ResetAutoOpen();
}
-void BrowserOptionsHandler::HandleDefaultFontSize(const ListValue* args) {
+void BrowserOptionsHandler::HandleDefaultFontSize(const base::ListValue* args) {
int font_size;
if (ExtractIntegerValue(args, &font_size)) {
if (font_size > 0) {
@@ -1345,14 +1348,15 @@ void BrowserOptionsHandler::HandleDefaultFontSize(const ListValue* args) {
}
}
-void BrowserOptionsHandler::HandleDefaultZoomFactor(const ListValue* args) {
+void BrowserOptionsHandler::HandleDefaultZoomFactor(
+ const base::ListValue* args) {
double zoom_factor;
if (ExtractDoubleValue(args, &zoom_factor)) {
default_zoom_level_.SetValue(content::ZoomFactorToZoomLevel(zoom_factor));
}
}
-void BrowserOptionsHandler::HandleRestartBrowser(const ListValue* args) {
+void BrowserOptionsHandler::HandleRestartBrowser(const base::ListValue* args) {
#if defined(OS_WIN) && defined(USE_ASH)
// If hardware acceleration is disabled then we need to force restart
// browser in desktop mode.
@@ -1371,12 +1375,14 @@ void BrowserOptionsHandler::HandleRestartBrowser(const ListValue* args) {
chrome::AttemptRestart();
}
-void BrowserOptionsHandler::HandleRequestProfilesInfo(const ListValue* args) {
+void BrowserOptionsHandler::HandleRequestProfilesInfo(
+ const base::ListValue* args) {
SendProfilesInfo();
}
#if !defined(OS_CHROMEOS)
-void BrowserOptionsHandler::ShowNetworkProxySettings(const ListValue* args) {
+void BrowserOptionsHandler::ShowNetworkProxySettings(
+ const base::ListValue* args) {
content::RecordAction(UserMetricsAction("Options_ShowProxySettings"));
AdvancedOptionsUtilities::ShowNetworkProxySettings(
web_ui()->GetWebContents());
@@ -1384,7 +1390,8 @@ void BrowserOptionsHandler::ShowNetworkProxySettings(const ListValue* args) {
#endif
#if !defined(USE_NSS) && !defined(USE_OPENSSL)
-void BrowserOptionsHandler::ShowManageSSLCertificates(const ListValue* args) {
+void BrowserOptionsHandler::ShowManageSSLCertificates(
+ const base::ListValue* args) {
content::RecordAction(UserMetricsAction("Options_ManageSSLCertificates"));
AdvancedOptionsUtilities::ShowManageSSLCertificates(
web_ui()->GetWebContents());
@@ -1393,7 +1400,8 @@ void BrowserOptionsHandler::ShowManageSSLCertificates(const ListValue* args) {
#if defined(ENABLE_MDNS)
-void BrowserOptionsHandler::ShowCloudPrintDevicesPage(const ListValue* args) {
+void BrowserOptionsHandler::ShowCloudPrintDevicesPage(
+ const base::ListValue* args) {
content::RecordAction(UserMetricsAction("Options_CloudPrintDevicesPage"));
// Navigate in current tab to devices page.
OpenURLParams params(
@@ -1405,7 +1413,8 @@ void BrowserOptionsHandler::ShowCloudPrintDevicesPage(const ListValue* args) {
#endif
#if defined(ENABLE_FULL_PRINTING)
-void BrowserOptionsHandler::ShowCloudPrintManagePage(const ListValue* args) {
+void BrowserOptionsHandler::ShowCloudPrintManagePage(
+ const base::ListValue* args) {
content::RecordAction(UserMetricsAction("Options_ManageCloudPrinters"));
// Open a new tab in the current window for the management page.
Profile* profile = Profile::FromWebUI(web_ui());
@@ -1416,7 +1425,8 @@ void BrowserOptionsHandler::ShowCloudPrintManagePage(const ListValue* args) {
}
#if !defined(OS_CHROMEOS)
-void BrowserOptionsHandler::ShowCloudPrintSetupDialog(const ListValue* args) {
+void BrowserOptionsHandler::ShowCloudPrintSetupDialog(
+ const base::ListValue* args) {
content::RecordAction(UserMetricsAction("Options_EnableCloudPrintProxy"));
// Open the connector enable page in the current tab.
Profile* profile = Profile::FromWebUI(web_ui());
@@ -1428,7 +1438,7 @@ void BrowserOptionsHandler::ShowCloudPrintSetupDialog(const ListValue* args) {
}
void BrowserOptionsHandler::HandleDisableCloudPrintConnector(
- const ListValue* args) {
+ const base::ListValue* args) {
content::RecordAction(
UserMetricsAction("Options_DisableCloudPrintProxy"));
CloudPrintProxyServiceFactory::GetForProfile(Profile::FromWebUI(web_ui()))->
@@ -1472,7 +1482,7 @@ void BrowserOptionsHandler::SetupCloudPrintConnectorSection() {
l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT),
UTF8ToUTF16(email));
}
- StringValue label(label_str);
+ base::StringValue label(label_str);
web_ui()->CallJavascriptFunction(
"BrowserOptions.setupCloudPrintConnectorSection", disabled, label,
@@ -1488,12 +1498,12 @@ void BrowserOptionsHandler::RemoveCloudPrintConnectorSection() {
#if defined(OS_CHROMEOS)
void BrowserOptionsHandler::HandleOpenWallpaperManager(
- const ListValue* args) {
+ const base::ListValue* args) {
wallpaper_manager_util::OpenWallpaperManager();
}
void BrowserOptionsHandler::VirtualKeyboardChangeCallback(
- const ListValue* args) {
+ const base::ListValue* args) {
bool enabled = false;
args->GetBoolean(0, &enabled);
@@ -1502,7 +1512,8 @@ void BrowserOptionsHandler::VirtualKeyboardChangeCallback(
#if defined(OS_CHROMEOS)
-void BrowserOptionsHandler::PerformFactoryResetRestart(const ListValue* args) {
+void BrowserOptionsHandler::PerformFactoryResetRestart(
+ const base::ListValue* args) {
if (g_browser_process->browser_policy_connector()->IsEnterpriseManaged())
return;
@@ -1553,7 +1564,7 @@ void BrowserOptionsHandler::SetupFontSizeSelector() {
const PrefService::Preference* default_fixed_font_size =
pref_service->FindPreference(prefs::kWebKitDefaultFixedFontSize);
- DictionaryValue dict;
+ base::DictionaryValue dict;
dict.SetInteger("value",
pref_service->GetInteger(prefs::kWebKitDefaultFontSize));
@@ -1595,10 +1606,10 @@ void BrowserOptionsHandler::SetupPageZoomSelector() {
// 1. Title (string).
// 2. Value (double).
// 3. Is selected? (bool).
- ListValue zoom_factors_value;
+ base::ListValue zoom_factors_value;
for (std::vector<double>::const_iterator i = zoom_factors.begin();
i != zoom_factors.end(); ++i) {
- ListValue* option = new ListValue();
+ base::ListValue* option = new base::ListValue();
double factor = *i;
int percent = static_cast<int>(factor * 100 + 0.5);
option->Append(new base::StringValue(
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.h b/chrome/browser/ui/webui/options/browser_options_handler.h
index b75a0aa..5ac4cc1 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.h
+++ b/chrome/browser/ui/webui/options/browser_options_handler.h
@@ -58,7 +58,7 @@ class BrowserOptionsHandler
virtual ~BrowserOptionsHandler();
// OptionsPageUIHandler implementation.
- virtual void GetLocalizedValues(DictionaryValue* values) OVERRIDE;
+ virtual void GetLocalizedValues(base::DictionaryValue* values) OVERRIDE;
virtual void PageLoadStarted() OVERRIDE;
virtual void InitializeHandler() OVERRIDE;
virtual void InitializePage() OVERRIDE;
@@ -149,7 +149,7 @@ class BrowserOptionsHandler
// filePath: "/path/to/profile/data/on/disk",
// isCurrentProfile: false
// };
- scoped_ptr<ListValue> GetProfilesInfoList();
+ scoped_ptr<base::ListValue> GetProfilesInfoList();
// Sends an array of Profile objects to javascript.
void SendProfilesInfo();
@@ -175,68 +175,68 @@ class BrowserOptionsHandler
// Callback for the "selectDownloadLocation" message. This will prompt the
// user for a destination folder using platform-specific APIs.
- void HandleSelectDownloadLocation(const ListValue* args);
+ void HandleSelectDownloadLocation(const base::ListValue* args);
// Callback for the "autoOpenFileTypesResetToDefault" message. This will
// remove all auto-open file-type settings.
- void HandleAutoOpenButton(const ListValue* args);
+ void HandleAutoOpenButton(const base::ListValue* args);
// Callback for the "defaultFontSizeAction" message. This is called if the
// user changes the default font size. |args| is an array that contains
// one item, the font size as a numeric value.
- void HandleDefaultFontSize(const ListValue* args);
+ void HandleDefaultFontSize(const base::ListValue* args);
// Callback for the "defaultZoomFactorAction" message. This is called if the
// user changes the default zoom factor. |args| is an array that contains
// one item, the zoom factor as a numeric value.
- void HandleDefaultZoomFactor(const ListValue* args);
+ void HandleDefaultZoomFactor(const base::ListValue* args);
// Callback for the "Use SSL 3.0" checkbox. This is called if the user toggles
// the "Use SSL 3.0" checkbox.
- void HandleUseSSL3Checkbox(const ListValue* args);
+ void HandleUseSSL3Checkbox(const base::ListValue* args);
// Callback for the "Use TLS 1.0" checkbox. This is called if the user toggles
// the "Use TLS 1.0" checkbox.
- void HandleUseTLS1Checkbox(const ListValue* args);
+ void HandleUseTLS1Checkbox(const base::ListValue* args);
// Callback for the "restartBrowser" message. Restores all tabs on restart.
- void HandleRestartBrowser(const ListValue* args);
+ void HandleRestartBrowser(const base::ListValue* args);
// Callback for "requestProfilesInfo" message.
- void HandleRequestProfilesInfo(const ListValue* args);
+ void HandleRequestProfilesInfo(const base::ListValue* args);
#if !defined(OS_CHROMEOS)
// Callback for the "showNetworkProxySettings" message. This will invoke
// an appropriate dialog for configuring proxy settings.
- void ShowNetworkProxySettings(const ListValue* args);
+ void ShowNetworkProxySettings(const base::ListValue* args);
#endif
#if !defined(USE_NSS)
// Callback for the "showManageSSLCertificates" message. This will invoke
// an appropriate certificate management action based on the platform.
- void ShowManageSSLCertificates(const ListValue* args);
+ void ShowManageSSLCertificates(const base::ListValue* args);
#endif
#if defined(ENABLE_MDNS)
- void ShowCloudPrintDevicesPage(const ListValue* args);
+ void ShowCloudPrintDevicesPage(const base::ListValue* args);
#endif
#if defined(ENABLE_FULL_PRINTING)
// Callback for the Cloud Print manage button. This will open a new
// tab pointed at the management URL.
- void ShowCloudPrintManagePage(const ListValue* args);
+ void ShowCloudPrintManagePage(const base::ListValue* args);
// Register localized values used by Cloud Print
- void RegisterCloudPrintValues(DictionaryValue* values);
+ void RegisterCloudPrintValues(base::DictionaryValue* values);
#if !defined(OS_CHROMEOS)
// Callback for the Sign in to Cloud Print button. This will start
// the authentication process.
- void ShowCloudPrintSetupDialog(const ListValue* args);
+ void ShowCloudPrintSetupDialog(const base::ListValue* args);
// Callback for the Disable Cloud Print button. This will sign out
// of cloud print.
- void HandleDisableCloudPrintConnector(const ListValue* args);
+ void HandleDisableCloudPrintConnector(const base::ListValue* args);
// Pings the service to send us it's current notion of the enabled state.
void RefreshCloudPrintStatusFromService();
@@ -296,7 +296,7 @@ class BrowserOptionsHandler
// Returns a newly created dictionary with a number of properties that
// correspond to the status of sync.
- scoped_ptr<DictionaryValue> GetSyncStateDictionary();
+ scoped_ptr<base::DictionaryValue> GetSyncStateDictionary();
scoped_refptr<ShellIntegration::DefaultBrowserWorker> default_browser_worker_;
diff --git a/chrome/browser/ui/webui/options/certificate_manager_browsertest.cc b/chrome/browser/ui/webui/options/certificate_manager_browsertest.cc
index d0fab46..de5fea0 100644
--- a/chrome/browser/ui/webui/options/certificate_manager_browsertest.cc
+++ b/chrome/browser/ui/webui/options/certificate_manager_browsertest.cc
@@ -84,7 +84,7 @@ class CertificateManagerBrowserTest : public options::OptionsUIBrowserTest {
policy.Set(policy::key::kOpenNetworkConfiguration,
policy::POLICY_LEVEL_MANDATORY,
policy::POLICY_SCOPE_USER,
- Value::CreateStringValue(user_policy_blob),
+ base::Value::CreateStringValue(user_policy_blob),
NULL);
provider_.UpdateChromePolicy(policy);
content::RunAllPendingInMessageLoop();
diff --git a/chrome/browser/ui/webui/options/certificate_manager_handler.cc b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
index 5a94a30..1077463 100644
--- a/chrome/browser/ui/webui/options/certificate_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
@@ -65,7 +65,7 @@ std::string OrgNameToId(const std::string& org) {
return "org-" + org;
}
-bool CallbackArgsToBool(const ListValue* args, int index, bool* result) {
+bool CallbackArgsToBool(const base::ListValue* args, int index, bool* result) {
std::string string_value;
if (!args->GetString(index, &string_value))
return false;
@@ -79,12 +79,14 @@ struct DictionaryIdComparator {
: collator_(collator) {
}
- bool operator()(const Value* a,
- const Value* b) const {
- DCHECK(a->GetType() == Value::TYPE_DICTIONARY);
- DCHECK(b->GetType() == Value::TYPE_DICTIONARY);
- const DictionaryValue* a_dict = reinterpret_cast<const DictionaryValue*>(a);
- const DictionaryValue* b_dict = reinterpret_cast<const DictionaryValue*>(b);
+ bool operator()(const base::Value* a,
+ const base::Value* b) const {
+ DCHECK(a->GetType() == base::Value::TYPE_DICTIONARY);
+ DCHECK(b->GetType() == base::Value::TYPE_DICTIONARY);
+ const base::DictionaryValue* a_dict =
+ reinterpret_cast<const base::DictionaryValue*>(a);
+ const base::DictionaryValue* b_dict =
+ reinterpret_cast<const base::DictionaryValue*>(b);
base::string16 a_str;
base::string16 b_str;
a_dict->GetString(kNameId, &a_str);
@@ -175,7 +177,7 @@ net::X509Certificate* CertIdMap::IdToCert(const std::string& id) {
}
net::X509Certificate* CertIdMap::CallbackArgsToCert(
- const ListValue* args) {
+ const base::ListValue* args) {
std::string node_id;
if (!args->GetString(0, &node_id))
return NULL;
@@ -298,7 +300,7 @@ CertificateManagerHandler::~CertificateManagerHandler() {
}
void CertificateManagerHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
RegisterTitle(localized_strings, "certificateManagerPage",
@@ -531,14 +533,14 @@ void CertificateManagerHandler::FileSelectionCanceled(void* params) {
}
}
-void CertificateManagerHandler::View(const ListValue* args) {
+void CertificateManagerHandler::View(const base::ListValue* args) {
net::X509Certificate* cert = cert_id_map_->CallbackArgsToCert(args);
if (!cert)
return;
ShowCertificateViewer(web_ui()->GetWebContents(), GetParentWindow(), cert);
}
-void CertificateManagerHandler::GetCATrust(const ListValue* args) {
+void CertificateManagerHandler::GetCATrust(const base::ListValue* args) {
net::X509Certificate* cert = cert_id_map_->CallbackArgsToCert(args);
if (!cert) {
web_ui()->CallJavascriptFunction("CertificateEditCaTrustOverlay.dismiss");
@@ -558,7 +560,7 @@ void CertificateManagerHandler::GetCATrust(const ListValue* args) {
ssl_value, email_value, obj_sign_value);
}
-void CertificateManagerHandler::EditCATrust(const ListValue* args) {
+void CertificateManagerHandler::EditCATrust(const base::ListValue* args) {
net::X509Certificate* cert = cert_id_map_->CallbackArgsToCert(args);
bool fail = !cert;
bool trust_ssl = false;
@@ -588,11 +590,11 @@ void CertificateManagerHandler::EditCATrust(const ListValue* args) {
}
}
-void CertificateManagerHandler::EditServer(const ListValue* args) {
+void CertificateManagerHandler::EditServer(const base::ListValue* args) {
NOTIMPLEMENTED();
}
-void CertificateManagerHandler::ExportPersonal(const ListValue* args) {
+void CertificateManagerHandler::ExportPersonal(const base::ListValue* args) {
net::X509Certificate* cert = cert_id_map_->CallbackArgsToCert(args);
if (!cert)
return;
@@ -614,7 +616,7 @@ void CertificateManagerHandler::ExportPersonal(const ListValue* args) {
reinterpret_cast<void*>(EXPORT_PERSONAL_FILE_SELECTED));
}
-void CertificateManagerHandler::ExportAllPersonal(const ListValue* args) {
+void CertificateManagerHandler::ExportAllPersonal(const base::ListValue* args) {
NOTIMPLEMENTED();
}
@@ -626,7 +628,7 @@ void CertificateManagerHandler::ExportPersonalFileSelected(
}
void CertificateManagerHandler::ExportPersonalPasswordSelected(
- const ListValue* args) {
+ const base::ListValue* args) {
if (!args->GetString(0, &password_)) {
web_ui()->CallJavascriptFunction("CertificateRestoreOverlay.dismiss");
ImportExportCleanup();
@@ -682,7 +684,8 @@ void CertificateManagerHandler::ExportPersonalFileWritten(
}
}
-void CertificateManagerHandler::StartImportPersonal(const ListValue* args) {
+void CertificateManagerHandler::StartImportPersonal(
+ const base::ListValue* args) {
ui::SelectFileDialog::FileTypeInfo file_type_info;
if (!args->GetBoolean(0, &use_hardware_backed_)) {
// Unable to retrieve the hardware backed attribute from the args,
@@ -713,7 +716,7 @@ void CertificateManagerHandler::ImportPersonalFileSelected(
}
void CertificateManagerHandler::ImportPersonalPasswordSelected(
- const ListValue* args) {
+ const base::ListValue* args) {
if (!args->GetString(0, &password_)) {
web_ui()->CallJavascriptFunction("CertificateRestoreOverlay.dismiss");
ImportExportCleanup();
@@ -795,7 +798,7 @@ void CertificateManagerHandler::ImportPersonalSlotUnlocked() {
}
void CertificateManagerHandler::CancelImportExportProcess(
- const ListValue* args) {
+ const base::ListValue* args) {
ImportExportCleanup();
}
@@ -814,7 +817,7 @@ void CertificateManagerHandler::ImportExportCleanup() {
select_file_dialog_ = NULL;
}
-void CertificateManagerHandler::ImportServer(const ListValue* args) {
+void CertificateManagerHandler::ImportServer(const base::ListValue* args) {
select_file_dialog_ = ui::SelectFileDialog::Create(
this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
ShowCertSelectFileDialog(
@@ -874,7 +877,7 @@ void CertificateManagerHandler::ImportServerFileRead(const int* read_errno,
ImportExportCleanup();
}
-void CertificateManagerHandler::ImportCA(const ListValue* args) {
+void CertificateManagerHandler::ImportCA(const base::ListValue* args) {
select_file_dialog_ = ui::SelectFileDialog::Create(
this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
ShowCertSelectFileDialog(select_file_dialog_.get(),
@@ -921,12 +924,13 @@ void CertificateManagerHandler::ImportCAFileRead(const int* read_errno,
// TODO(mattm): check here if root_cert is not a CA cert and show error.
- StringValue cert_name(root_cert->subject().GetDisplayName());
+ base::StringValue cert_name(root_cert->subject().GetDisplayName());
web_ui()->CallJavascriptFunction("CertificateEditCaTrustOverlay.showImport",
cert_name);
}
-void CertificateManagerHandler::ImportCATrustSelected(const ListValue* args) {
+void CertificateManagerHandler::ImportCATrustSelected(
+ const base::ListValue* args) {
bool fail = false;
bool trust_ssl = false;
bool trust_email = false;
@@ -963,7 +967,7 @@ void CertificateManagerHandler::ImportCATrustSelected(const ListValue* args) {
ImportExportCleanup();
}
-void CertificateManagerHandler::Export(const ListValue* args) {
+void CertificateManagerHandler::Export(const base::ListValue* args) {
net::X509Certificate* cert = cert_id_map_->CallbackArgsToCert(args);
if (!cert)
return;
@@ -971,7 +975,7 @@ void CertificateManagerHandler::Export(const ListValue* args) {
cert->os_cert_handle());
}
-void CertificateManagerHandler::Delete(const ListValue* args) {
+void CertificateManagerHandler::Delete(const base::ListValue* args) {
net::X509Certificate* cert = cert_id_map_->CallbackArgsToCert(args);
if (!cert)
return;
@@ -984,7 +988,7 @@ void CertificateManagerHandler::Delete(const ListValue* args) {
}
}
-void CertificateManagerHandler::Populate(const ListValue* args) {
+void CertificateManagerHandler::Populate(const base::ListValue* args) {
certificate_manager_model_->Refresh();
}
@@ -1008,19 +1012,19 @@ void CertificateManagerHandler::PopulateTree(
certificate_manager_model_->FilterAndBuildOrgGroupingMap(type, &map);
{
- ListValue* nodes = new ListValue;
+ base::ListValue* nodes = new base::ListValue;
for (CertificateManagerModel::OrgGroupingMap::iterator i = map.begin();
i != map.end(); ++i) {
// Populate first level (org name).
- DictionaryValue* dict = new DictionaryValue;
+ base::DictionaryValue* dict = new base::DictionaryValue;
dict->SetString(kKeyId, OrgNameToId(i->first));
dict->SetString(kNameId, i->first);
// Populate second level (certs).
- ListValue* subnodes = new ListValue;
+ base::ListValue* subnodes = new base::ListValue;
for (net::CertificateList::const_iterator org_cert_it = i->second.begin();
org_cert_it != i->second.end(); ++org_cert_it) {
- DictionaryValue* cert_dict = new DictionaryValue;
+ base::DictionaryValue* cert_dict = new base::DictionaryValue;
net::X509Certificate* cert = org_cert_it->get();
cert_dict->SetString(kKeyId, cert_id_map_->CertToId(cert));
cert_dict->SetString(kNameId, certificate_manager_model_->GetColumnText(
@@ -1052,7 +1056,7 @@ void CertificateManagerHandler::PopulateTree(
}
std::sort(nodes->begin(), nodes->end(), comparator);
- ListValue args;
+ base::ListValue args;
args.Append(new base::StringValue(tree_name));
args.Append(nodes);
web_ui()->CallJavascriptFunction("CertificateManager.onPopulateTree", args);
@@ -1061,13 +1065,13 @@ void CertificateManagerHandler::PopulateTree(
void CertificateManagerHandler::ShowError(const std::string& title,
const std::string& error) const {
- ScopedVector<const Value> args;
+ ScopedVector<const base::Value> args;
args.push_back(new base::StringValue(title));
args.push_back(new base::StringValue(error));
args.push_back(new base::StringValue(l10n_util::GetStringUTF8(IDS_OK)));
- args.push_back(Value::CreateNullValue()); // cancelTitle
- args.push_back(Value::CreateNullValue()); // okCallback
- args.push_back(Value::CreateNullValue()); // cancelCallback
+ args.push_back(base::Value::CreateNullValue()); // cancelTitle
+ args.push_back(base::Value::CreateNullValue()); // okCallback
+ args.push_back(base::Value::CreateNullValue()); // cancelCallback
web_ui()->CallJavascriptFunction("AlertOverlay.show", args.get());
}
@@ -1083,17 +1087,17 @@ void CertificateManagerHandler::ShowImportErrors(
else
error = l10n_util::GetStringUTF8(IDS_CERT_MANAGER_IMPORT_SOME_NOT_IMPORTED);
- ListValue cert_error_list;
+ base::ListValue cert_error_list;
for (size_t i = 0; i < not_imported.size(); ++i) {
const net::NSSCertDatabase::ImportCertFailure& failure = not_imported[i];
- DictionaryValue* dict = new DictionaryValue;
+ base::DictionaryValue* dict = new base::DictionaryValue;
dict->SetString(kNameId, failure.certificate->subject().GetDisplayName());
dict->SetString(kErrorId, NetErrorToString(failure.net_error));
cert_error_list.Append(dict);
}
- StringValue title_value(title);
- StringValue error_value(error);
+ base::StringValue title_value(title);
+ base::StringValue error_value(error);
web_ui()->CallJavascriptFunction("CertificateImportErrorOverlay.show",
title_value,
error_value,
@@ -1101,7 +1105,8 @@ void CertificateManagerHandler::ShowImportErrors(
}
#if defined(OS_CHROMEOS)
-void CertificateManagerHandler::CheckTpmTokenReady(const ListValue* args) {
+void CertificateManagerHandler::CheckTpmTokenReady(
+ const base::ListValue* args) {
chromeos::CryptohomeClient* cryptohome_client =
chromeos::DBusThreadManager::Get()->GetCryptohomeClient();
cryptohome_client->Pkcs11IsTpmTokenReady(
diff --git a/chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc
index 3b26378..2b19f2f 100644
--- a/chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc
@@ -74,7 +74,7 @@ BluetoothOptionsHandler::~BluetoothOptionsHandler() {
}
void BluetoothOptionsHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
static OptionsStringResource resources[] = {
@@ -218,7 +218,7 @@ void BluetoothOptionsHandler::InitializeAdapter(
}
void BluetoothOptionsHandler::EnableChangeCallback(
- const ListValue* args) {
+ const base::ListValue* args) {
bool bluetooth_enabled;
args->GetBoolean(0, &bluetooth_enabled);
@@ -234,7 +234,7 @@ void BluetoothOptionsHandler::EnableChangeError() {
}
void BluetoothOptionsHandler::FindDevicesCallback(
- const ListValue* args) {
+ const base::ListValue* args) {
if (!discovering_) {
discovering_ = true;
adapter_->StartDiscovering(
@@ -250,7 +250,7 @@ void BluetoothOptionsHandler::FindDevicesError() {
}
void BluetoothOptionsHandler::UpdateDeviceCallback(
- const ListValue* args) {
+ const base::ListValue* args) {
std::string address;
args->GetString(kUpdateDeviceAddressIndex, &address);
@@ -400,7 +400,7 @@ void BluetoothOptionsHandler::ForgetError(const std::string& address) {
}
void BluetoothOptionsHandler::StopDiscoveryCallback(
- const ListValue* args) {
+ const base::ListValue* args) {
if (discovering_) {
adapter_->StopDiscovering(
base::Bind(&base::DoNothing),
@@ -416,7 +416,7 @@ void BluetoothOptionsHandler::StopDiscoveryError() {
}
void BluetoothOptionsHandler::GetPairedDevicesCallback(
- const ListValue* args) {
+ const base::ListValue* args) {
device::BluetoothAdapter::DeviceList devices = adapter_->GetDevices();
for (device::BluetoothAdapter::DeviceList::iterator iter = devices.begin();
@@ -471,20 +471,20 @@ void BluetoothOptionsHandler::SendDeviceNotification(
}
void BluetoothOptionsHandler::RequestPinCode(device::BluetoothDevice* device) {
- DictionaryValue params;
+ base::DictionaryValue params;
params.SetString("pairing", kEnterPinCode);
SendDeviceNotification(device, &params);
}
void BluetoothOptionsHandler::RequestPasskey(device::BluetoothDevice* device) {
- DictionaryValue params;
+ base::DictionaryValue params;
params.SetString("pairing", kEnterPasskey);
SendDeviceNotification(device, &params);
}
void BluetoothOptionsHandler::DisplayPinCode(device::BluetoothDevice* device,
const std::string& pincode) {
- DictionaryValue params;
+ base::DictionaryValue params;
params.SetString("pairing", kRemotePinCode);
params.SetString("pincode", pincode);
SendDeviceNotification(device, &params);
@@ -492,7 +492,7 @@ void BluetoothOptionsHandler::DisplayPinCode(device::BluetoothDevice* device,
void BluetoothOptionsHandler::DisplayPasskey(device::BluetoothDevice* device,
uint32 passkey) {
- DictionaryValue params;
+ base::DictionaryValue params;
params.SetString("pairing", kRemotePasskey);
params.SetInteger("passkey", passkey);
SendDeviceNotification(device, &params);
@@ -500,14 +500,14 @@ void BluetoothOptionsHandler::DisplayPasskey(device::BluetoothDevice* device,
void BluetoothOptionsHandler::KeysEntered(device::BluetoothDevice* device,
uint32 entered) {
- DictionaryValue params;
+ base::DictionaryValue params;
params.SetInteger("entered", entered);
SendDeviceNotification(device, &params);
}
void BluetoothOptionsHandler::ConfirmPasskey(device::BluetoothDevice* device,
uint32 passkey) {
- DictionaryValue params;
+ base::DictionaryValue params;
params.SetString("pairing", kConfirmPasskey);
params.SetInteger("passkey", passkey);
SendDeviceNotification(device, &params);
@@ -573,7 +573,7 @@ void BluetoothOptionsHandler::DeviceRemoved(device::BluetoothAdapter* adapter,
void BluetoothOptionsHandler::DeviceConnecting(
device::BluetoothDevice* device) {
DCHECK(device);
- DictionaryValue params;
+ base::DictionaryValue params;
params.SetString("pairing", kStartConnecting);
SendDeviceNotification(device, &params);
}
diff --git a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc
index ab9f883..e800749 100644
--- a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc
@@ -92,7 +92,7 @@ ChangePictureOptionsHandler::~ChangePictureOptionsHandler() {
}
void ChangePictureOptionsHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
localized_strings->SetString("changePicturePage",
l10n_util::GetStringUTF16(IDS_OPTIONS_CHANGE_PICTURE_DIALOG_TITLE));
@@ -155,7 +155,8 @@ void ChangePictureOptionsHandler::SendDefaultImages() {
image_urls);
}
-void ChangePictureOptionsHandler::HandleChooseFile(const ListValue* args) {
+void ChangePictureOptionsHandler::HandleChooseFile(
+ const base::ListValue* args) {
DCHECK(args && args->empty());
select_file_dialog_ = ui::SelectFileDialog::Create(
this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
@@ -286,7 +287,8 @@ void ChangePictureOptionsHandler::SendOldImage(const std::string& image_url) {
web_ui()->CallJavascriptFunction("ChangePictureOptions.setOldImage", url);
}
-void ChangePictureOptionsHandler::HandleSelectImage(const ListValue* args) {
+void ChangePictureOptionsHandler::HandleSelectImage(
+ const base::ListValue* args) {
std::string image_url;
std::string image_type;
if (!args ||
diff --git a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
index b65a1b9..b205c9b 100644
--- a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
@@ -54,7 +54,7 @@ bool IsLoggedInOwner(const std::string& username) {
base::DictionaryValue* CreateUserInfo(const std::string& username,
const std::string& display_email,
const std::string& display_name) {
- base::DictionaryValue* user_dict = new DictionaryValue;
+ base::DictionaryValue* user_dict = new base::DictionaryValue;
user_dict->SetString("username", username);
user_dict->SetString("name", display_email);
user_dict->SetString("email", display_name);
@@ -145,7 +145,7 @@ base::Value* CoreChromeOSOptionsHandler::FetchPref(
// Decorate pref value as CoreOptionsHandler::CreateValueForPref() does.
// TODO(estade): seems that this should replicate CreateValueForPref less.
- DictionaryValue* dict = new DictionaryValue;
+ base::DictionaryValue* dict = new base::DictionaryValue;
if (pref_name == kAccountsPrefUsers)
dict->Set("value", CreateUsersWhitelist(pref_value));
else
@@ -208,7 +208,7 @@ void CoreChromeOSOptionsHandler::StopObservingPref(const std::string& path) {
}
void CoreChromeOSOptionsHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
CoreOptionsHandler::GetLocalizedValues(localized_strings);
diff --git a/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc
index 197a60f..82c7450 100644
--- a/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc
@@ -64,7 +64,7 @@ CrosLanguageOptionsHandler::~CrosLanguageOptionsHandler() {
}
void CrosLanguageOptionsHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
::options::LanguageOptionsHandlerCommon::GetLocalizedValues(
localized_strings);
@@ -127,7 +127,7 @@ void CrosLanguageOptionsHandler::GetLocalizedValues(
// If component extension IME manager is not ready for use, it will be
// added in |InitializePage()|.
localized_strings->Set("componentExtensionImeList",
- new ListValue());
+ new base::ListValue());
}
}
@@ -148,12 +148,12 @@ void CrosLanguageOptionsHandler::RegisterMessages() {
base::Unretained(this)));
}
-ListValue* CrosLanguageOptionsHandler::GetInputMethodList(
+base::ListValue* CrosLanguageOptionsHandler::GetInputMethodList(
const input_method::InputMethodDescriptors& descriptors) {
input_method::InputMethodManager* manager =
input_method::InputMethodManager::Get();
- ListValue* input_method_list = new ListValue();
+ base::ListValue* input_method_list = new base::ListValue();
for (size_t i = 0; i < descriptors.size(); ++i) {
const input_method::InputMethodDescriptor& descriptor =
@@ -161,13 +161,13 @@ ListValue* CrosLanguageOptionsHandler::GetInputMethodList(
const std::string display_name =
manager->GetInputMethodUtil()->GetInputMethodDisplayNameFromId(
descriptor.id());
- DictionaryValue* dictionary = new DictionaryValue();
+ base::DictionaryValue* dictionary = new base::DictionaryValue();
dictionary->SetString("id", descriptor.id());
dictionary->SetString("displayName", display_name);
// One input method can be associated with multiple languages, hence
// we use a dictionary here.
- DictionaryValue* languages = new DictionaryValue();
+ base::DictionaryValue* languages = new base::DictionaryValue();
for (size_t i = 0; i < descriptor.language_codes().size(); ++i) {
languages->SetBoolean(descriptor.language_codes().at(i), true);
}
@@ -180,7 +180,7 @@ ListValue* CrosLanguageOptionsHandler::GetInputMethodList(
}
// static
-ListValue* CrosLanguageOptionsHandler::GetLanguageListInternal(
+base::ListValue* CrosLanguageOptionsHandler::GetLanguageListInternal(
const input_method::InputMethodDescriptors& descriptors,
const std::vector<std::string>& base_language_codes) {
const std::string app_locale = g_browser_process->GetApplicationLocale();
@@ -253,7 +253,7 @@ ListValue* CrosLanguageOptionsHandler::GetLanguageListInternal(
l10n_util::SortStrings16(app_locale, &display_names);
// Build the language list from the language map.
- ListValue* language_list = new ListValue();
+ base::ListValue* language_list = new base::ListValue();
for (size_t i = 0; i < display_names.size(); ++i) {
// Sets the directionality of the display language name.
base::string16 display_name(display_names[i]);
@@ -264,7 +264,7 @@ ListValue* CrosLanguageOptionsHandler::GetLanguageListInternal(
std::string directionality = has_rtl_chars ? "rtl" : "ltr";
const LanguagePair& pair = language_map[display_names[i]];
- DictionaryValue* dictionary = new DictionaryValue();
+ base::DictionaryValue* dictionary = new base::DictionaryValue();
dictionary->SetString("code", pair.first);
dictionary->SetString("displayName", display_names[i]);
dictionary->SetString("textDirection", directionality);
@@ -295,14 +295,15 @@ base::ListValue* CrosLanguageOptionsHandler::GetUILanguageList(
base::ListValue*
CrosLanguageOptionsHandler::ConvertInputMethodDescriptosToIMEList(
const input_method::InputMethodDescriptors& descriptors) {
- scoped_ptr<ListValue> ime_ids_list(new ListValue());
+ scoped_ptr<base::ListValue> ime_ids_list(new base::ListValue());
for (size_t i = 0; i < descriptors.size(); ++i) {
const input_method::InputMethodDescriptor& descriptor = descriptors[i];
- scoped_ptr<DictionaryValue> dictionary(new DictionaryValue());
+ scoped_ptr<base::DictionaryValue> dictionary(new base::DictionaryValue());
dictionary->SetString("id", descriptor.id());
dictionary->SetString("displayName", descriptor.name());
dictionary->SetString("optionsPage", descriptor.options_page_url().spec());
- scoped_ptr<DictionaryValue> language_codes(new DictionaryValue());
+ scoped_ptr<base::DictionaryValue> language_codes(
+ new base::DictionaryValue());
for (size_t i = 0; i < descriptor.language_codes().size(); ++i)
language_codes->SetBoolean(descriptor.language_codes().at(i), true);
dictionary->Set("languageCodeSet", language_codes.release());
@@ -321,13 +322,13 @@ void CrosLanguageOptionsHandler::SetApplicationLocale(
language_code, Profile::APP_LOCALE_CHANGED_VIA_SETTINGS);
}
-void CrosLanguageOptionsHandler::RestartCallback(const ListValue* args) {
+void CrosLanguageOptionsHandler::RestartCallback(const base::ListValue* args) {
content::RecordAction(UserMetricsAction("LanguageOptions_SignOut"));
chrome::AttemptUserExit();
}
void CrosLanguageOptionsHandler::InputMethodDisableCallback(
- const ListValue* args) {
+ const base::ListValue* args) {
const std::string input_method_id = UTF16ToASCII(ExtractStringValue(args));
const std::string action = base::StringPrintf(
"LanguageOptions_DisableInputMethod_%s", input_method_id.c_str());
@@ -335,7 +336,7 @@ void CrosLanguageOptionsHandler::InputMethodDisableCallback(
}
void CrosLanguageOptionsHandler::InputMethodEnableCallback(
- const ListValue* args) {
+ const base::ListValue* args) {
const std::string input_method_id = UTF16ToASCII(ExtractStringValue(args));
const std::string action = base::StringPrintf(
"LanguageOptions_EnableInputMethod_%s", input_method_id.c_str());
@@ -343,7 +344,7 @@ void CrosLanguageOptionsHandler::InputMethodEnableCallback(
}
void CrosLanguageOptionsHandler::InputMethodOptionsOpenCallback(
- const ListValue* args) {
+ const base::ListValue* args) {
const std::string input_method_id = UTF16ToASCII(ExtractStringValue(args));
const std::string action = base::StringPrintf(
"InputMethodOptions_Open_%s", input_method_id.c_str());
@@ -377,7 +378,7 @@ void CrosLanguageOptionsHandler::OnInitialized() {
->GetComponentExtensionIMEManager();
DCHECK(manager->IsInitialized());
- scoped_ptr<ListValue> ime_list(
+ scoped_ptr<base::ListValue> ime_list(
ConvertInputMethodDescriptosToIMEList(
manager->GetAllIMEAsInputMethodDescriptor()));
web_ui()->CallJavascriptFunction(
@@ -400,7 +401,7 @@ void CrosLanguageOptionsHandler::InitializePage() {
return;
}
- scoped_ptr<ListValue> ime_list(
+ scoped_ptr<base::ListValue> ime_list(
ConvertInputMethodDescriptosToIMEList(
component_extension_manager->GetAllIMEAsInputMethodDescriptor()));
web_ui()->CallJavascriptFunction(
diff --git a/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler_unittest.cc b/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler_unittest.cc
index e47d7c7c..3173a88 100644
--- a/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler_unittest.cc
+++ b/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler_unittest.cc
@@ -55,13 +55,13 @@ class CrosLanguageOptionsHandlerTest : public testing::Test {
TEST_F(CrosLanguageOptionsHandlerTest, GetInputMethodList) {
InputMethodDescriptors descriptors = CreateInputMethodDescriptors();
- scoped_ptr<ListValue> list(
+ scoped_ptr<base::ListValue> list(
chromeos::options::CrosLanguageOptionsHandler::GetInputMethodList(
descriptors));
ASSERT_EQ(4U, list->GetSize());
- DictionaryValue* entry = NULL;
- DictionaryValue *language_code_set = NULL;
+ base::DictionaryValue* entry = NULL;
+ base::DictionaryValue *language_code_set = NULL;
std::string input_method_id;
std::string display_name;
std::string language_code;
@@ -108,7 +108,7 @@ TEST_F(CrosLanguageOptionsHandlerTest, GetInputMethodList) {
TEST_F(CrosLanguageOptionsHandlerTest, GetUILanguageList) {
InputMethodDescriptors descriptors = CreateInputMethodDescriptors();
- scoped_ptr<ListValue> list(
+ scoped_ptr<base::ListValue> list(
chromeos::options::CrosLanguageOptionsHandler::GetUILanguageList(
descriptors));
diff --git a/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
index 639d60a..2cb5bd3 100644
--- a/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
@@ -71,7 +71,7 @@ DisplayOptionsHandler::~DisplayOptionsHandler() {
}
void DisplayOptionsHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
RegisterTitle(localized_strings, "displayOptionsPage",
IDS_OPTIONS_SETTINGS_DISPLAY_OPTIONS_TAB_TITLE);
diff --git a/chrome/browser/ui/webui/options/chromeos/display_overscan_handler.cc b/chrome/browser/ui/webui/options/chromeos/display_overscan_handler.cc
index fc1706b..a6f0948 100644
--- a/chrome/browser/ui/webui/options/chromeos/display_overscan_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/display_overscan_handler.cc
@@ -38,7 +38,7 @@ DisplayOverscanHandler::~DisplayOverscanHandler() {
}
void DisplayOverscanHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
RegisterTitle(localized_strings, "displayOverscanPage",
IDS_OPTIONS_SETTINGS_DISPLAY_OVERSCAN_TAB_TITLE);
localized_strings->SetString("shrinkAndExpand", l10n_util::GetStringUTF16(
diff --git a/chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc b/chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc
index 6aa795c9..ef336c9 100644
--- a/chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc
@@ -49,7 +49,8 @@ KeyboardHandler::KeyboardHandler() {
KeyboardHandler::~KeyboardHandler() {
}
-void KeyboardHandler::GetLocalizedValues(DictionaryValue* localized_strings) {
+void KeyboardHandler::GetLocalizedValues(
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
localized_strings->SetString("keyboardOverlayTitle",
@@ -80,7 +81,7 @@ void KeyboardHandler::GetLocalizedValues(DictionaryValue* localized_strings) {
IDS_OPTIONS_SETTINGS_CHANGE_LANGUAGE_AND_INPUT_SETTINGS));
for (size_t i = 0; i < arraysize(kDataValuesNames); ++i) {
- ListValue* list_value = new ListValue();
+ base::ListValue* list_value = new base::ListValue();
for (size_t j = 0; j < arraysize(kModifierKeysSelectItems); ++j) {
const input_method::ModifierKey value =
kModifierKeysSelectItems[j].value;
@@ -91,7 +92,7 @@ void KeyboardHandler::GetLocalizedValues(DictionaryValue* localized_strings) {
value == input_method::kCapsLockKey) {
continue;
}
- ListValue* option = new ListValue();
+ base::ListValue* option = new base::ListValue();
option->Append(new base::FundamentalValue(value));
option->Append(new base::StringValue(l10n_util::GetStringUTF16(
message_id)));
diff --git a/chrome/browser/ui/webui/options/chromeos/keyboard_handler.h b/chrome/browser/ui/webui/options/chromeos/keyboard_handler.h
index f01d34a..38e1465 100644
--- a/chrome/browser/ui/webui/options/chromeos/keyboard_handler.h
+++ b/chrome/browser/ui/webui/options/chromeos/keyboard_handler.h
@@ -19,7 +19,8 @@ class KeyboardHandler : public ::options::OptionsPageUIHandler {
virtual ~KeyboardHandler();
// OptionsPageUIHandler implementation.
- virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE;
+ virtual void GetLocalizedValues(
+ base::DictionaryValue* localized_strings) OVERRIDE;
virtual void InitializePage() OVERRIDE;
private:
diff --git a/chrome/browser/ui/webui/options/chromeos/pointer_handler.cc b/chrome/browser/ui/webui/options/chromeos/pointer_handler.cc
index 59c4635..c7e6e75 100644
--- a/chrome/browser/ui/webui/options/chromeos/pointer_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/pointer_handler.cc
@@ -23,7 +23,8 @@ PointerHandler::PointerHandler()
PointerHandler::~PointerHandler() {
}
-void PointerHandler::GetLocalizedValues(DictionaryValue* localized_strings) {
+void PointerHandler::GetLocalizedValues(
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
static OptionsStringResource resources[] = {
diff --git a/chrome/browser/ui/webui/options/chromeos/pointer_handler.h b/chrome/browser/ui/webui/options/chromeos/pointer_handler.h
index 10af569..b3ec552 100644
--- a/chrome/browser/ui/webui/options/chromeos/pointer_handler.h
+++ b/chrome/browser/ui/webui/options/chromeos/pointer_handler.h
@@ -23,7 +23,8 @@ class PointerHandler
virtual ~PointerHandler();
// OptionsPageUIHandler implementation.
- virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE;
+ virtual void GetLocalizedValues(
+ base::DictionaryValue* localized_strings) OVERRIDE;
private:
// PointerDeviceObserver implementation.
diff --git a/chrome/browser/ui/webui/options/chromeos/proxy_handler.cc b/chrome/browser/ui/webui/options/chromeos/proxy_handler.cc
index c5d6715..926da10 100644
--- a/chrome/browser/ui/webui/options/chromeos/proxy_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/proxy_handler.cc
@@ -31,7 +31,7 @@ ProxyHandler::~ProxyHandler() {
}
void ProxyHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
// Proxy page - ChromeOS
diff --git a/chrome/browser/ui/webui/options/chromeos/stats_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/stats_options_handler.cc
index df5c239..a5ab712 100644
--- a/chrome/browser/ui/webui/options/chromeos/stats_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/stats_options_handler.cc
@@ -21,7 +21,7 @@ StatsOptionsHandler::StatsOptionsHandler() {
// OptionsPageUIHandler implementation.
void StatsOptionsHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
}
// WebUIMessageHandler implementation.
@@ -32,7 +32,7 @@ void StatsOptionsHandler::RegisterMessages() {
}
void StatsOptionsHandler::HandleMetricsReportingCheckbox(
- const ListValue* args) {
+ const base::ListValue* args) {
#if defined(GOOGLE_CHROME_BUILD)
const std::string checked_str = UTF16ToUTF8(ExtractStringValue(args));
const bool enabled = (checked_str == "true");
diff --git a/chrome/browser/ui/webui/options/clear_browser_data_handler.cc b/chrome/browser/ui/webui/options/clear_browser_data_handler.cc
index 817223bb..a145093 100644
--- a/chrome/browser/ui/webui/options/clear_browser_data_handler.cc
+++ b/chrome/browser/ui/webui/options/clear_browser_data_handler.cc
@@ -66,14 +66,14 @@ void ClearBrowserDataHandler::UpdateInfoBannerVisibility() {
bool visible = (base::Time::Now() - lastClearBrowsingDataTime) <=
base::TimeDelta::FromHours(kHoursPerDay);
- ListValue args;
- args.Append(Value::CreateBooleanValue(visible));
+ base::ListValue args;
+ args.Append(base::Value::CreateBooleanValue(visible));
web_ui()->CallJavascriptFunction(
"ClearBrowserDataOverlay.setBannerVisibility", args);
}
void ClearBrowserDataHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
static OptionsStringResource resources[] = {
@@ -109,7 +109,7 @@ void ClearBrowserDataHandler::GetLocalizedValues(
IDS_CLEAR_BROWSING_DATA_INFO_BAR_TEXT,
acc.GetShortcutText()));
- ListValue* time_list = new ListValue;
+ base::ListValue* time_list = new base::ListValue;
for (int i = 0; i < 5; i++) {
base::string16 label_string;
switch (i) {
@@ -129,7 +129,7 @@ void ClearBrowserDataHandler::GetLocalizedValues(
label_string = l10n_util::GetStringUTF16(IDS_CLEAR_DATA_EVERYTHING);
break;
}
- ListValue* option = new ListValue();
+ base::ListValue* option = new base::ListValue();
option->Append(new base::FundamentalValue(i));
option->Append(new base::StringValue(label_string));
time_list->Append(option);
@@ -146,7 +146,8 @@ void ClearBrowserDataHandler::RegisterMessages() {
base::Unretained(this)));
}
-void ClearBrowserDataHandler::HandleClearBrowserData(const ListValue* value) {
+void ClearBrowserDataHandler::HandleClearBrowserData(
+ const base::ListValue* value) {
DCHECK(!remover_);
Profile* profile = Profile::FromWebUI(web_ui());
diff --git a/chrome/browser/ui/webui/options/clear_browser_data_handler.h b/chrome/browser/ui/webui/options/clear_browser_data_handler.h
index 3aa34cb..9972d52 100644
--- a/chrome/browser/ui/webui/options/clear_browser_data_handler.h
+++ b/chrome/browser/ui/webui/options/clear_browser_data_handler.h
@@ -19,7 +19,8 @@ class ClearBrowserDataHandler : public OptionsPageUIHandler,
virtual ~ClearBrowserDataHandler();
// OptionsPageUIHandler implementation.
- virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE;
+ virtual void GetLocalizedValues(
+ base::DictionaryValue* localized_strings) OVERRIDE;
virtual void InitializeHandler() OVERRIDE;
virtual void InitializePage() OVERRIDE;
@@ -30,7 +31,7 @@ class ClearBrowserDataHandler : public OptionsPageUIHandler,
private:
// Javascript callback to start clearing data.
- void HandleClearBrowserData(const ListValue* value);
+ void HandleClearBrowserData(const base::ListValue* value);
// BrowsingDataRemover::Observer implementation.
// Closes the dialog once all requested data has been removed.
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index 94687cc..dd20380 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -153,12 +153,12 @@ ContentSetting ContentSettingFromString(const std::string& name) {
// Create a DictionaryValue* that will act as a data source for a single row
// in a HostContentSettingsMap-controlled exceptions table (e.g., cookies).
// Ownership of the pointer is passed to the caller.
-DictionaryValue* GetExceptionForPage(
+base::DictionaryValue* GetExceptionForPage(
const ContentSettingsPattern& pattern,
const ContentSettingsPattern& secondary_pattern,
const ContentSetting& setting,
const std::string& provider_name) {
- DictionaryValue* exception = new DictionaryValue();
+ base::DictionaryValue* exception = new base::DictionaryValue();
exception->SetString(kOrigin, pattern.ToString());
exception->SetString(kEmbeddingOrigin,
secondary_pattern == ContentSettingsPattern::Wildcard()
@@ -172,11 +172,11 @@ DictionaryValue* GetExceptionForPage(
// Create a DictionaryValue* that will act as a data source for a single row
// in the Geolocation exceptions table. Ownership of the pointer is passed to
// the caller.
-DictionaryValue* GetGeolocationExceptionForPage(
+base::DictionaryValue* GetGeolocationExceptionForPage(
const ContentSettingsPattern& origin,
const ContentSettingsPattern& embedding_origin,
ContentSetting setting) {
- DictionaryValue* exception = new DictionaryValue();
+ base::DictionaryValue* exception = new base::DictionaryValue();
exception->SetString(kSetting, ContentSettingToString(setting));
exception->SetString(kOrigin, origin.ToString());
exception->SetString(kEmbeddingOrigin, embedding_origin.ToString());
@@ -186,11 +186,11 @@ DictionaryValue* GetGeolocationExceptionForPage(
// Create a DictionaryValue* that will act as a data source for a single row
// in the desktop notifications exceptions table. Ownership of the pointer is
// passed to the caller.
-DictionaryValue* GetNotificationExceptionForPage(
+base::DictionaryValue* GetNotificationExceptionForPage(
const ContentSettingsPattern& pattern,
ContentSetting setting,
const std::string& provider_name) {
- DictionaryValue* exception = new DictionaryValue();
+ base::DictionaryValue* exception = new base::DictionaryValue();
exception->SetString(kSetting, ContentSettingToString(setting));
exception->SetString(kOrigin, pattern.ToString());
exception->SetString(kSource, provider_name);
@@ -208,8 +208,8 @@ bool HostedAppHasPermission(
// Add an "Allow"-entry to the list of |exceptions| for a |url_pattern| from
// the web extent of a hosted |app|.
void AddExceptionForHostedApp(const std::string& url_pattern,
- const extensions::Extension& app, ListValue* exceptions) {
- DictionaryValue* exception = new DictionaryValue();
+ const extensions::Extension& app, base::ListValue* exceptions) {
+ base::DictionaryValue* exception = new base::DictionaryValue();
exception->SetString(kSetting, ContentSettingToString(CONTENT_SETTING_ALLOW));
exception->SetString(kOrigin, url_pattern);
exception->SetString(kEmbeddingOrigin, url_pattern);
@@ -222,7 +222,7 @@ void AddExceptionForHostedApp(const std::string& url_pattern,
// Asks the |profile| for hosted apps which have the |permission| set, and
// adds their web extent and launch URL to the |exceptions| list.
void AddExceptionsGrantedByHostedApps(
- Profile* profile, AppFilter app_filter, ListValue* exceptions) {
+ Profile* profile, AppFilter app_filter, base::ListValue* exceptions) {
const ExtensionService* extension_service = profile->GetExtensionService();
// After ExtensionSystem::Init has been called at the browser's start,
// GetExtensionService() should not return NULL, so this is safe:
@@ -277,7 +277,7 @@ ContentSettingsHandler::~ContentSettingsHandler() {
}
void ContentSettingsHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
static OptionsStringResource resources[] = {
@@ -572,7 +572,7 @@ void ContentSettingsHandler::OnGetPermissionSettingsCompleted(
void ContentSettingsHandler::UpdateSettingDefaultFromModel(
ContentSettingsType type) {
- DictionaryValue filter_settings;
+ base::DictionaryValue filter_settings;
std::string provider_id;
filter_settings.SetString(ContentSettingsTypeToGroupName(type) + ".value",
GetSettingDefaultFromModel(type, &provider_id));
@@ -598,7 +598,7 @@ void ContentSettingsHandler::UpdateMediaSettingsView() {
media_settings_.default_setting_initialized = true;
UpdateFlashMediaLinksVisibility();
- DictionaryValue media_ui_settings;
+ base::DictionaryValue media_ui_settings;
media_ui_settings.SetBoolean("cameraDisabled", video_disabled);
media_ui_settings.SetBoolean("micDisabled", audio_disabled);
@@ -616,7 +616,7 @@ void ContentSettingsHandler::UpdateMediaSettingsView() {
// In case only audio is enabled change the text appropriately.
if (video_disabled && !audio_disabled) {
- DictionaryValue media_ui_settings;
+ base::DictionaryValue media_ui_settings;
media_ui_settings.SetString("askText", "mediaStreamAudioAsk");
media_ui_settings.SetString("blockText", "mediaStreamAudioBlock");
media_ui_settings.SetBoolean("showBubble", true);
@@ -630,7 +630,7 @@ void ContentSettingsHandler::UpdateMediaSettingsView() {
if (audio_disabled && video_disabled) {
// Fake policy controlled default because the user can not change anything
// until both audio and video are blocked.
- DictionaryValue filter_settings;
+ base::DictionaryValue filter_settings;
std::string group_name =
ContentSettingsTypeToGroupName(CONTENT_SETTINGS_TYPE_MEDIASTREAM);
filter_settings.SetString(group_name + ".value",
@@ -776,7 +776,7 @@ void ContentSettingsHandler::UpdateGeolocationExceptionsView() {
[i->secondary_pattern] = i->setting;
}
- ListValue exceptions;
+ base::ListValue exceptions;
AddExceptionsGrantedByHostedApps(
profile,
HostedAppHasPermission<APIPermission::kGeolocation>,
@@ -810,7 +810,7 @@ void ContentSettingsHandler::UpdateGeolocationExceptionsView() {
}
}
- StringValue type_string(
+ base::StringValue type_string(
ContentSettingsTypeToGroupName(CONTENT_SETTINGS_TYPE_GEOLOCATION));
web_ui()->CallJavascriptFunction("ContentSettings.setExceptions",
type_string, exceptions);
@@ -828,7 +828,7 @@ void ContentSettingsHandler::UpdateNotificationExceptionsView() {
ContentSettingsForOneType settings;
service->GetNotificationsSettings(&settings);
- ListValue exceptions;
+ base::ListValue exceptions;
AddExceptionsGrantedByHostedApps(profile,
HostedAppHasPermission<APIPermission::kNotification>,
&exceptions);
@@ -849,7 +849,7 @@ void ContentSettingsHandler::UpdateNotificationExceptionsView() {
i->source));
}
- StringValue type_string(
+ base::StringValue type_string(
ContentSettingsTypeToGroupName(CONTENT_SETTINGS_TYPE_NOTIFICATIONS));
web_ui()->CallJavascriptFunction("ContentSettings.setExceptions",
type_string, exceptions);
@@ -860,13 +860,13 @@ void ContentSettingsHandler::UpdateNotificationExceptionsView() {
}
void ContentSettingsHandler::UpdateMediaExceptionsView() {
- ListValue media_exceptions;
+ base::ListValue media_exceptions;
GetExceptionsFromHostContentSettingsMap(
GetContentSettingsMap(),
CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC,
&media_exceptions);
- ListValue video_exceptions;
+ base::ListValue video_exceptions;
GetExceptionsFromHostContentSettingsMap(
GetContentSettingsMap(),
CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA,
@@ -874,9 +874,9 @@ void ContentSettingsHandler::UpdateMediaExceptionsView() {
// Merge the |video_exceptions| list to |media_exceptions| list.
std::map<std::string, base::DictionaryValue*> entries_map;
- for (ListValue::const_iterator media_entry(media_exceptions.begin());
+ for (base::ListValue::const_iterator media_entry(media_exceptions.begin());
media_entry != media_exceptions.end(); ++media_entry) {
- DictionaryValue* media_dict = NULL;
+ base::DictionaryValue* media_dict = NULL;
if (!(*media_entry)->GetAsDictionary(&media_dict))
NOTREACHED();
@@ -888,9 +888,9 @@ void ContentSettingsHandler::UpdateMediaExceptionsView() {
entries_map[media_origin] = media_dict;
}
- for (ListValue::iterator video_entry = video_exceptions.begin();
+ for (base::ListValue::iterator video_entry = video_exceptions.begin();
video_entry != video_exceptions.end(); ++video_entry) {
- DictionaryValue* video_dict = NULL;
+ base::DictionaryValue* video_dict = NULL;
if (!(*video_entry)->GetAsDictionary(&video_dict))
NOTREACHED();
@@ -902,7 +902,7 @@ void ContentSettingsHandler::UpdateMediaExceptionsView() {
std::map<std::string, base::DictionaryValue*>::iterator iter =
entries_map.find(video_origin);
if (iter == entries_map.end()) {
- DictionaryValue* exception = new DictionaryValue();
+ base::DictionaryValue* exception = new base::DictionaryValue();
exception->SetString(kOrigin, video_origin);
exception->SetString(kSetting,
ContentSettingToString(CONTENT_SETTING_ASK));
@@ -919,9 +919,9 @@ void ContentSettingsHandler::UpdateMediaExceptionsView() {
}
media_settings_.exceptions.clear();
- for (ListValue::const_iterator media_entry = media_exceptions.begin();
+ for (base::ListValue::const_iterator media_entry = media_exceptions.begin();
media_entry != media_exceptions.end(); ++media_entry) {
- DictionaryValue* media_dict = NULL;
+ base::DictionaryValue* media_dict = NULL;
bool result = (*media_entry)->GetAsDictionary(&media_dict);
DCHECK(result);
@@ -941,7 +941,7 @@ void ContentSettingsHandler::UpdateMediaExceptionsView() {
media_settings_.exceptions_initialized = true;
UpdateFlashMediaLinksVisibility();
- StringValue type_string(
+ base::StringValue type_string(
ContentSettingsTypeToGroupName(CONTENT_SETTINGS_TYPE_MEDIASTREAM));
web_ui()->CallJavascriptFunction("ContentSettings.setExceptions",
type_string, media_exceptions);
@@ -963,10 +963,10 @@ void ContentSettingsHandler::UpdateMIDISysExExceptionsView() {
void ContentSettingsHandler::UpdateExceptionsViewFromHostContentSettingsMap(
ContentSettingsType type) {
- ListValue exceptions;
+ base::ListValue exceptions;
GetExceptionsFromHostContentSettingsMap(
GetContentSettingsMap(), type, &exceptions);
- StringValue type_string(ContentSettingsTypeToGroupName(type));
+ base::StringValue type_string(ContentSettingsTypeToGroupName(type));
web_ui()->CallJavascriptFunction("ContentSettings.setExceptions", type_string,
exceptions);
@@ -993,9 +993,9 @@ void ContentSettingsHandler::UpdateExceptionsViewFromOTRHostContentSettingsMap(
const HostContentSettingsMap* otr_settings_map = GetOTRContentSettingsMap();
if (!otr_settings_map)
return;
- ListValue exceptions;
+ base::ListValue exceptions;
GetExceptionsFromHostContentSettingsMap(otr_settings_map, type, &exceptions);
- StringValue type_string(ContentSettingsTypeToGroupName(type));
+ base::StringValue type_string(ContentSettingsTypeToGroupName(type));
web_ui()->CallJavascriptFunction("ContentSettings.setOTRExceptions",
type_string, exceptions);
}
@@ -1003,7 +1003,7 @@ void ContentSettingsHandler::UpdateExceptionsViewFromOTRHostContentSettingsMap(
void ContentSettingsHandler::GetExceptionsFromHostContentSettingsMap(
const HostContentSettingsMap* map,
ContentSettingsType type,
- ListValue* exceptions) {
+ base::ListValue* exceptions) {
ContentSettingsForOneType entries;
map->GetSettingsForOneType(type, std::string(), &entries);
// Group settings by primary_pattern.
@@ -1029,7 +1029,7 @@ void ContentSettingsHandler::GetExceptionsFromHostContentSettingsMap(
// Keep the exceptions sorted by provider so they will be displayed in
// precedence order.
- std::vector<std::vector<Value*> > all_provider_exceptions;
+ std::vector<std::vector<base::Value*> > all_provider_exceptions;
all_provider_exceptions.resize(HostContentSettingsMap::NUM_PROVIDER_TYPES);
for (AllPatternsSettings::iterator i = all_patterns_settings.begin();
@@ -1047,8 +1047,9 @@ void ContentSettingsHandler::GetExceptionsFromHostContentSettingsMap(
parent = one_settings.find(ContentSettingsPattern::Wildcard());
const std::string& source = i->first.second;
- std::vector<Value*>* this_provider_exceptions = &all_provider_exceptions.at(
- HostContentSettingsMap::GetProviderTypeFromSource(source));
+ std::vector<base::Value*>* this_provider_exceptions =
+ &all_provider_exceptions.at(
+ HostContentSettingsMap::GetProviderTypeFromSource(source));
// Add the "parent" entry for the non-embedded setting.
ContentSetting parent_setting =
@@ -1084,7 +1085,7 @@ void ContentSettingsHandler::GetExceptionsFromHostContentSettingsMap(
}
void ContentSettingsHandler::RemoveNotificationException(
- const ListValue* args, size_t arg_index) {
+ const base::ListValue* args, size_t arg_index) {
Profile* profile = Profile::FromWebUI(web_ui());
std::string origin;
std::string setting;
@@ -1101,7 +1102,7 @@ void ContentSettingsHandler::RemoveNotificationException(
}
void ContentSettingsHandler::RemoveMediaException(
- const ListValue* args, size_t arg_index) {
+ const base::ListValue* args, size_t arg_index) {
std::string mode;
bool rv = args->GetString(arg_index++, &mode);
DCHECK(rv);
@@ -1128,7 +1129,7 @@ void ContentSettingsHandler::RemoveMediaException(
}
void ContentSettingsHandler::RemoveExceptionFromHostContentSettingsMap(
- const ListValue* args, size_t arg_index,
+ const base::ListValue* args, size_t arg_index,
ContentSettingsType type) {
std::string mode;
bool rv = args->GetString(arg_index++, &mode);
@@ -1201,7 +1202,7 @@ void ContentSettingsHandler::ApplyWhitelist(ContentSettingsType content_type,
kDefaultWhitelistVersion);
}
-void ContentSettingsHandler::SetContentFilter(const ListValue* args) {
+void ContentSettingsHandler::SetContentFilter(const base::ListValue* args) {
DCHECK_EQ(2U, args->GetSize());
std::string group, setting;
if (!(args->GetString(0, &group) &&
@@ -1279,7 +1280,7 @@ void ContentSettingsHandler::SetContentFilter(const ListValue* args) {
}
}
-void ContentSettingsHandler::RemoveException(const ListValue* args) {
+void ContentSettingsHandler::RemoveException(const base::ListValue* args) {
size_t arg_i = 0;
std::string type_string;
CHECK(args->GetString(arg_i++, &type_string));
@@ -1298,7 +1299,7 @@ void ContentSettingsHandler::RemoveException(const ListValue* args) {
}
}
-void ContentSettingsHandler::SetException(const ListValue* args) {
+void ContentSettingsHandler::SetException(const base::ListValue* args) {
size_t arg_i = 0;
std::string type_string;
CHECK(args->GetString(arg_i++, &type_string));
@@ -1334,7 +1335,7 @@ void ContentSettingsHandler::SetException(const ListValue* args) {
}
void ContentSettingsHandler::CheckExceptionPatternValidity(
- const ListValue* args) {
+ const base::ListValue* args) {
size_t arg_i = 0;
std::string type_string;
CHECK(args->GetString(arg_i++, &type_string));
diff --git a/chrome/browser/ui/webui/options/cookies_view_handler.cc b/chrome/browser/ui/webui/options/cookies_view_handler.cc
index 5faf7fe..a28ba7a 100644
--- a/chrome/browser/ui/webui/options/cookies_view_handler.cc
+++ b/chrome/browser/ui/webui/options/cookies_view_handler.cc
@@ -44,7 +44,7 @@ CookiesViewHandler::~CookiesViewHandler() {
}
void CookiesViewHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
static OptionsStringResource resources[] = {
@@ -135,12 +135,12 @@ void CookiesViewHandler::TreeNodesAdded(ui::TreeModel* model,
CookiesTreeModel* tree_model = static_cast<CookiesTreeModel*>(model);
CookieTreeNode* parent_node = tree_model->AsNode(parent);
- ListValue* children = new ListValue;
+ base::ListValue* children = new base::ListValue;
model_util_->GetChildNodeList(parent_node, start, count, children);
- ListValue args;
+ base::ListValue args;
args.Append(parent == tree_model->GetRoot() ?
- Value::CreateNullValue() :
+ base::Value::CreateNullValue() :
new base::StringValue(model_util_->GetTreeNodeId(parent_node)));
args.Append(new base::FundamentalValue(start));
args.Append(children);
@@ -157,9 +157,9 @@ void CookiesViewHandler::TreeNodesRemoved(ui::TreeModel* model,
CookiesTreeModel* tree_model = static_cast<CookiesTreeModel*>(model);
- ListValue args;
+ base::ListValue args;
args.Append(parent == tree_model->GetRoot() ?
- Value::CreateNullValue() :
+ base::Value::CreateNullValue() :
new base::StringValue(model_util_->GetTreeNodeId(
tree_model->AsNode(parent))));
args.Append(new base::FundamentalValue(start));
@@ -207,7 +207,7 @@ void CookiesViewHandler::EnsureCookiesTreeModelCreated() {
}
}
-void CookiesViewHandler::UpdateSearchResults(const ListValue* args) {
+void CookiesViewHandler::UpdateSearchResults(const base::ListValue* args) {
base::string16 query;
if (!args->GetString(0, &query))
return;
@@ -217,12 +217,12 @@ void CookiesViewHandler::UpdateSearchResults(const ListValue* args) {
cookies_tree_model_->UpdateSearchResults(query);
}
-void CookiesViewHandler::RemoveAll(const ListValue* args) {
+void CookiesViewHandler::RemoveAll(const base::ListValue* args) {
EnsureCookiesTreeModelCreated();
cookies_tree_model_->DeleteAllStoredObjects();
}
-void CookiesViewHandler::Remove(const ListValue* args) {
+void CookiesViewHandler::Remove(const base::ListValue* args) {
std::string node_path;
if (!args->GetString(0, &node_path))
return;
@@ -235,7 +235,7 @@ void CookiesViewHandler::Remove(const ListValue* args) {
cookies_tree_model_->DeleteCookieNode(const_cast<CookieTreeNode*>(node));
}
-void CookiesViewHandler::LoadChildren(const ListValue* args) {
+void CookiesViewHandler::LoadChildren(const base::ListValue* args) {
std::string node_path;
if (!args->GetString(0, &node_path))
return;
@@ -249,13 +249,13 @@ void CookiesViewHandler::LoadChildren(const ListValue* args) {
}
void CookiesViewHandler::SendChildren(const CookieTreeNode* parent) {
- ListValue* children = new ListValue;
+ base::ListValue* children = new base::ListValue;
model_util_->GetChildNodeList(parent, 0, parent->child_count(),
children);
- ListValue args;
+ base::ListValue args;
args.Append(parent == cookies_tree_model_->GetRoot() ?
- Value::CreateNullValue() :
+ base::Value::CreateNullValue() :
new base::StringValue(model_util_->GetTreeNodeId(parent)));
args.Append(children);
diff --git a/chrome/browser/ui/webui/options/core_options_handler.cc b/chrome/browser/ui/webui/options/core_options_handler.cc
index cd98a73..433bf0b 100644
--- a/chrome/browser/ui/webui/options/core_options_handler.cc
+++ b/chrome/browser/ui/webui/options/core_options_handler.cc
@@ -80,7 +80,7 @@ void CoreOptionsHandler::InitializePage() {
}
void CoreOptionsHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
GetStaticLocalizedValues(localized_strings);
}
@@ -215,7 +215,7 @@ void CoreOptionsHandler::RegisterMessages() {
base::Unretained(this)));
}
-void CoreOptionsHandler::HandleInitialize(const ListValue* args) {
+void CoreOptionsHandler::HandleInitialize(const base::ListValue* args) {
DCHECK(handlers_host_);
handlers_host_->InitializeHandlers();
}
@@ -323,7 +323,7 @@ void CoreOptionsHandler::DispatchPrefChangeNotification(
std::pair<PreferenceCallbackMap::const_iterator,
PreferenceCallbackMap::const_iterator> range =
pref_callback_map_.equal_range(name);
- ListValue result_value;
+ base::ListValue result_value;
result_value.Append(new base::StringValue(name.c_str()));
result_value.Append(value.release());
for (PreferenceCallbackMap::const_iterator iter = range.first;
@@ -348,7 +348,7 @@ base::Value* CoreOptionsHandler::CreateValueForPref(
if (!controlling_pref)
controlling_pref = pref;
- DictionaryValue* dict = new DictionaryValue;
+ base::DictionaryValue* dict = new base::DictionaryValue;
dict->Set("value", pref->GetValue()->DeepCopy());
if (controlling_pref->IsManaged()) {
dict->SetString("controlledBy", "policy");
@@ -363,7 +363,7 @@ base::Value* CoreOptionsHandler::CreateValueForPref(
ExtensionService* extension_service = extensions::ExtensionSystem::Get(
profile)->extension_service();
- scoped_ptr<DictionaryValue> dictionary =
+ scoped_ptr<base::DictionaryValue> dictionary =
extension_service->GetExtensionInfo(extension_id);
if (!dictionary->empty())
dict->Set("extension", dictionary.release());
@@ -405,7 +405,7 @@ PrefService* CoreOptionsHandler::FindServiceForPref(
return user_prefs;
}
-void CoreOptionsHandler::HandleFetchPrefs(const ListValue* args) {
+void CoreOptionsHandler::HandleFetchPrefs(const base::ListValue* args) {
// First param is name of callback function, so, there needs to be at least
// one more element for the actual preference identifier.
DCHECK_GE(static_cast<int>(args->GetSize()), 2);
@@ -420,7 +420,7 @@ void CoreOptionsHandler::HandleFetchPrefs(const ListValue* args) {
return;
// Get the list of name for prefs to build the response dictionary.
- DictionaryValue result_value;
+ base::DictionaryValue result_value;
const base::Value* list_member;
for (size_t i = 1; i < args->GetSize(); i++) {
@@ -440,7 +440,7 @@ void CoreOptionsHandler::HandleFetchPrefs(const ListValue* args) {
result_value);
}
-void CoreOptionsHandler::HandleObservePrefs(const ListValue* args) {
+void CoreOptionsHandler::HandleObservePrefs(const base::ListValue* args) {
// First param is name is JS callback function name, the rest are pref
// identifiers that we are observing.
DCHECK_GE(static_cast<int>(args->GetSize()), 2);
@@ -470,31 +470,32 @@ void CoreOptionsHandler::HandleObservePrefs(const ListValue* args) {
}
}
-void CoreOptionsHandler::HandleSetBooleanPref(const ListValue* args) {
+void CoreOptionsHandler::HandleSetBooleanPref(const base::ListValue* args) {
HandleSetPref(args, TYPE_BOOLEAN);
}
-void CoreOptionsHandler::HandleSetIntegerPref(const ListValue* args) {
+void CoreOptionsHandler::HandleSetIntegerPref(const base::ListValue* args) {
HandleSetPref(args, TYPE_INTEGER);
}
-void CoreOptionsHandler::HandleSetDoublePref(const ListValue* args) {
+void CoreOptionsHandler::HandleSetDoublePref(const base::ListValue* args) {
HandleSetPref(args, TYPE_DOUBLE);
}
-void CoreOptionsHandler::HandleSetStringPref(const ListValue* args) {
+void CoreOptionsHandler::HandleSetStringPref(const base::ListValue* args) {
HandleSetPref(args, TYPE_STRING);
}
-void CoreOptionsHandler::HandleSetURLPref(const ListValue* args) {
+void CoreOptionsHandler::HandleSetURLPref(const base::ListValue* args) {
HandleSetPref(args, TYPE_URL);
}
-void CoreOptionsHandler::HandleSetListPref(const ListValue* args) {
+void CoreOptionsHandler::HandleSetListPref(const base::ListValue* args) {
HandleSetPref(args, TYPE_LIST);
}
-void CoreOptionsHandler::HandleSetPref(const ListValue* args, PrefType type) {
+void CoreOptionsHandler::HandleSetPref(const base::ListValue* args,
+ PrefType type) {
DCHECK_GT(static_cast<int>(args->GetSize()), 1);
std::string pref_name;
@@ -575,7 +576,7 @@ void CoreOptionsHandler::HandleSetPref(const ListValue* args, PrefType type) {
SetPref(pref_name, value, metric);
}
-void CoreOptionsHandler::HandleClearPref(const ListValue* args) {
+void CoreOptionsHandler::HandleClearPref(const base::ListValue* args) {
DCHECK_GT(static_cast<int>(args->GetSize()), 0);
std::string pref_name;
@@ -591,13 +592,13 @@ void CoreOptionsHandler::HandleClearPref(const ListValue* args) {
ClearPref(pref_name, metric);
}
-void CoreOptionsHandler::HandleUserMetricsAction(const ListValue* args) {
+void CoreOptionsHandler::HandleUserMetricsAction(const base::ListValue* args) {
std::string metric = UTF16ToUTF8(ExtractStringValue(args));
if (!metric.empty())
content::RecordComputedAction(metric);
}
-void CoreOptionsHandler::HandleDisableExtension(const ListValue* args) {
+void CoreOptionsHandler::HandleDisableExtension(const base::ListValue* args) {
std::string extension_id;
if (args->GetString(0, &extension_id)) {
ExtensionService* extension_service = extensions::ExtensionSystem::Get(
diff --git a/chrome/browser/ui/webui/options/core_options_handler.h b/chrome/browser/ui/webui/options/core_options_handler.h
index 43e71fa..2804590 100644
--- a/chrome/browser/ui/webui/options/core_options_handler.h
+++ b/chrome/browser/ui/webui/options/core_options_handler.h
@@ -25,7 +25,8 @@ class CoreOptionsHandler : public OptionsPageUIHandler {
virtual ~CoreOptionsHandler();
// OptionsPageUIHandler implementation.
- virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE;
+ virtual void GetLocalizedValues(
+ base::DictionaryValue* localized_strings) OVERRIDE;
virtual void InitializeHandler() OVERRIDE;
virtual void InitializePage() OVERRIDE;
virtual void Uninitialize() OVERRIDE;
@@ -112,46 +113,46 @@ class CoreOptionsHandler : public OptionsPageUIHandler {
// Callback for the "coreOptionsInitialize" message. This message will
// trigger the Initialize() method of all other handlers so that final
// setup can be performed before the page is shown.
- void HandleInitialize(const ListValue* args);
+ void HandleInitialize(const base::ListValue* args);
// Callback for the "fetchPrefs" message. This message accepts the list of
// preference names passed as the |args| parameter (ListValue). It passes
// results dictionary of preference values by calling prefsFetched() JS method
// on the page.
- void HandleFetchPrefs(const ListValue* args);
+ void HandleFetchPrefs(const base::ListValue* args);
// Callback for the "observePrefs" message. This message initiates
// notification observing for given array of preference names.
- void HandleObservePrefs(const ListValue* args);
+ void HandleObservePrefs(const base::ListValue* args);
// Callbacks for the "set<type>Pref" message. This message saves the new
// preference value. |args| is an array of parameters as follows:
// item 0 - name of the preference.
// item 1 - the value of the preference in string form.
// item 2 - name of the metric identifier (optional).
- void HandleSetBooleanPref(const ListValue* args);
- void HandleSetIntegerPref(const ListValue* args);
- void HandleSetDoublePref(const ListValue* args);
- void HandleSetStringPref(const ListValue* args);
- void HandleSetURLPref(const ListValue* args);
- void HandleSetListPref(const ListValue* args);
+ void HandleSetBooleanPref(const base::ListValue* args);
+ void HandleSetIntegerPref(const base::ListValue* args);
+ void HandleSetDoublePref(const base::ListValue* args);
+ void HandleSetStringPref(const base::ListValue* args);
+ void HandleSetURLPref(const base::ListValue* args);
+ void HandleSetListPref(const base::ListValue* args);
- void HandleSetPref(const ListValue* args, PrefType type);
+ void HandleSetPref(const base::ListValue* args, PrefType type);
// Callback for the "clearPref" message. This message clears a preference
// value. |args| is an array of parameters as follows:
// item 0 - name of the preference.
// item 1 - name of the metric identifier (optional).
- void HandleClearPref(const ListValue* args);
+ void HandleClearPref(const base::ListValue* args);
// Callback for the "coreOptionsUserMetricsAction" message. This records
// an action that should be tracked if metrics recording is enabled. |args|
// is an array that contains a single item, the name of the metric identifier.
- void HandleUserMetricsAction(const ListValue* args);
+ void HandleUserMetricsAction(const base::ListValue* args);
// Callback for the "disableExtension" message. The extension ID string is the
// only argument in the |args| list.
- void HandleDisableExtension(const ListValue* args);
+ void HandleDisableExtension(const base::ListValue* args);
void UpdateClearPluginLSOData();
void UpdatePepperFlashSettingsEnabled();
diff --git a/chrome/browser/ui/webui/options/create_profile_handler.cc b/chrome/browser/ui/webui/options/create_profile_handler.cc
index 27c1d31..b991316 100644
--- a/chrome/browser/ui/webui/options/create_profile_handler.cc
+++ b/chrome/browser/ui/webui/options/create_profile_handler.cc
@@ -54,7 +54,7 @@ void CreateProfileHandler::RegisterMessages() {
base::Unretained(this)));
}
-void CreateProfileHandler::CreateProfile(const ListValue* args) {
+void CreateProfileHandler::CreateProfile(const base::ListValue* args) {
// This handler could have been called in managed mode, for example because
// the user fiddled with the web inspector. Silently return in this case.
Profile* current_profile = Profile::FromWebUI(web_ui());
@@ -249,7 +249,7 @@ void CreateProfileHandler::CreateShortcutAndShowSuccess(
DCHECK_EQ(profile_path_being_created_.value(), profile->GetPath().value());
profile_path_being_created_.clear();
DCHECK_NE(NO_CREATION_IN_PROGRESS, profile_creation_type_);
- DictionaryValue dict;
+ base::DictionaryValue dict;
dict.SetString("name",
profile->GetPrefs()->GetString(prefs::kProfileName));
dict.Set("filePath", base::CreateFilePathValue(profile->GetPath()));
@@ -294,7 +294,8 @@ void CreateProfileHandler::ShowProfileCreationWarning(
base::StringValue(warning));
}
-void CreateProfileHandler::HandleCancelProfileCreation(const ListValue* args) {
+void CreateProfileHandler::HandleCancelProfileCreation(
+ const base::ListValue* args) {
CancelProfileRegistration(true);
}
@@ -417,7 +418,7 @@ bool CreateProfileHandler::IsValidExistingManagedUserId(
}
Profile* profile = Profile::FromWebUI(web_ui());
- const DictionaryValue* dict =
+ const base::DictionaryValue* dict =
ManagedUserSyncServiceFactory::GetForProfile(profile)->GetManagedUsers();
if (!dict->HasKey(existing_managed_user_id))
return false;
diff --git a/chrome/browser/ui/webui/options/font_settings_handler.cc b/chrome/browser/ui/webui/options/font_settings_handler.cc
index 4e87c11..2423055 100644
--- a/chrome/browser/ui/webui/options/font_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/font_settings_handler.cc
@@ -70,7 +70,7 @@ FontSettingsHandler::~FontSettingsHandler() {
}
void FontSettingsHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
static OptionsStringResource resources[] = {
@@ -183,7 +183,7 @@ void FontSettingsHandler::Observe(int type,
NotifyAdvancedFontSettingsAvailability();
}
-void FontSettingsHandler::HandleFetchFontsData(const ListValue* args) {
+void FontSettingsHandler::HandleFetchFontsData(const base::ListValue* args) {
content::GetFontListAsync(
base::Bind(&FontSettingsHandler::FontsListHasLoaded,
base::Unretained(this)));
@@ -193,7 +193,7 @@ void FontSettingsHandler::FontsListHasLoaded(
scoped_ptr<base::ListValue> list) {
// Selects the directionality for the fonts in the given list.
for (size_t i = 0; i < list->GetSize(); i++) {
- ListValue* font;
+ base::ListValue* font;
bool has_font = list->GetList(i, &font);
DCHECK(has_font);
base::string16 value;
@@ -203,7 +203,7 @@ void FontSettingsHandler::FontsListHasLoaded(
font->Append(new base::StringValue(has_rtl_chars ? "rtl" : "ltr"));
}
- ListValue encoding_list;
+ base::ListValue encoding_list;
const std::vector<CharacterEncoding::EncodingInfo>* encodings;
PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
encodings = CharacterEncoding::GetCurrentDisplayEncodings(
@@ -215,7 +215,7 @@ void FontSettingsHandler::FontsListHasLoaded(
std::vector<CharacterEncoding::EncodingInfo>::const_iterator it;
for (it = encodings->begin(); it != encodings->end(); ++it) {
- ListValue* option = new ListValue();
+ base::ListValue* option = new base::ListValue();
if (it->encoding_id) {
int cmd_id = it->encoding_id;
std::string encoding =
@@ -233,7 +233,7 @@ void FontSettingsHandler::FontsListHasLoaded(
encoding_list.Append(option);
}
- ListValue selected_values;
+ base::ListValue selected_values;
selected_values.Append(new base::StringValue(MaybeGetLocalizedFontName(
standard_font_.GetValue())));
selected_values.Append(new base::StringValue(MaybeGetLocalizedFontName(
diff --git a/chrome/browser/ui/webui/options/font_settings_handler.h b/chrome/browser/ui/webui/options/font_settings_handler.h
index 5a533aa..276c8a4 100644
--- a/chrome/browser/ui/webui/options/font_settings_handler.h
+++ b/chrome/browser/ui/webui/options/font_settings_handler.h
@@ -27,7 +27,8 @@ class FontSettingsHandler : public OptionsPageUIHandler {
virtual ~FontSettingsHandler();
// OptionsPageUIHandler implementation.
- virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE;
+ virtual void GetLocalizedValues(
+ base::DictionaryValue* localized_strings) OVERRIDE;
virtual void InitializeHandler() OVERRIDE;
virtual void InitializePage() OVERRIDE;
@@ -40,7 +41,7 @@ class FontSettingsHandler : public OptionsPageUIHandler {
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
- void HandleFetchFontsData(const ListValue* args);
+ void HandleFetchFontsData(const base::ListValue* args);
void FontsListHasLoaded(scoped_ptr<base::ListValue> list);
diff --git a/chrome/browser/ui/webui/options/geolocation_options_handler.cc b/chrome/browser/ui/webui/options/geolocation_options_handler.cc
index deb83bc..c9673a9 100644
--- a/chrome/browser/ui/webui/options/geolocation_options_handler.cc
+++ b/chrome/browser/ui/webui/options/geolocation_options_handler.cc
@@ -16,7 +16,7 @@ GeolocationOptionsHandler::GeolocationOptionsHandler() {}
GeolocationOptionsHandler::~GeolocationOptionsHandler() {}
void GeolocationOptionsHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
}
void GeolocationOptionsHandler::InitializePage() {
diff --git a/chrome/browser/ui/webui/options/geolocation_options_handler.h b/chrome/browser/ui/webui/options/geolocation_options_handler.h
index f8a90a6..d53bb44 100644
--- a/chrome/browser/ui/webui/options/geolocation_options_handler.h
+++ b/chrome/browser/ui/webui/options/geolocation_options_handler.h
@@ -17,7 +17,8 @@ class GeolocationOptionsHandler : public OptionsPageUIHandler {
virtual ~GeolocationOptionsHandler();
// OptionsPageUIHandler implementation
- virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE;
+ virtual void GetLocalizedValues(
+ base::DictionaryValue* localized_strings) OVERRIDE;
virtual void InitializePage() OVERRIDE;
private:
diff --git a/chrome/browser/ui/webui/options/handler_options_handler.cc b/chrome/browser/ui/webui/options/handler_options_handler.cc
index c62edb0..f7fa662 100644
--- a/chrome/browser/ui/webui/options/handler_options_handler.cc
+++ b/chrome/browser/ui/webui/options/handler_options_handler.cc
@@ -27,7 +27,7 @@ HandlerOptionsHandler::~HandlerOptionsHandler() {
}
void HandlerOptionsHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
static OptionsStringResource resources[] = {
@@ -81,10 +81,10 @@ ProtocolHandlerRegistry* HandlerOptionsHandler::GetProtocolHandlerRegistry() {
static void GetHandlersAsListValue(
const ProtocolHandlerRegistry::ProtocolHandlerList& handlers,
- ListValue* handler_list) {
+ base::ListValue* handler_list) {
ProtocolHandlerRegistry::ProtocolHandlerList::const_iterator handler;
for (handler = handlers.begin(); handler != handlers.end(); ++handler) {
- ListValue* handlerValue = new ListValue();
+ base::ListValue* handlerValue = new base::ListValue();
handlerValue->Append(new base::StringValue(handler->protocol()));
handlerValue->Append(new base::StringValue(handler->url().spec()));
handlerValue->Append(new base::StringValue(handler->title()));
@@ -94,18 +94,18 @@ static void GetHandlersAsListValue(
void HandlerOptionsHandler::GetHandlersForProtocol(
const std::string& protocol,
- DictionaryValue* handlers_value) {
+ base::DictionaryValue* handlers_value) {
ProtocolHandlerRegistry* registry = GetProtocolHandlerRegistry();
handlers_value->SetString("protocol", protocol);
handlers_value->SetInteger("default_handler",
registry->GetHandlerIndex(protocol));
- ListValue* handlers_list = new ListValue();
+ base::ListValue* handlers_list = new base::ListValue();
GetHandlersAsListValue(registry->GetHandlersFor(protocol), handlers_list);
handlers_value->Set("handlers", handlers_list);
}
-void HandlerOptionsHandler::GetIgnoredHandlers(ListValue* handlers) {
+void HandlerOptionsHandler::GetIgnoredHandlers(base::ListValue* handlers) {
ProtocolHandlerRegistry* registry = GetProtocolHandlerRegistry();
ProtocolHandlerRegistry::ProtocolHandlerList ignored_handlers =
registry->GetIgnoredHandlers();
@@ -117,23 +117,23 @@ void HandlerOptionsHandler::UpdateHandlerList() {
std::vector<std::string> protocols;
registry->GetRegisteredProtocols(&protocols);
- ListValue handlers;
+ base::ListValue handlers;
for (std::vector<std::string>::iterator protocol = protocols.begin();
protocol != protocols.end(); protocol++) {
- DictionaryValue* handler_value = new DictionaryValue();
+ base::DictionaryValue* handler_value = new base::DictionaryValue();
GetHandlersForProtocol(*protocol, handler_value);
handlers.Append(handler_value);
}
- scoped_ptr<ListValue> ignored_handlers(new ListValue());
+ scoped_ptr<base::ListValue> ignored_handlers(new base::ListValue());
GetIgnoredHandlers(ignored_handlers.get());
web_ui()->CallJavascriptFunction("HandlerOptions.setHandlers", handlers);
web_ui()->CallJavascriptFunction("HandlerOptions.setIgnoredHandlers",
*ignored_handlers);
}
-void HandlerOptionsHandler::RemoveHandler(const ListValue* args) {
- const ListValue* list;
+void HandlerOptionsHandler::RemoveHandler(const base::ListValue* args) {
+ const base::ListValue* list;
if (!args->GetList(0, &list)) {
NOTREACHED();
return;
@@ -147,8 +147,8 @@ void HandlerOptionsHandler::RemoveHandler(const ListValue* args) {
// then.
}
-void HandlerOptionsHandler::RemoveIgnoredHandler(const ListValue* args) {
- const ListValue* list;
+void HandlerOptionsHandler::RemoveIgnoredHandler(const base::ListValue* args) {
+ const base::ListValue* list;
if (!args->GetList(0, &list)) {
NOTREACHED();
return;
@@ -158,7 +158,7 @@ void HandlerOptionsHandler::RemoveIgnoredHandler(const ListValue* args) {
GetProtocolHandlerRegistry()->RemoveIgnoredHandler(handler);
}
-void HandlerOptionsHandler::SetHandlersEnabled(const ListValue* args) {
+void HandlerOptionsHandler::SetHandlersEnabled(const base::ListValue* args) {
bool enabled = true;
CHECK(args->GetBoolean(0, &enabled));
if (enabled)
@@ -167,16 +167,16 @@ void HandlerOptionsHandler::SetHandlersEnabled(const ListValue* args) {
GetProtocolHandlerRegistry()->Disable();
}
-void HandlerOptionsHandler::ClearDefault(const ListValue* args) {
- const Value* value;
+void HandlerOptionsHandler::ClearDefault(const base::ListValue* args) {
+ const base::Value* value;
CHECK(args->Get(0, &value));
std::string protocol_to_clear;
CHECK(value->GetAsString(&protocol_to_clear));
GetProtocolHandlerRegistry()->ClearDefault(protocol_to_clear);
}
-void HandlerOptionsHandler::SetDefault(const ListValue* args) {
- const ListValue* list;
+void HandlerOptionsHandler::SetDefault(const base::ListValue* args) {
+ const base::ListValue* list;
CHECK(args->GetList(0, &list));
const ProtocolHandler& handler(ParseHandlerFromArgs(list));
CHECK(!handler.IsEmpty());
@@ -184,7 +184,7 @@ void HandlerOptionsHandler::SetDefault(const ListValue* args) {
}
ProtocolHandler HandlerOptionsHandler::ParseHandlerFromArgs(
- const ListValue* args) const {
+ const base::ListValue* args) const {
base::string16 protocol;
base::string16 url;
base::string16 title;
diff --git a/chrome/browser/ui/webui/options/handler_options_handler.h b/chrome/browser/ui/webui/options/handler_options_handler.h
index 69cdc82..93dd59d 100644
--- a/chrome/browser/ui/webui/options/handler_options_handler.h
+++ b/chrome/browser/ui/webui/options/handler_options_handler.h
@@ -44,18 +44,18 @@ class HandlerOptionsHandler : public OptionsPageUIHandler {
private:
// Called when the user toggles whether custom handlers are enabled.
- void SetHandlersEnabled(const ListValue* args);
+ void SetHandlersEnabled(const base::ListValue* args);
// Called when the user sets a new default handler for a protocol.
- void SetDefault(const ListValue* args);
+ void SetDefault(const base::ListValue* args);
// Called when the user clears the default handler for a protocol.
// |args| is the string name of the protocol to clear.
- void ClearDefault(const ListValue* args);
+ void ClearDefault(const base::ListValue* args);
// Parses a ProtocolHandler out of the arguments passed back from the view.
// |args| is a list of [protocol, url, title].
- ProtocolHandler ParseHandlerFromArgs(const ListValue* args) const;
+ ProtocolHandler ParseHandlerFromArgs(const base::ListValue* args) const;
// Returns a JSON object describing the set of protocol handlers for the
// given protocol.
@@ -63,18 +63,18 @@ class HandlerOptionsHandler : public OptionsPageUIHandler {
base::DictionaryValue* value);
// Returns a JSON list of the ignored protocol handlers.
- void GetIgnoredHandlers(ListValue* handlers);
+ void GetIgnoredHandlers(base::ListValue* handlers);
// Called when the JS PasswordManager object is initialized.
void UpdateHandlerList();
// Remove a handler.
// |args| is a list of [protocol, url, title].
- void RemoveHandler(const ListValue* args);
+ void RemoveHandler(const base::ListValue* args);
// Remove an ignored handler.
// |args| is a list of [protocol, url, title].
- void RemoveIgnoredHandler(const ListValue* args);
+ void RemoveIgnoredHandler(const base::ListValue* args);
ProtocolHandlerRegistry* GetProtocolHandlerRegistry();
diff --git a/chrome/browser/ui/webui/options/import_data_handler.cc b/chrome/browser/ui/webui/options/import_data_handler.cc
index 68bbc91..78440a3 100644
--- a/chrome/browser/ui/webui/options/import_data_handler.cc
+++ b/chrome/browser/ui/webui/options/import_data_handler.cc
@@ -46,7 +46,8 @@ ImportDataHandler::~ImportDataHandler() {
select_file_dialog_->ListenerDestroyed();
}
-void ImportDataHandler::GetLocalizedValues(DictionaryValue* localized_strings) {
+void ImportDataHandler::GetLocalizedValues(
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
static OptionsStringResource resources[] = {
@@ -112,7 +113,7 @@ void ImportDataHandler::StartImport(
source_profile.importer_type);
}
-void ImportDataHandler::ImportData(const ListValue* args) {
+void ImportDataHandler::ImportData(const base::ListValue* args) {
std::string string_value;
int browser_index;
@@ -157,13 +158,13 @@ void ImportDataHandler::InitializePage() {
if (!importer_list_->source_profiles_loaded())
return;
- ListValue browser_profiles;
+ base::ListValue browser_profiles;
for (size_t i = 0; i < importer_list_->count(); ++i) {
const importer::SourceProfile& source_profile =
importer_list_->GetSourceProfileAt(i);
uint16 browser_services = source_profile.services_supported;
- DictionaryValue* browser_profile = new DictionaryValue();
+ base::DictionaryValue* browser_profile = new base::DictionaryValue();
browser_profile->SetString("name", source_profile.importer_name);
browser_profile->SetInteger("index", i);
browser_profile->SetBoolean("history",
diff --git a/chrome/browser/ui/webui/options/language_dictionary_overlay_handler.cc b/chrome/browser/ui/webui/options/language_dictionary_overlay_handler.cc
index 19b3957..e430fae 100644
--- a/chrome/browser/ui/webui/options/language_dictionary_overlay_handler.cc
+++ b/chrome/browser/ui/webui/options/language_dictionary_overlay_handler.cc
@@ -71,8 +71,8 @@ void LanguageDictionaryOverlayHandler::OnCustomDictionaryLoaded() {
void LanguageDictionaryOverlayHandler::OnCustomDictionaryChanged(
const SpellcheckCustomDictionary::Change& dictionary_change) {
- ListValue add_words;
- ListValue remove_words;
+ base::ListValue add_words;
+ base::ListValue remove_words;
add_words.AppendStrings(dictionary_change.to_add());
remove_words.AppendStrings(dictionary_change.to_remove());
web_ui()->CallJavascriptFunction("EditDictionaryOverlay.updateWords",
@@ -91,7 +91,7 @@ void LanguageDictionaryOverlayHandler::ResetDictionaryWords() {
dictionary_->AddObserver(this);
}
- ListValue list_value;
+ base::ListValue list_value;
const chrome::spellcheck_common::WordSet& words = dictionary_->GetWords();
for (chrome::spellcheck_common::WordSet::const_iterator it = words.begin();
it != words.end(); ++it) {
@@ -101,12 +101,13 @@ void LanguageDictionaryOverlayHandler::ResetDictionaryWords() {
list_value);
}
-void LanguageDictionaryOverlayHandler::RefreshWords(const ListValue* args) {
+void LanguageDictionaryOverlayHandler::RefreshWords(
+ const base::ListValue* args) {
overlay_initialized_ = true;
ResetDictionaryWords();
}
-void LanguageDictionaryOverlayHandler::AddWord(const ListValue* args) {
+void LanguageDictionaryOverlayHandler::AddWord(const base::ListValue* args) {
std::string new_word;
if (!args->GetString(0, &new_word) || new_word.empty() || !dictionary_) {
NOTREACHED();
@@ -115,7 +116,7 @@ void LanguageDictionaryOverlayHandler::AddWord(const ListValue* args) {
dictionary_->AddWord(new_word);
}
-void LanguageDictionaryOverlayHandler::RemoveWord(const ListValue* args) {
+void LanguageDictionaryOverlayHandler::RemoveWord(const base::ListValue* args) {
std::string old_word;
if (!args->GetString(0, &old_word) || old_word.empty() || !dictionary_) {
NOTREACHED();
diff --git a/chrome/browser/ui/webui/options/language_options_handler.cc b/chrome/browser/ui/webui/options/language_options_handler.cc
index 848de8c..0c9ee65 100644
--- a/chrome/browser/ui/webui/options/language_options_handler.cc
+++ b/chrome/browser/ui/webui/options/language_options_handler.cc
@@ -37,7 +37,7 @@ LanguageOptionsHandler::~LanguageOptionsHandler() {
}
void LanguageOptionsHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
LanguageOptionsHandlerCommon::GetLocalizedValues(localized_strings);
RegisterTitle(localized_strings, "languagePage",
@@ -56,7 +56,7 @@ void LanguageOptionsHandler::RegisterMessages() {
base::Unretained(this)));
}
-ListValue* LanguageOptionsHandler::GetLanguageList() {
+base::ListValue* LanguageOptionsHandler::GetLanguageList() {
// Collect the language codes from the supported accept-languages.
const std::string app_locale = g_browser_process->GetApplicationLocale();
std::vector<std::string> language_codes;
@@ -90,7 +90,7 @@ ListValue* LanguageOptionsHandler::GetLanguageList() {
l10n_util::SortStrings16(app_locale, &display_names);
// Build the language list from the language map.
- ListValue* language_list = new ListValue();
+ base::ListValue* language_list = new base::ListValue();
for (size_t i = 0; i < display_names.size(); ++i) {
base::string16& display_name = display_names[i];
base::string16 adjusted_display_name(display_name);
@@ -103,7 +103,7 @@ ListValue* LanguageOptionsHandler::GetLanguageList() {
bool has_rtl_chars = base::i18n::StringContainsStrongRTLChars(display_name);
std::string directionality = has_rtl_chars ? "rtl" : "ltr";
- DictionaryValue* dictionary = new DictionaryValue();
+ base::DictionaryValue* dictionary = new base::DictionaryValue();
dictionary->SetString("code", pair.first);
dictionary->SetString("displayName", adjusted_display_name);
dictionary->SetString("textDirection", directionality);
@@ -124,7 +124,7 @@ void LanguageOptionsHandler::SetApplicationLocale(
pref_service->SetString(prefs::kApplicationLocale, language_code);
}
-void LanguageOptionsHandler::RestartCallback(const ListValue* args) {
+void LanguageOptionsHandler::RestartCallback(const base::ListValue* args) {
content::RecordAction(UserMetricsAction("LanguageOptions_Restart"));
chrome::AttemptRestart();
}
diff --git a/chrome/browser/ui/webui/options/language_options_handler_common.cc b/chrome/browser/ui/webui/options/language_options_handler_common.cc
index 0175c70..f39be41 100644
--- a/chrome/browser/ui/webui/options/language_options_handler_common.cc
+++ b/chrome/browser/ui/webui/options/language_options_handler_common.cc
@@ -44,7 +44,7 @@ LanguageOptionsHandlerCommon::~LanguageOptionsHandlerCommon() {
}
void LanguageOptionsHandlerCommon::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
static OptionsStringResource resources[] = {
{ "addButton", IDS_OPTIONS_SETTINGS_LANGUAGES_ADD_BUTTON },
@@ -98,7 +98,7 @@ void LanguageOptionsHandlerCommon::GetLocalizedValues(
IDS_OPTIONS_SETTINGS_LANGUAGES_DISPLAY_IN_THIS_LANGUAGE,
IDS_SETTINGS_APP_LAUNCHER_PRODUCT_NAME },
};
- DictionaryValue* app_values = NULL;
+ base::DictionaryValue* app_values = NULL;
CHECK(localized_strings->GetDictionary(kSettingsAppKey, &app_values));
RegisterStrings(app_values, app_resources, arraysize(app_resources));
#endif
@@ -132,10 +132,10 @@ void LanguageOptionsHandlerCommon::GetLocalizedValues(
std::vector<std::string> languages;
TranslateManager::GetSupportedLanguages(&languages);
- ListValue* languages_list = new ListValue();
+ base::ListValue* languages_list = new base::ListValue();
for (std::vector<std::string>::iterator it = languages.begin();
it != languages.end(); ++it) {
- languages_list->Append(new StringValue(*it));
+ languages_list->Append(new base::StringValue(*it));
}
localized_strings->Set("translateSupportedLanguages", languages_list);
@@ -176,23 +176,23 @@ void LanguageOptionsHandlerCommon::OnHunspellDictionaryInitialized() {
void LanguageOptionsHandlerCommon::OnHunspellDictionaryDownloadBegin() {
web_ui()->CallJavascriptFunction(
"options.LanguageOptions.onDictionaryDownloadBegin",
- StringValue(GetHunspellDictionary()->GetLanguage()));
+ base::StringValue(GetHunspellDictionary()->GetLanguage()));
}
void LanguageOptionsHandlerCommon::OnHunspellDictionaryDownloadSuccess() {
web_ui()->CallJavascriptFunction(
"options.LanguageOptions.onDictionaryDownloadSuccess",
- StringValue(GetHunspellDictionary()->GetLanguage()));
+ base::StringValue(GetHunspellDictionary()->GetLanguage()));
}
void LanguageOptionsHandlerCommon::OnHunspellDictionaryDownloadFailure() {
web_ui()->CallJavascriptFunction(
"options.LanguageOptions.onDictionaryDownloadFailure",
- StringValue(GetHunspellDictionary()->GetLanguage()));
+ base::StringValue(GetHunspellDictionary()->GetLanguage()));
}
-DictionaryValue* LanguageOptionsHandlerCommon::GetUILanguageCodeSet() {
- DictionaryValue* dictionary = new DictionaryValue();
+base::DictionaryValue* LanguageOptionsHandlerCommon::GetUILanguageCodeSet() {
+ base::DictionaryValue* dictionary = new base::DictionaryValue();
const std::vector<std::string>& available_locales =
l10n_util::GetAvailableLocales();
for (size_t i = 0; i < available_locales.size(); ++i)
@@ -200,8 +200,9 @@ DictionaryValue* LanguageOptionsHandlerCommon::GetUILanguageCodeSet() {
return dictionary;
}
-DictionaryValue* LanguageOptionsHandlerCommon::GetSpellCheckLanguageCodeSet() {
- DictionaryValue* dictionary = new DictionaryValue();
+base::DictionaryValue*
+LanguageOptionsHandlerCommon::GetSpellCheckLanguageCodeSet() {
+ base::DictionaryValue* dictionary = new base::DictionaryValue();
std::vector<std::string> spell_check_languages;
chrome::spellcheck_common::SpellCheckLanguages(&spell_check_languages);
for (size_t i = 0; i < spell_check_languages.size(); ++i) {
@@ -211,7 +212,7 @@ DictionaryValue* LanguageOptionsHandlerCommon::GetSpellCheckLanguageCodeSet() {
}
void LanguageOptionsHandlerCommon::LanguageOptionsOpenCallback(
- const ListValue* args) {
+ const base::ListValue* args) {
content::RecordAction(UserMetricsAction("LanguageOptions_Open"));
RefreshHunspellDictionary();
if (hunspell_dictionary_->IsDownloadInProgress())
@@ -223,20 +224,20 @@ void LanguageOptionsHandlerCommon::LanguageOptionsOpenCallback(
}
void LanguageOptionsHandlerCommon::UiLanguageChangeCallback(
- const ListValue* args) {
+ const base::ListValue* args) {
const std::string language_code = UTF16ToASCII(ExtractStringValue(args));
CHECK(!language_code.empty());
const std::string action = base::StringPrintf(
"LanguageOptions_UiLanguageChange_%s", language_code.c_str());
content::RecordComputedAction(action);
SetApplicationLocale(language_code);
- StringValue language_value(language_code);
+ base::StringValue language_value(language_code);
web_ui()->CallJavascriptFunction("options.LanguageOptions.uiLanguageSaved",
language_value);
}
void LanguageOptionsHandlerCommon::SpellCheckLanguageChangeCallback(
- const ListValue* args) {
+ const base::ListValue* args) {
const std::string language_code = UTF16ToASCII(ExtractStringValue(args));
CHECK(!language_code.empty());
const std::string action = base::StringPrintf(
@@ -246,14 +247,14 @@ void LanguageOptionsHandlerCommon::SpellCheckLanguageChangeCallback(
}
void LanguageOptionsHandlerCommon::UpdateLanguageListCallback(
- const ListValue* args) {
+ const base::ListValue* args) {
CHECK_EQ(args->GetSize(), 1u);
- const ListValue* language_list;
+ const base::ListValue* language_list;
args->GetList(0, &language_list);
DCHECK(language_list);
std::vector<std::string> languages;
- for (ListValue::const_iterator it = language_list->begin();
+ for (base::ListValue::const_iterator it = language_list->begin();
it != language_list->end(); ++it) {
std::string lang;
(*it)->GetAsString(&lang);
@@ -267,7 +268,7 @@ void LanguageOptionsHandlerCommon::UpdateLanguageListCallback(
}
void LanguageOptionsHandlerCommon::RetrySpellcheckDictionaryDownload(
- const ListValue* args) {
+ const base::ListValue* args) {
GetHunspellDictionary()->RetryDownloadDictionary(
Profile::FromWebUI(web_ui())->GetRequestContext());
}
diff --git a/chrome/browser/ui/webui/options/language_options_handler_unittest.cc b/chrome/browser/ui/webui/options/language_options_handler_unittest.cc
index 652ae55..a67121f 100644
--- a/chrome/browser/ui/webui/options/language_options_handler_unittest.cc
+++ b/chrome/browser/ui/webui/options/language_options_handler_unittest.cc
@@ -11,7 +11,7 @@
#if !defined(OS_MACOSX)
TEST(LanguageOptionsHandlerTest, GetUILanguageCodeSet) {
- scoped_ptr<DictionaryValue> dictionary(
+ scoped_ptr<base::DictionaryValue> dictionary(
options::LanguageOptionsHandler::GetUILanguageCodeSet());
EXPECT_TRUE(dictionary->HasKey("en-US"));
// Note that we don't test a false case, as such an expectation will
@@ -21,7 +21,7 @@ TEST(LanguageOptionsHandlerTest, GetUILanguageCodeSet) {
#endif // !defined(OS_MACOSX)
TEST(LanguageOptionsHandlerTest, GetSpellCheckLanguageCodeSet) {
- scoped_ptr<DictionaryValue> dictionary(
+ scoped_ptr<base::DictionaryValue> dictionary(
options::LanguageOptionsHandler::GetSpellCheckLanguageCodeSet());
EXPECT_TRUE(dictionary->HasKey("en-US"));
}
diff --git a/chrome/browser/ui/webui/options/manage_profile_handler.cc b/chrome/browser/ui/webui/options/manage_profile_handler.cc
index c1dce09..b6e83db 100644
--- a/chrome/browser/ui/webui/options/manage_profile_handler.cc
+++ b/chrome/browser/ui/webui/options/manage_profile_handler.cc
@@ -53,9 +53,9 @@ const char kManageProfileIconGridName[] = "manage-profile-icon-grid";
// Given |args| from the WebUI, parses value 0 as a FilePath |profile_file_path|
// and returns true on success.
-bool GetProfilePathFromArgs(const ListValue* args,
+bool GetProfilePathFromArgs(const base::ListValue* args,
base::FilePath* profile_file_path) {
- const Value* file_path_value;
+ const base::Value* file_path_value;
if (!args->Get(0, &file_path_value))
return false;
return base::GetValueAsFilePath(*file_path_value, profile_file_path);
@@ -76,7 +76,7 @@ ManageProfileHandler::~ManageProfileHandler() {
}
void ManageProfileHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
static OptionsStringResource resources[] = {
@@ -200,19 +200,21 @@ void ManageProfileHandler::OnStateChanged() {
RequestCreateProfileUpdate(NULL);
}
-void ManageProfileHandler::RequestDefaultProfileIcons(const ListValue* args) {
+void ManageProfileHandler::RequestDefaultProfileIcons(
+ const base::ListValue* args) {
base::StringValue create_value(kCreateProfileIconGridName);
base::StringValue manage_value(kManageProfileIconGridName);
SendProfileIcons(manage_value);
SendProfileIcons(create_value);
}
-void ManageProfileHandler::RequestNewProfileDefaults(const ListValue* args) {
+void ManageProfileHandler::RequestNewProfileDefaults(
+ const base::ListValue* args) {
const ProfileInfoCache& cache =
g_browser_process->profile_manager()->GetProfileInfoCache();
const size_t icon_index = cache.ChooseAvatarIconIndexForNewProfile();
- DictionaryValue profile_info;
+ base::DictionaryValue profile_info;
profile_info.SetString("name", cache.ChooseNameForNewProfile(icon_index));
profile_info.SetString("iconURL", cache.GetDefaultAvatarIconUrl(icon_index));
@@ -222,7 +224,7 @@ void ManageProfileHandler::RequestNewProfileDefaults(const ListValue* args) {
void ManageProfileHandler::SendProfileIcons(
const base::StringValue& icon_grid) {
- ListValue image_url_list;
+ base::ListValue image_url_list;
// First add the GAIA picture if it's available.
const ProfileInfoCache& cache =
@@ -253,7 +255,7 @@ void ManageProfileHandler::SendProfileIcons(
void ManageProfileHandler::SendProfileNames() {
const ProfileInfoCache& cache =
g_browser_process->profile_manager()->GetProfileInfoCache();
- DictionaryValue profile_name_dict;
+ base::DictionaryValue profile_name_dict;
for (size_t i = 0, e = cache.GetNumberOfProfiles(); i < e; ++i)
profile_name_dict.SetBoolean(UTF16ToUTF8(cache.GetNameOfProfileAtIndex(i)),
true);
@@ -262,7 +264,7 @@ void ManageProfileHandler::SendProfileNames() {
profile_name_dict);
}
-void ManageProfileHandler::SetProfileIconAndName(const ListValue* args) {
+void ManageProfileHandler::SetProfileIconAndName(const base::ListValue* args) {
DCHECK(args);
base::FilePath profile_file_path;
@@ -318,11 +320,11 @@ void ManageProfileHandler::SetProfileIconAndName(const ListValue* args) {
}
#if defined(ENABLE_SETTINGS_APP)
-void ManageProfileHandler::SwitchAppListProfile(const ListValue* args) {
+void ManageProfileHandler::SwitchAppListProfile(const base::ListValue* args) {
DCHECK(args);
DCHECK(profiles::IsMultipleProfilesEnabled());
- const Value* file_path_value;
+ const base::Value* file_path_value;
base::FilePath profile_file_path;
if (!args->Get(0, &file_path_value) ||
!base::GetValueAsFilePath(*file_path_value, &profile_file_path))
@@ -369,12 +371,13 @@ void ManageProfileHandler::ProfileIconSelectionChanged(
if (gaia_name.empty())
return;
- StringValue gaia_name_value(gaia_name);
+ base::StringValue gaia_name_value(gaia_name);
web_ui()->CallJavascriptFunction("ManageProfileOverlay.setProfileName",
gaia_name_value);
}
-void ManageProfileHandler::RequestHasProfileShortcuts(const ListValue* args) {
+void ManageProfileHandler::RequestHasProfileShortcuts(
+ const base::ListValue* args) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
DCHECK(ProfileShortcutManager::IsFeatureEnabled());
diff --git a/chrome/browser/ui/webui/options/managed_user_create_confirm_handler.cc b/chrome/browser/ui/webui/options/managed_user_create_confirm_handler.cc
index 6ded18b..5ee6ea7 100644
--- a/chrome/browser/ui/webui/options/managed_user_create_confirm_handler.cc
+++ b/chrome/browser/ui/webui/options/managed_user_create_confirm_handler.cc
@@ -62,7 +62,7 @@ void ManagedUserCreateConfirmHandler::RegisterMessages() {
void ManagedUserCreateConfirmHandler::SwitchToProfile(
const base::ListValue* args) {
DCHECK(args);
- const Value* file_path_value;
+ const base::Value* file_path_value;
if (!args->Get(0, &file_path_value))
return;
diff --git a/chrome/browser/ui/webui/options/managed_user_import_handler.cc b/chrome/browser/ui/webui/options/managed_user_import_handler.cc
index 86f9e7f..9eb7a8d 100644
--- a/chrome/browser/ui/webui/options/managed_user_import_handler.cc
+++ b/chrome/browser/ui/webui/options/managed_user_import_handler.cc
@@ -123,7 +123,7 @@ void ManagedUserImportHandler::RequestManagedUserImportUpdate(
}
void ManagedUserImportHandler::SendExistingManagedUsers(
- const DictionaryValue* dict) {
+ const base::DictionaryValue* dict) {
DCHECK(dict);
const ProfileInfoCache& cache =
g_browser_process->profile_manager()->GetProfileInfoCache();
@@ -131,9 +131,9 @@ void ManagedUserImportHandler::SendExistingManagedUsers(
for (size_t i = 0; i < cache.GetNumberOfProfiles(); ++i)
managed_user_ids.insert(cache.GetManagedUserIdOfProfileAtIndex(i));
- ListValue managed_users;
- for (DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) {
- const DictionaryValue* value = NULL;
+ base::ListValue managed_users;
+ for (base::DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) {
+ const base::DictionaryValue* value = NULL;
bool success = it.value().GetAsDictionary(&value);
DCHECK(success);
std::string name;
@@ -141,7 +141,7 @@ void ManagedUserImportHandler::SendExistingManagedUsers(
std::string avatar_str;
value->GetString(ManagedUserSyncService::kChromeAvatar, &avatar_str);
- DictionaryValue* managed_user = new DictionaryValue;
+ base::DictionaryValue* managed_user = new base::DictionaryValue;
managed_user->SetString("id", it.key());
managed_user->SetString("name", name);
diff --git a/chrome/browser/ui/webui/options/media_devices_selection_handler.cc b/chrome/browser/ui/webui/options/media_devices_selection_handler.cc
index 8858191..45897f6 100644
--- a/chrome/browser/ui/webui/options/media_devices_selection_handler.cc
+++ b/chrome/browser/ui/webui/options/media_devices_selection_handler.cc
@@ -24,7 +24,8 @@ MediaDevicesSelectionHandler::~MediaDevicesSelectionHandler() {
MediaCaptureDevicesDispatcher::GetInstance()->RemoveObserver(this);
}
-void MediaDevicesSelectionHandler::GetLocalizedValues(DictionaryValue* values) {
+void MediaDevicesSelectionHandler::GetLocalizedValues(
+ base::DictionaryValue* values) {
DCHECK(values);
static OptionsStringResource resources[] = {
@@ -61,7 +62,7 @@ void MediaDevicesSelectionHandler::OnUpdateVideoDevices(
}
void MediaDevicesSelectionHandler::SetDefaultCaptureDevice(
- const ListValue* args) {
+ const base::ListValue* args) {
DCHECK_EQ(2U, args->GetSize());
std::string type, device;
if (!(args->GetString(0, &type) && args->GetString(1, &device))) {
@@ -102,9 +103,9 @@ void MediaDevicesSelectionHandler::UpdateDevicesMenu(
// Build the list of devices to send to JS.
std::string default_id;
- ListValue device_list;
+ base::ListValue device_list;
for (size_t i = 0; i < devices.size(); ++i) {
- DictionaryValue* entry = new DictionaryValue();
+ base::DictionaryValue* entry = new base::DictionaryValue();
entry->SetString("name", devices[i].name);
entry->SetString("id", devices[i].id);
device_list.Append(entry);
@@ -117,8 +118,8 @@ void MediaDevicesSelectionHandler::UpdateDevicesMenu(
if (!devices.empty() && default_id.empty())
default_id = devices[0].id;
- StringValue default_value(default_id);
- StringValue type_value(device_type);
+ base::StringValue default_value(default_id);
+ base::StringValue type_value(device_type);
web_ui()->CallJavascriptFunction("ContentSettings.updateDevicesMenu",
type_value,
device_list,
diff --git a/chrome/browser/ui/webui/options/media_galleries_handler.cc b/chrome/browser/ui/webui/options/media_galleries_handler.cc
index 3cf35a9..4aaa232 100644
--- a/chrome/browser/ui/webui/options/media_galleries_handler.cc
+++ b/chrome/browser/ui/webui/options/media_galleries_handler.cc
@@ -36,7 +36,7 @@ MediaGalleriesHandler::~MediaGalleriesHandler() {
preferences->RemoveGalleryChangeObserver(this);
}
-void MediaGalleriesHandler::GetLocalizedValues(DictionaryValue* values) {
+void MediaGalleriesHandler::GetLocalizedValues(base::DictionaryValue* values) {
DCHECK(values);
static OptionsStringResource resources[] = {
@@ -84,7 +84,7 @@ void MediaGalleriesHandler::OnGalleryInfoUpdated(
void MediaGalleriesHandler::OnGalleriesChanged(
MediaGalleriesPreferences* pref) {
DCHECK(pref->IsInitialized());
- ListValue list;
+ base::ListValue list;
const MediaGalleriesPrefInfoMap& galleries = pref->known_galleries();
for (MediaGalleriesPrefInfoMap::const_iterator iter = galleries.begin();
iter != galleries.end(); ++iter) {
@@ -92,7 +92,7 @@ void MediaGalleriesHandler::OnGalleriesChanged(
if (gallery.type == MediaGalleryPrefInfo::kBlackListed)
continue;
- DictionaryValue* dict = new DictionaryValue();
+ base::DictionaryValue* dict = new base::DictionaryValue();
dict->SetString("displayName", gallery.GetGalleryDisplayName());
dict->SetString("path", gallery.AbsolutePath().LossyDisplayName());
dict->SetString("id", base::Uint64ToString(gallery.pref_id));
diff --git a/chrome/browser/ui/webui/options/options_ui.cc b/chrome/browser/ui/webui/options/options_ui.cc
index 65cdaa1..e5c2916 100644
--- a/chrome/browser/ui/webui/options/options_ui.cc
+++ b/chrome/browser/ui/webui/options/options_ui.cc
@@ -113,7 +113,7 @@ namespace options {
class OptionsUIHTMLSource : public content::URLDataSource {
public:
// The constructor takes over ownership of |localized_strings|.
- explicit OptionsUIHTMLSource(DictionaryValue* localized_strings);
+ explicit OptionsUIHTMLSource(base::DictionaryValue* localized_strings);
// content::URLDataSource implementation.
virtual std::string GetSource() const OVERRIDE;
@@ -129,12 +129,13 @@ class OptionsUIHTMLSource : public content::URLDataSource {
virtual ~OptionsUIHTMLSource();
// Localized strings collection.
- scoped_ptr<DictionaryValue> localized_strings_;
+ scoped_ptr<base::DictionaryValue> localized_strings_;
DISALLOW_COPY_AND_ASSIGN(OptionsUIHTMLSource);
};
-OptionsUIHTMLSource::OptionsUIHTMLSource(DictionaryValue* localized_strings) {
+OptionsUIHTMLSource::OptionsUIHTMLSource(
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
localized_strings_.reset(localized_strings);
}
@@ -203,7 +204,7 @@ bool OptionsPageUIHandler::IsEnabled() {
// static
void OptionsPageUIHandler::RegisterStrings(
- DictionaryValue* localized_strings,
+ base::DictionaryValue* localized_strings,
const OptionsStringResource* resources,
size_t length) {
for (size_t i = 0; i < length; ++i) {
@@ -219,9 +220,10 @@ void OptionsPageUIHandler::RegisterStrings(
}
}
-void OptionsPageUIHandler::RegisterTitle(DictionaryValue* localized_strings,
- const std::string& variable_name,
- int title_id) {
+void OptionsPageUIHandler::RegisterTitle(
+ base::DictionaryValue* localized_strings,
+ const std::string& variable_name,
+ int title_id) {
localized_strings->SetString(variable_name,
l10n_util::GetStringUTF16(title_id));
localized_strings->SetString(variable_name + "TabTitle",
@@ -240,9 +242,9 @@ OptionsUI::OptionsUI(content::WebUI* web_ui)
: WebUIController(web_ui),
WebContentsObserver(web_ui->GetWebContents()),
initialized_handlers_(false) {
- DictionaryValue* localized_strings = new DictionaryValue();
+ base::DictionaryValue* localized_strings = new base::DictionaryValue();
localized_strings->Set(OptionsPageUIHandler::kSettingsAppKey,
- new DictionaryValue());
+ new base::DictionaryValue());
CoreOptionsHandler* core_handler;
#if defined(OS_CHROMEOS)
@@ -426,8 +428,9 @@ void OptionsUI::InitializeHandlers() {
"BrowserOptions.notifyInitializationComplete");
}
-void OptionsUI::AddOptionsPageUIHandler(DictionaryValue* localized_strings,
- OptionsPageUIHandler* handler_raw) {
+void OptionsUI::AddOptionsPageUIHandler(
+ base::DictionaryValue* localized_strings,
+ OptionsPageUIHandler* handler_raw) {
scoped_ptr<OptionsPageUIHandler> handler(handler_raw);
DCHECK(handler.get());
// Add only if handler's service is enabled.
diff --git a/chrome/browser/ui/webui/options/password_manager_handler.cc b/chrome/browser/ui/webui/options/password_manager_handler.cc
index ed2c1c8..a7a9a06 100644
--- a/chrome/browser/ui/webui/options/password_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/password_manager_handler.cc
@@ -46,7 +46,7 @@ gfx::NativeWindow PasswordManagerHandler::GetNativeWindow() {
#endif
void PasswordManagerHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
static const OptionsStringResource resources[] = {
@@ -109,7 +109,8 @@ void PasswordManagerHandler::InitializeHandler() {
password_manager_presenter_.Initialize();
}
-void PasswordManagerHandler::HandleRemoveSavedPassword(const ListValue* args) {
+void PasswordManagerHandler::HandleRemoveSavedPassword(
+ const base::ListValue* args) {
std::string string_value = UTF16ToUTF8(ExtractStringValue(args));
int index;
if (base::StringToInt(string_value, &index) && index >= 0) {
@@ -118,7 +119,7 @@ void PasswordManagerHandler::HandleRemoveSavedPassword(const ListValue* args) {
}
void PasswordManagerHandler::HandleRemovePasswordException(
- const ListValue* args) {
+ const base::ListValue* args) {
std::string string_value = UTF16ToUTF8(ExtractStringValue(args));
int index;
if (base::StringToInt(string_value, &index) && index >= 0) {
@@ -127,7 +128,8 @@ void PasswordManagerHandler::HandleRemovePasswordException(
}
}
-void PasswordManagerHandler::HandleRequestShowPassword(const ListValue* args) {
+void PasswordManagerHandler::HandleRequestShowPassword(
+ const base::ListValue* args) {
int index;
if (!ExtractIntegerValue(args, &index))
NOTREACHED();
@@ -142,29 +144,30 @@ void PasswordManagerHandler::ShowPassword(
web_ui()->CallJavascriptFunction(
"PasswordManager.showPassword",
base::FundamentalValue(static_cast<int>(index)),
- StringValue(password_value));
+ base::StringValue(password_value));
}
-void PasswordManagerHandler::HandleUpdatePasswordLists(const ListValue* args) {
+void PasswordManagerHandler::HandleUpdatePasswordLists(
+ const base::ListValue* args) {
password_manager_presenter_.UpdatePasswordLists();
}
void PasswordManagerHandler::SetPasswordList(
const ScopedVector<autofill::PasswordForm>& password_list,
bool show_passwords) {
- ListValue entries;
+ base::ListValue entries;
languages_ = GetProfile()->GetPrefs()->GetString(prefs::kAcceptLanguages);
base::string16 placeholder(ASCIIToUTF16(" "));
for (size_t i = 0; i < password_list.size(); ++i) {
- ListValue* entry = new ListValue();
- entry->Append(new StringValue(net::FormatUrl(password_list[i]->origin,
- languages_)));
- entry->Append(new StringValue(password_list[i]->username_value));
+ base::ListValue* entry = new base::ListValue();
+ entry->Append(new base::StringValue(net::FormatUrl(password_list[i]->origin,
+ languages_)));
+ entry->Append(new base::StringValue(password_list[i]->username_value));
if (show_passwords) {
- entry->Append(new StringValue(password_list[i]->password_value));
+ entry->Append(new base::StringValue(password_list[i]->password_value));
} else {
// Use a placeholder value with the same length as the password.
- entry->Append(new StringValue(
+ entry->Append(new base::StringValue(
base::string16(password_list[i]->password_value.length(), ' ')));
}
entries.Append(entry);
@@ -176,9 +179,9 @@ void PasswordManagerHandler::SetPasswordList(
void PasswordManagerHandler::SetPasswordExceptionList(
const ScopedVector<autofill::PasswordForm>& password_exception_list) {
- ListValue entries;
+ base::ListValue entries;
for (size_t i = 0; i < password_exception_list.size(); ++i) {
- entries.Append(new StringValue(
+ entries.Append(new base::StringValue(
net::FormatUrl(password_exception_list[i]->origin, languages_)));
}
diff --git a/chrome/browser/ui/webui/options/password_manager_handler.h b/chrome/browser/ui/webui/options/password_manager_handler.h
index 11ec857..bae096b 100644
--- a/chrome/browser/ui/webui/options/password_manager_handler.h
+++ b/chrome/browser/ui/webui/options/password_manager_handler.h
@@ -23,7 +23,8 @@ class PasswordManagerHandler : public OptionsPageUIHandler,
virtual ~PasswordManagerHandler();
// OptionsPageUIHandler implementation.
- virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE;
+ virtual void GetLocalizedValues(
+ base::DictionaryValue* localized_strings) OVERRIDE;
virtual void InitializeHandler() OVERRIDE;
virtual void RegisterMessages() OVERRIDE;
@@ -43,19 +44,19 @@ class PasswordManagerHandler : public OptionsPageUIHandler,
private:
// Clears and then populates the list of passwords and password exceptions.
// Called when the JS PasswordManager object is initialized.
- void HandleUpdatePasswordLists(const ListValue* args);
+ void HandleUpdatePasswordLists(const base::ListValue* args);
// Removes a saved password entry.
// |value| the entry index to be removed.
- void HandleRemoveSavedPassword(const ListValue* args);
+ void HandleRemoveSavedPassword(const base::ListValue* args);
// Removes a saved password exception.
// |value| the entry index to be removed.
- void HandleRemovePasswordException(const ListValue* args);
+ void HandleRemovePasswordException(const base::ListValue* args);
// Requests the plain text password for an entry to be revealed.
// |index| The index of the entry.
- void HandleRequestShowPassword(const ListValue* args);
+ void HandleRequestShowPassword(const base::ListValue* args);
// User pref for storing accept languages.
std::string languages_;
diff --git a/chrome/browser/ui/webui/options/preferences_browsertest.cc b/chrome/browser/ui/webui/options/preferences_browsertest.cc
index e3984c7..7415ae0 100644
--- a/chrome/browser/ui/webui/options/preferences_browsertest.cc
+++ b/chrome/browser/ui/webui/options/preferences_browsertest.cc
@@ -61,12 +61,12 @@ using testing::_;
namespace base {
// Helper for using EXPECT_EQ() with base::Value.
-bool operator==(const Value& first, const Value& second) {
+bool operator==(const base::Value& first, const base::Value& second) {
return first.Equals(&second);
}
// Helper for pretty-printing the contents of base::Value in case of failures.
-void PrintTo(const Value& value, std::ostream* stream) {
+void PrintTo(const base::Value& value, std::ostream* stream) {
std::string json;
JSONWriter::Write(&value, &json);
*stream << json;
diff --git a/chrome/browser/ui/webui/options/reset_profile_settings_handler.cc b/chrome/browser/ui/webui/options/reset_profile_settings_handler.cc
index 9497afd..baba785 100644
--- a/chrome/browser/ui/webui/options/reset_profile_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/reset_profile_settings_handler.cc
@@ -60,7 +60,7 @@ void ResetProfileSettingsHandler::Uninitialize() {
}
void ResetProfileSettingsHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
static OptionsStringResource resources[] = {
@@ -95,7 +95,7 @@ void ResetProfileSettingsHandler::RegisterMessages() {
}
void ResetProfileSettingsHandler::HandleResetProfileSettings(
- const ListValue* value) {
+ const base::ListValue* value) {
bool send_settings = false;
if (!value->GetBoolean(0, &send_settings))
NOTREACHED();
@@ -134,8 +134,9 @@ void ResetProfileSettingsHandler::OnResetProfileSettingsDone() {
true /*performed_reset*/);
}
-void ResetProfileSettingsHandler::OnShowResetProfileDialog(const ListValue*) {
- DictionaryValue flashInfo;
+void ResetProfileSettingsHandler::OnShowResetProfileDialog(
+ const base::ListValue*) {
+ base::DictionaryValue flashInfo;
flashInfo.Set("feedbackInfo", GetReadableFeedback(
Profile::FromWebUI(web_ui())));
web_ui()->CallJavascriptFunction(
diff --git a/chrome/browser/ui/webui/options/search_engine_manager_handler.cc b/chrome/browser/ui/webui/options/search_engine_manager_handler.cc
index ed168b6..ec9c2e5 100644
--- a/chrome/browser/ui/webui/options/search_engine_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/search_engine_manager_handler.cc
@@ -123,7 +123,7 @@ void SearchEngineManagerHandler::OnModelChanged() {
default_engine);
// Build the first list (default search engine options).
- ListValue defaults_list;
+ base::ListValue defaults_list;
int last_default_engine_index =
list_controller_->table_model()->last_search_engine_index();
for (int i = 0; i < last_default_engine_index; ++i) {
@@ -133,7 +133,7 @@ void SearchEngineManagerHandler::OnModelChanged() {
}
// Build the second list (other search templates).
- ListValue others_list;
+ base::ListValue others_list;
int last_other_engine_index =
list_controller_->table_model()->last_other_engine_index();
if (last_default_engine_index < 0)
@@ -143,7 +143,7 @@ void SearchEngineManagerHandler::OnModelChanged() {
}
// Build the extension keywords list.
- ListValue keyword_list;
+ base::ListValue keyword_list;
if (last_other_engine_index < 0)
last_other_engine_index = 0;
int engine_count = list_controller_->table_model()->RowCount();
@@ -196,7 +196,7 @@ base::DictionaryValue* SearchEngineManagerHandler::CreateDictionaryForEngine(
std::string extension_id = template_url->GetExtensionId();
ExtensionService* extension_service = extensions::ExtensionSystem::Get(
Profile::FromWebUI(web_ui()))->extension_service();
- scoped_ptr<DictionaryValue> dictionary =
+ scoped_ptr<base::DictionaryValue> dictionary =
extension_service->GetExtensionInfo(extension_id);
if (!dictionary->empty())
dict->Set("extension", dictionary.release());
@@ -204,7 +204,8 @@ base::DictionaryValue* SearchEngineManagerHandler::CreateDictionaryForEngine(
return dict;
}
-void SearchEngineManagerHandler::SetDefaultSearchEngine(const ListValue* args) {
+void SearchEngineManagerHandler::SetDefaultSearchEngine(
+ const base::ListValue* args) {
int index;
if (!ExtractIntegerValue(args, &index)) {
NOTREACHED();
@@ -216,7 +217,8 @@ void SearchEngineManagerHandler::SetDefaultSearchEngine(const ListValue* args) {
list_controller_->MakeDefaultTemplateURL(index);
}
-void SearchEngineManagerHandler::RemoveSearchEngine(const ListValue* args) {
+void SearchEngineManagerHandler::RemoveSearchEngine(
+ const base::ListValue* args) {
int index;
if (!ExtractIntegerValue(args, &index)) {
NOTREACHED();
@@ -229,7 +231,7 @@ void SearchEngineManagerHandler::RemoveSearchEngine(const ListValue* args) {
list_controller_->RemoveTemplateURL(index);
}
-void SearchEngineManagerHandler::EditSearchEngine(const ListValue* args) {
+void SearchEngineManagerHandler::EditSearchEngine(const base::ListValue* args) {
int index;
if (!ExtractIntegerValue(args, &index)) {
NOTREACHED();
@@ -259,7 +261,7 @@ void SearchEngineManagerHandler::OnEditedKeyword(
}
void SearchEngineManagerHandler::CheckSearchEngineInfoValidity(
- const ListValue* args)
+ const base::ListValue* args)
{
if (!edit_controller_.get())
return;
@@ -279,19 +281,19 @@ void SearchEngineManagerHandler::CheckSearchEngineInfoValidity(
validity.SetBoolean("name", edit_controller_->IsTitleValid(name));
validity.SetBoolean("keyword", edit_controller_->IsKeywordValid(keyword));
validity.SetBoolean("url", edit_controller_->IsURLValid(url));
- StringValue indexValue(modelIndex);
+ base::StringValue indexValue(modelIndex);
web_ui()->CallJavascriptFunction("SearchEngineManager.validityCheckCallback",
validity, indexValue);
}
-void SearchEngineManagerHandler::EditCancelled(const ListValue* args) {
+void SearchEngineManagerHandler::EditCancelled(const base::ListValue* args) {
if (!edit_controller_.get())
return;
edit_controller_->CleanUpCancelledAdd();
edit_controller_.reset();
}
-void SearchEngineManagerHandler::EditCompleted(const ListValue* args) {
+void SearchEngineManagerHandler::EditCompleted(const base::ListValue* args) {
if (!edit_controller_.get())
return;
base::string16 name;
diff --git a/chrome/browser/ui/webui/options/startup_pages_handler.cc b/chrome/browser/ui/webui/options/startup_pages_handler.cc
index e46e9ce..00324ce 100644
--- a/chrome/browser/ui/webui/options/startup_pages_handler.cc
+++ b/chrome/browser/ui/webui/options/startup_pages_handler.cc
@@ -30,7 +30,7 @@ StartupPagesHandler::~StartupPagesHandler() {
}
void StartupPagesHandler::GetLocalizedValues(
- DictionaryValue* localized_strings) {
+ base::DictionaryValue* localized_strings) {
DCHECK(localized_strings);
static OptionsStringResource resources[] = {
@@ -101,11 +101,11 @@ void StartupPagesHandler::InitializePage() {
}
void StartupPagesHandler::OnModelChanged() {
- ListValue startup_pages;
+ base::ListValue startup_pages;
int page_count = startup_custom_pages_table_model_->RowCount();
std::vector<GURL> urls = startup_custom_pages_table_model_->GetURLs();
for (int i = 0; i < page_count; ++i) {
- DictionaryValue* entry = new DictionaryValue();
+ base::DictionaryValue* entry = new base::DictionaryValue();
entry->SetString("title", startup_custom_pages_table_model_->GetText(i, 0));
entry->SetString("url", urls[i].spec());
entry->SetString("tooltip",
@@ -131,11 +131,11 @@ void StartupPagesHandler::OnItemsRemoved(int start, int length) {
}
void StartupPagesHandler::SetStartupPagesToCurrentPages(
- const ListValue* args) {
+ const base::ListValue* args) {
startup_custom_pages_table_model_->SetToCurrentlyOpenPages();
}
-void StartupPagesHandler::RemoveStartupPages(const ListValue* args) {
+void StartupPagesHandler::RemoveStartupPages(const base::ListValue* args) {
for (int i = args->GetSize() - 1; i >= 0; --i) {
int selected_index;
CHECK(args->GetInteger(i, &selected_index));
@@ -149,7 +149,7 @@ void StartupPagesHandler::RemoveStartupPages(const ListValue* args) {
}
}
-void StartupPagesHandler::AddStartupPage(const ListValue* args) {
+void StartupPagesHandler::AddStartupPage(const base::ListValue* args) {
std::string url_string;
CHECK(args->GetString(0, &url_string));
@@ -165,7 +165,7 @@ void StartupPagesHandler::AddStartupPage(const ListValue* args) {
startup_custom_pages_table_model_->Add(index, url);
}
-void StartupPagesHandler::EditStartupPage(const ListValue* args) {
+void StartupPagesHandler::EditStartupPage(const base::ListValue* args) {
std::string url_string;
int index;
CHECK_EQ(args->GetSize(), 2U);
@@ -182,14 +182,14 @@ void StartupPagesHandler::EditStartupPage(const ListValue* args) {
startup_custom_pages_table_model_->SetURLs(urls);
}
-void StartupPagesHandler::DragDropStartupPage(const ListValue* args) {
+void StartupPagesHandler::DragDropStartupPage(const base::ListValue* args) {
CHECK_EQ(args->GetSize(), 2U);
int to_index;
CHECK(args->GetInteger(0, &to_index));
- const ListValue* selected;
+ const base::ListValue* selected;
CHECK(args->GetList(1, &selected));
std::vector<int> index_list;
@@ -214,16 +214,16 @@ void StartupPagesHandler::SaveStartupPagesPref() {
SessionStartupPref::SetStartupPref(prefs, pref);
}
-void StartupPagesHandler::CommitChanges(const ListValue* args) {
+void StartupPagesHandler::CommitChanges(const base::ListValue* args) {
SaveStartupPagesPref();
}
-void StartupPagesHandler::CancelChanges(const ListValue* args) {
+void StartupPagesHandler::CancelChanges(const base::ListValue* args) {
UpdateStartupPages();
}
void StartupPagesHandler::RequestAutocompleteSuggestions(
- const ListValue* args) {
+ const base::ListValue* args) {
base::string16 input;
CHECK_EQ(args->GetSize(), 1U);
CHECK(args->GetString(0, &input));
@@ -236,7 +236,7 @@ void StartupPagesHandler::RequestAutocompleteSuggestions(
void StartupPagesHandler::OnResultChanged(bool default_match_changed) {
const AutocompleteResult& result = autocomplete_controller_->result();
- ListValue suggestions;
+ base::ListValue suggestions;
OptionsUI::ProcessAutocompleteSuggestions(result, &suggestions);
web_ui()->CallJavascriptFunction(
"StartupOverlay.updateAutocompleteSuggestions", suggestions);
diff --git a/chrome/browser/ui/webui/options/startup_pages_handler.h b/chrome/browser/ui/webui/options/startup_pages_handler.h
index aeea059..5978411 100644
--- a/chrome/browser/ui/webui/options/startup_pages_handler.h
+++ b/chrome/browser/ui/webui/options/startup_pages_handler.h
@@ -29,7 +29,8 @@ class StartupPagesHandler : public OptionsPageUIHandler,
virtual ~StartupPagesHandler();
// OptionsPageUIHandler implementation.
- virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE;
+ virtual void GetLocalizedValues(
+ base::DictionaryValue* localized_strings) OVERRIDE;
virtual void InitializeHandler() OVERRIDE;
virtual void InitializePage() OVERRIDE;
virtual void RegisterMessages() OVERRIDE;
@@ -45,31 +46,31 @@ class StartupPagesHandler : public OptionsPageUIHandler,
private:
// Saves the changes that have been made. Called from WebUI.
- void CommitChanges(const ListValue* args);
+ void CommitChanges(const base::ListValue* args);
// Cancels the changes that have been made. Called from WebUI.
- void CancelChanges(const ListValue* args);
+ void CancelChanges(const base::ListValue* args);
// Removes the startup page at the given indexes. Called from WebUI.
- void RemoveStartupPages(const ListValue* args);
+ void RemoveStartupPages(const base::ListValue* args);
// Adds a startup page with the given URL after the given index.
// Called from WebUI.
- void AddStartupPage(const ListValue* args);
+ void AddStartupPage(const base::ListValue* args);
// Changes the startup page at the given index to the given URL.
// Called from WebUI.
- void EditStartupPage(const ListValue* args);
+ void EditStartupPage(const base::ListValue* args);
// Sets the startup page set to the current pages. Called from WebUI.
- void SetStartupPagesToCurrentPages(const ListValue* args);
+ void SetStartupPagesToCurrentPages(const base::ListValue* args);
// Writes the current set of startup pages to prefs. Called from WebUI.
- void DragDropStartupPage(const ListValue* args);
+ void DragDropStartupPage(const base::ListValue* args);
// Gets autocomplete suggestions asychronously for the given string.
// Called from WebUI.
- void RequestAutocompleteSuggestions(const ListValue* args);
+ void RequestAutocompleteSuggestions(const base::ListValue* args);
// Loads the current set of custom startup pages and reports it to the WebUI.
void UpdateStartupPages();
diff --git a/chrome/browser/ui/webui/performance_monitor/performance_monitor_handler.cc b/chrome/browser/ui/webui/performance_monitor/performance_monitor_handler.cc
index 77b657d..c908853 100644
--- a/chrome/browser/ui/webui/performance_monitor/performance_monitor_handler.cc
+++ b/chrome/browser/ui/webui/performance_monitor/performance_monitor_handler.cc
@@ -135,9 +135,9 @@ Unit GetUnitForMetricType(MetricType type) {
// Returns a dictionary for the aggregation method. Aggregation strategies
// contain an id representing the method, and localized strings for the
// method name and method description.
-scoped_ptr<DictionaryValue> GetAggregationMethod(
+scoped_ptr<base::DictionaryValue> GetAggregationMethod(
AggregationMethod method) {
- scoped_ptr<DictionaryValue> value(new DictionaryValue());
+ scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue());
value->SetInteger("id", method);
value->SetString("name", GetLocalizedStringFromAggregationMethod(method));
value->SetString(
@@ -149,12 +149,13 @@ scoped_ptr<DictionaryValue> GetAggregationMethod(
// Returns a list of metric details, with one entry per metric. Metric details
// are dictionaries which contain the id representing the metric and localized
// strings for the metric name and metric description.
-scoped_ptr<ListValue> GetMetricDetailsForCategory(MetricCategory category) {
- scoped_ptr<ListValue> value(new ListValue());
+scoped_ptr<base::ListValue> GetMetricDetailsForCategory(
+ MetricCategory category) {
+ scoped_ptr<base::ListValue> value(new base::ListValue());
std::set<MetricType> metric_set = GetMetricSetForCategory(category);
for (std::set<MetricType>::const_iterator iter = metric_set.begin();
iter != metric_set.end(); ++iter) {
- DictionaryValue* metric_details = new DictionaryValue();
+ base::DictionaryValue* metric_details = new base::DictionaryValue();
metric_details->SetInteger("metricId", *iter);
metric_details->SetString(
"name", GetLocalizedStringFromMetricType(*iter));
@@ -169,8 +170,8 @@ scoped_ptr<ListValue> GetMetricDetailsForCategory(MetricCategory category) {
// an id representing the category; localized strings for the category name,
// the default unit in which the category is measured, and the category's
// description; and the metric details for each metric type in the category.
-scoped_ptr<DictionaryValue> GetMetricCategory(MetricCategory category) {
- scoped_ptr<DictionaryValue> value(new DictionaryValue());
+scoped_ptr<base::DictionaryValue> GetMetricCategory(MetricCategory category) {
+ scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue());
value->SetInteger("metricCategoryId", category);
value->SetString(
"name", GetLocalizedStringFromMetricCategory(category));
@@ -188,12 +189,12 @@ scoped_ptr<DictionaryValue> GetMetricCategory(MetricCategory category) {
// are dictionaries which contain the id representing the event and localized
// strings for the event name, event description, and a title suitable for a
// mouseover popup.
-scoped_ptr<ListValue> GetEventTypesForCategory(EventCategory category) {
- scoped_ptr<ListValue> value(new ListValue());
+scoped_ptr<base::ListValue> GetEventTypesForCategory(EventCategory category) {
+ scoped_ptr<base::ListValue> value(new base::ListValue());
std::set<EventType> event_set = GetEventSetForCategory(category);
for (std::set<EventType>::const_iterator iter = event_set.begin();
iter != event_set.end(); ++iter) {
- DictionaryValue* event_details = new DictionaryValue();
+ base::DictionaryValue* event_details = new base::DictionaryValue();
event_details->SetInteger("eventId", *iter);
event_details->SetString(
"name", GetLocalizedStringFromEventType(*iter));
@@ -209,8 +210,8 @@ scoped_ptr<ListValue> GetEventTypesForCategory(EventCategory category) {
// Returns a dictionary for the event category. Event categories contain an
// id representing the category, localized strings for the event name and
// event description, and event details for each event type in the category.
-scoped_ptr<DictionaryValue> GetEventCategory(EventCategory category) {
- scoped_ptr<DictionaryValue> value(new DictionaryValue());
+scoped_ptr<base::DictionaryValue> GetEventCategory(EventCategory category) {
+ scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue());
value->SetInteger("eventCategoryId", category);
value->SetString(
"name", GetLocalizedStringFromEventCategory(category));
@@ -223,7 +224,7 @@ scoped_ptr<DictionaryValue> GetEventCategory(EventCategory category) {
// Queries the performance monitor database for active intervals between
// |start| and |end| times and appends the results to |results|.
-void DoGetActiveIntervals(ListValue* results,
+void DoGetActiveIntervals(base::ListValue* results,
const base::Time& start,
const base::Time& end) {
Database* db = PerformanceMonitor::GetInstance()->database();
@@ -234,7 +235,7 @@ void DoGetActiveIntervals(ListValue* results,
for (std::vector<TimeRange>::iterator it = intervals.begin();
it != intervals.end(); ++it) {
- DictionaryValue* interval_value = new DictionaryValue();
+ base::DictionaryValue* interval_value = new base::DictionaryValue();
interval_value->SetDouble("start", it->start.ToJsTime());
interval_value->SetDouble("end", it->end.ToJsTime());
results->Append(interval_value);
@@ -244,7 +245,7 @@ void DoGetActiveIntervals(ListValue* results,
// Queries the PerformanceMonitor database for events of type |event_type|
// between |start| and |end| times, creates a new event with localized keys
// for display, and appends the results to |results|.
-void DoGetEvents(ListValue* results,
+void DoGetEvents(base::ListValue* results,
const std::set<EventType>& event_types,
const base::Time& start,
const base::Time& end) {
@@ -254,9 +255,9 @@ void DoGetEvents(ListValue* results,
for (std::set<EventType>::const_iterator iter = event_types.begin();
iter != event_types.end(); ++iter) {
- DictionaryValue* event_results = new DictionaryValue();
+ base::DictionaryValue* event_results = new base::DictionaryValue();
event_results->SetInteger("eventId", static_cast<int>(*iter));
- ListValue* events = new ListValue();
+ base::ListValue* events = new base::ListValue();
event_results->Set("events", events);
results->Append(event_results);
@@ -264,11 +265,12 @@ void DoGetEvents(ListValue* results,
for (Database::EventVector::iterator event = event_vector.begin();
event != event_vector.end(); ++event) {
- DictionaryValue* localized_event = new DictionaryValue();
+ base::DictionaryValue* localized_event = new base::DictionaryValue();
- for (DictionaryValue::Iterator data(*(*event)->data()); !data.IsAtEnd();
+ for (base::DictionaryValue::Iterator data(*(*event)->data());
+ !data.IsAtEnd();
data.Advance()) {
- Value* value = NULL;
+ base::Value* value = NULL;
// The property 'eventType' is set in HandleGetEvents as part of the
// entire result set, so we don't need to include this here in the
@@ -283,13 +285,13 @@ void DoGetEvents(ListValue* results,
LOG(ERROR) << "Failed to get 'time' field from event.";
continue;
}
- value = Value::CreateDoubleValue(
+ value = base::Value::CreateDoubleValue(
base::Time::FromInternalValue(
static_cast<int64>(time)).ToJsTime());
} else {
// All other values are user-facing, so we create a new value for
// localized display.
- DictionaryValue* localized_value = new DictionaryValue();
+ base::DictionaryValue* localized_value = new base::DictionaryValue();
localized_value->SetString(
"label",
GetLocalizedStringFromEventProperty(data.key()));
@@ -310,7 +312,7 @@ void DoGetEvents(ListValue* results,
// of metric points, with each sublist containing the aggregated data for an
// interval for which PerformanceMonitor was active. This will also convert
// time to JS-style time.
-void DoGetMetrics(ListValue* results,
+void DoGetMetrics(base::ListValue* results,
const std::set<MetricType>& metric_types,
const base::Time& start,
const base::Time& end,
@@ -330,7 +332,7 @@ void DoGetMetrics(ListValue* results,
*GetUnitDetails(GetUnitForMetricCategory(
GetCategoryForMetric(*metric_type))));
- DictionaryValue* metric_set = new DictionaryValue();
+ base::DictionaryValue* metric_set = new base::DictionaryValue();
metric_set->SetInteger("metricId", static_cast<int>(*metric_type));
metric_set->SetDouble(
"maxValue",
@@ -351,12 +353,12 @@ void DoGetMetrics(ListValue* results,
// The JS-side expects a list to be present, even if there are no metrics.
if (!aggregated_metrics) {
- metric_set->Set("metrics", new ListValue());
+ metric_set->Set("metrics", new base::ListValue());
results->Append(metric_set);
continue;
}
- ListValue* metric_points_by_interval = new ListValue();
+ base::ListValue* metric_points_by_interval = new base::ListValue();
// For each metric point, record it in the expected format for the JS-side
// (a dictionary of time and value, with time as a JS-style time), and
@@ -364,11 +366,11 @@ void DoGetMetrics(ListValue* results,
for (VectorOfMetricVectors::const_iterator metric_series =
aggregated_metrics->begin();
metric_series != aggregated_metrics->end(); ++metric_series) {
- ListValue* series_value = new ListValue();
+ base::ListValue* series_value = new base::ListValue();
for (Database::MetricVector::const_iterator metric_point =
metric_series->begin();
metric_point != metric_series->end(); ++metric_point) {
- DictionaryValue* point_value = new DictionaryValue();
+ base::DictionaryValue* point_value = new base::DictionaryValue();
point_value->SetDouble("time", metric_point->time.ToJsTime());
point_value->SetDouble("value",
metric_point->value * conversion_factor);
@@ -421,13 +423,13 @@ void PerformanceMonitorHandler::RegisterMessages() {
}
void PerformanceMonitorHandler::ReturnResults(const std::string& function,
- const Value* results) {
+ const base::Value* results) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
web_ui()->CallJavascriptFunction(function, *results);
}
void PerformanceMonitorHandler::HandleGetActiveIntervals(
- const ListValue* args) {
+ const base::ListValue* args) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
CHECK_EQ(2u, args->GetSize());
double double_time = 0.0;
@@ -436,7 +438,7 @@ void PerformanceMonitorHandler::HandleGetActiveIntervals(
CHECK(args->GetDouble(1, &double_time));
base::Time end = base::Time::FromJsTime(double_time);
- ListValue* results = new ListValue();
+ base::ListValue* results = new base::ListValue();
util::PostTaskToDatabaseThreadAndReply(
FROM_HERE,
base::Bind(&DoGetActiveIntervals, results, start, end),
@@ -445,20 +447,21 @@ void PerformanceMonitorHandler::HandleGetActiveIntervals(
base::Owned(results)));
}
-void PerformanceMonitorHandler::HandleGetFlagEnabled(const ListValue* args) {
+void PerformanceMonitorHandler::HandleGetFlagEnabled(
+ const base::ListValue* args) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
CHECK_EQ(0u, args->GetSize());
- scoped_ptr<Value> value(Value::CreateBooleanValue(
+ scoped_ptr<base::Value> value(base::Value::CreateBooleanValue(
CommandLine::ForCurrentProcess()->HasSwitch(
switches::kPerformanceMonitorGathering)));
ReturnResults("PerformanceMonitor.getFlagEnabledCallback", value.get());
}
void PerformanceMonitorHandler::HandleGetAggregationTypes(
- const ListValue* args) {
+ const base::ListValue* args) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
CHECK_EQ(0u, args->GetSize());
- ListValue results;
+ base::ListValue results;
for (int i = 0; i < AGGREGATION_METHOD_NUMBER_OF_METHODS; ++i) {
results.Append(
GetAggregationMethod(static_cast<AggregationMethod>(i)).release());
@@ -468,24 +471,25 @@ void PerformanceMonitorHandler::HandleGetAggregationTypes(
"PerformanceMonitor.getAggregationTypesCallback", &results);
}
-void PerformanceMonitorHandler::HandleGetEventTypes(const ListValue* args) {
+void PerformanceMonitorHandler::HandleGetEventTypes(
+ const base::ListValue* args) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
CHECK_EQ(0u, args->GetSize());
- ListValue results;
+ base::ListValue results;
for (int i = 0; i < EVENT_CATEGORY_NUMBER_OF_CATEGORIES; ++i)
results.Append(GetEventCategory(static_cast<EventCategory>(i)).release());
ReturnResults("PerformanceMonitor.getEventTypesCallback", &results);
}
-void PerformanceMonitorHandler::HandleGetEvents(const ListValue* args) {
+void PerformanceMonitorHandler::HandleGetEvents(const base::ListValue* args) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
CHECK_EQ(3u, args->GetSize());
- const ListValue* event_type_list;
+ const base::ListValue* event_type_list;
CHECK(args->GetList(0, &event_type_list));
std::set<EventType> event_types;
- for (ListValue::const_iterator iter = event_type_list->begin();
+ for (base::ListValue::const_iterator iter = event_type_list->begin();
iter != event_type_list->end(); ++iter) {
double event_type_double = 0.0;
CHECK((*iter)->GetAsDouble(&event_type_double));
@@ -501,7 +505,7 @@ void PerformanceMonitorHandler::HandleGetEvents(const ListValue* args) {
CHECK(args->GetDouble(2, &double_time));
base::Time end = base::Time::FromJsTime(double_time);
- ListValue* results = new ListValue();
+ base::ListValue* results = new base::ListValue();
util::PostTaskToDatabaseThreadAndReply(
FROM_HERE,
base::Bind(&DoGetEvents, results, event_types, start, end),
@@ -510,24 +514,25 @@ void PerformanceMonitorHandler::HandleGetEvents(const ListValue* args) {
base::Owned(results)));
}
-void PerformanceMonitorHandler::HandleGetMetricTypes(const ListValue* args) {
+void PerformanceMonitorHandler::HandleGetMetricTypes(
+ const base::ListValue* args) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
CHECK_EQ(0u, args->GetSize());
- ListValue results;
+ base::ListValue results;
for (int i = 0; i < METRIC_CATEGORY_NUMBER_OF_CATEGORIES; ++i)
results.Append(GetMetricCategory(static_cast<MetricCategory>(i)).release());
ReturnResults("PerformanceMonitor.getMetricTypesCallback", &results);
}
-void PerformanceMonitorHandler::HandleGetMetrics(const ListValue* args) {
+void PerformanceMonitorHandler::HandleGetMetrics(const base::ListValue* args) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
CHECK_EQ(5u, args->GetSize());
- const ListValue* metric_type_list;
+ const base::ListValue* metric_type_list;
CHECK(args->GetList(0, &metric_type_list));
std::set<MetricType> metric_types;
- for (ListValue::const_iterator iter = metric_type_list->begin();
+ for (base::ListValue::const_iterator iter = metric_type_list->begin();
iter != metric_type_list->end(); ++iter) {
double metric_type_double = 0.0;
CHECK((*iter)->GetAsDouble(&metric_type_double));
@@ -555,7 +560,7 @@ void PerformanceMonitorHandler::HandleGetMetrics(const ListValue* args) {
AggregationMethod aggregation_method =
static_cast<AggregationMethod>(static_cast<int>(aggregation_double));
- ListValue* results = new ListValue();
+ base::ListValue* results = new base::ListValue();
util::PostTaskToDatabaseThreadAndReply(
FROM_HERE,
base::Bind(&DoGetMetrics, results, metric_types,
diff --git a/chrome/browser/ui/webui/plugins_ui.cc b/chrome/browser/ui/webui/plugins_ui.cc
index 0564ecd..27807de 100644
--- a/chrome/browser/ui/webui/plugins_ui.cc
+++ b/chrome/browser/ui/webui/plugins_ui.cc
@@ -144,19 +144,19 @@ class PluginsDOMHandler : public WebUIMessageHandler,
virtual void RegisterMessages() OVERRIDE;
// Callback for the "requestPluginsData" message.
- void HandleRequestPluginsData(const ListValue* args);
+ void HandleRequestPluginsData(const base::ListValue* args);
// Callback for the "enablePlugin" message.
- void HandleEnablePluginMessage(const ListValue* args);
+ void HandleEnablePluginMessage(const base::ListValue* args);
// Callback for the "saveShowDetailsToPrefs" message.
- void HandleSaveShowDetailsToPrefs(const ListValue* args);
+ void HandleSaveShowDetailsToPrefs(const base::ListValue* args);
// Calback for the "getShowDetails" message.
- void HandleGetShowDetails(const ListValue* args);
+ void HandleGetShowDetails(const base::ListValue* args);
// Callback for the "setPluginAlwaysAllowed" message.
- void HandleSetPluginAlwaysAllowed(const ListValue* args);
+ void HandleSetPluginAlwaysAllowed(const base::ListValue* args);
// content::NotificationObserver method overrides
virtual void Observe(int type,
@@ -216,11 +216,11 @@ void PluginsDOMHandler::RegisterMessages() {
base::Unretained(this)));
}
-void PluginsDOMHandler::HandleRequestPluginsData(const ListValue* args) {
+void PluginsDOMHandler::HandleRequestPluginsData(const base::ListValue* args) {
LoadPlugins();
}
-void PluginsDOMHandler::HandleEnablePluginMessage(const ListValue* args) {
+void PluginsDOMHandler::HandleEnablePluginMessage(const base::ListValue* args) {
Profile* profile = Profile::FromWebUI(web_ui());
// Be robust in accepting badness since plug-ins display HTML (hence
@@ -270,7 +270,8 @@ void PluginsDOMHandler::HandleEnablePluginMessage(const ListValue* args) {
}
}
-void PluginsDOMHandler::HandleSaveShowDetailsToPrefs(const ListValue* args) {
+void PluginsDOMHandler::HandleSaveShowDetailsToPrefs(
+ const base::ListValue* args) {
std::string details_mode;
if (!args->GetString(0, &details_mode)) {
NOTREACHED();
@@ -279,12 +280,13 @@ void PluginsDOMHandler::HandleSaveShowDetailsToPrefs(const ListValue* args) {
show_details_.SetValue(details_mode == "true");
}
-void PluginsDOMHandler::HandleGetShowDetails(const ListValue* args) {
+void PluginsDOMHandler::HandleGetShowDetails(const base::ListValue* args) {
base::FundamentalValue show_details(show_details_.GetValue());
web_ui()->CallJavascriptFunction("loadShowDetailsFromPrefs", show_details);
}
-void PluginsDOMHandler::HandleSetPluginAlwaysAllowed(const ListValue* args) {
+void PluginsDOMHandler::HandleSetPluginAlwaysAllowed(
+ const base::ListValue* args) {
// Be robust in the input parameters, but crash in a Debug build.
if (args->GetSize() != 2) {
NOTREACHED();
@@ -346,11 +348,11 @@ void PluginsDOMHandler::PluginsLoaded(
}
// Construct DictionaryValues to return to UI.
- ListValue* plugin_groups_data = new ListValue();
+ base::ListValue* plugin_groups_data = new base::ListValue();
for (PluginGroups::const_iterator it = groups.begin();
it != groups.end(); ++it) {
const std::vector<const WebPluginInfo*>& group_plugins = it->second;
- ListValue* plugin_files = new ListValue();
+ base::ListValue* plugin_files = new base::ListValue();
scoped_ptr<PluginMetadata> plugin_metadata(
plugin_finder->GetPluginMetadata(*group_plugins[0]));
base::string16 group_name = plugin_metadata->name();
@@ -363,26 +365,28 @@ void PluginsDOMHandler::PluginsLoaded(
for (size_t j = 0; j < group_plugins.size(); ++j) {
const WebPluginInfo& group_plugin = *group_plugins[j];
- DictionaryValue* plugin_file = new DictionaryValue();
+ base::DictionaryValue* plugin_file = new base::DictionaryValue();
plugin_file->SetString("name", group_plugin.name);
plugin_file->SetString("description", group_plugin.desc);
plugin_file->SetString("path", group_plugin.path.value());
plugin_file->SetString("version", group_plugin.version);
plugin_file->SetString("type", PluginTypeToString(group_plugin.type));
- ListValue* mime_types = new ListValue();
+ base::ListValue* mime_types = new base::ListValue();
const std::vector<content::WebPluginMimeType>& plugin_mime_types =
group_plugin.mime_types;
for (size_t k = 0; k < plugin_mime_types.size(); ++k) {
- DictionaryValue* mime_type = new DictionaryValue();
+ base::DictionaryValue* mime_type = new base::DictionaryValue();
mime_type->SetString("mimeType", plugin_mime_types[k].mime_type);
mime_type->SetString("description", plugin_mime_types[k].description);
- ListValue* file_extensions = new ListValue();
+ base::ListValue* file_extensions = new base::ListValue();
const std::vector<std::string>& mime_file_extensions =
plugin_mime_types[k].file_extensions;
- for (size_t l = 0; l < mime_file_extensions.size(); ++l)
- file_extensions->Append(new StringValue(mime_file_extensions[l]));
+ for (size_t l = 0; l < mime_file_extensions.size(); ++l) {
+ file_extensions->Append(
+ new base::StringValue(mime_file_extensions[l]));
+ }
mime_type->Set("fileExtensions", file_extensions);
mime_types->Append(mime_type);
@@ -423,7 +427,7 @@ void PluginsDOMHandler::PluginsLoaded(
plugin_files->Append(plugin_file);
}
- DictionaryValue* group_data = new DictionaryValue();
+ base::DictionaryValue* group_data = new base::DictionaryValue();
group_data->Set("plugin_files", plugin_files);
group_data->SetString("name", group_name);
@@ -454,15 +458,16 @@ void PluginsDOMHandler::PluginsLoaded(
bool always_allowed = false;
if (group_enabled) {
- const DictionaryValue* whitelist = profile->GetPrefs()->GetDictionary(
- prefs::kContentSettingsPluginWhitelist);
+ const base::DictionaryValue* whitelist =
+ profile->GetPrefs()->GetDictionary(
+ prefs::kContentSettingsPluginWhitelist);
whitelist->GetBoolean(group_identifier, &always_allowed);
}
group_data->SetBoolean("alwaysAllowed", always_allowed);
plugin_groups_data->Append(group_data);
}
- DictionaryValue results;
+ base::DictionaryValue results;
results.Set("plugins", plugin_groups_data);
web_ui()->CallJavascriptFunction("returnPluginsData", results);
}
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
index 86141f0..68b056a 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -190,7 +190,7 @@ const int kPrivetPrinterSearchDurationSeconds = 3;
// Get the print job settings dictionary from |args|. The caller takes
// ownership of the returned DictionaryValue. Returns NULL on failure.
-DictionaryValue* GetSettingsDictionary(const ListValue* args) {
+base::DictionaryValue* GetSettingsDictionary(const base::ListValue* args) {
std::string json_str;
if (!args->GetString(0, &json_str)) {
NOTREACHED() << "Could not read JSON argument";
@@ -200,9 +200,10 @@ DictionaryValue* GetSettingsDictionary(const ListValue* args) {
NOTREACHED() << "Empty print job settings";
return NULL;
}
- scoped_ptr<DictionaryValue> settings(static_cast<DictionaryValue*>(
- base::JSONReader::Read(json_str)));
- if (!settings.get() || !settings->IsType(Value::TYPE_DICTIONARY)) {
+ scoped_ptr<base::DictionaryValue> settings(
+ static_cast<base::DictionaryValue*>(
+ base::JSONReader::Read(json_str)));
+ if (!settings.get() || !settings->IsType(base::Value::TYPE_DICTIONARY)) {
NOTREACHED() << "Print job settings must be a dictionary.";
return NULL;
}
@@ -216,7 +217,7 @@ DictionaryValue* GetSettingsDictionary(const ListValue* args) {
}
// Track the popularity of print settings and report the stats.
-void ReportPrintSettingsStats(const DictionaryValue& settings) {
+void ReportPrintSettingsStats(const base::DictionaryValue& settings) {
ReportPrintSettingHistogram(TOTAL);
bool landscape = false;
@@ -566,7 +567,7 @@ WebContents* PrintPreviewHandler::preview_web_contents() const {
return web_ui()->GetWebContents();
}
-void PrintPreviewHandler::HandleGetPrinters(const ListValue* /*args*/) {
+void PrintPreviewHandler::HandleGetPrinters(const base::ListValue* /*args*/) {
base::ListValue* results = new base::ListValue;
BrowserThread::PostTaskAndReply(
BrowserThread::FILE, FROM_HERE,
@@ -616,9 +617,9 @@ void PrintPreviewHandler::HandleGetPrivetPrinterCapabilities(
#endif
}
-void PrintPreviewHandler::HandleGetPreview(const ListValue* args) {
+void PrintPreviewHandler::HandleGetPreview(const base::ListValue* args) {
DCHECK_EQ(3U, args->GetSize());
- scoped_ptr<DictionaryValue> settings(GetSettingsDictionary(args));
+ scoped_ptr<base::DictionaryValue> settings(GetSettingsDictionary(args));
if (!settings.get())
return;
int request_id = -1;
@@ -688,7 +689,7 @@ void PrintPreviewHandler::HandleGetPreview(const ListValue* args) {
rvh->Send(new PrintMsg_PrintPreview(rvh->GetRoutingID(), *settings));
}
-void PrintPreviewHandler::HandlePrint(const ListValue* args) {
+void PrintPreviewHandler::HandlePrint(const base::ListValue* args) {
ReportStats();
// Record the number of times the user requests to regenerate preview data
@@ -702,7 +703,7 @@ void PrintPreviewHandler::HandlePrint(const ListValue* args) {
rvh->Send(new PrintMsg_ResetScriptedPrintCount(rvh->GetRoutingID()));
}
- scoped_ptr<DictionaryValue> settings(GetSettingsDictionary(args));
+ scoped_ptr<base::DictionaryValue> settings(GetSettingsDictionary(args));
if (!settings.get())
return;
@@ -844,14 +845,14 @@ void PrintPreviewHandler::PrintToPdf() {
}
}
-void PrintPreviewHandler::HandleHidePreview(const ListValue* /*args*/) {
+void PrintPreviewHandler::HandleHidePreview(const base::ListValue* /*args*/) {
PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(
web_ui()->GetController());
print_preview_ui->OnHidePreviewDialog();
}
void PrintPreviewHandler::HandleCancelPendingPrintRequest(
- const ListValue* /*args*/) {
+ const base::ListValue* /*args*/) {
WebContents* initiator = GetInitiator();
if (initiator)
ClearInitiatorDetails();
@@ -861,7 +862,7 @@ void PrintPreviewHandler::HandleCancelPendingPrintRequest(
chrome::ShowPrintErrorDialog(parent);
}
-void PrintPreviewHandler::HandleSaveAppState(const ListValue* args) {
+void PrintPreviewHandler::HandleSaveAppState(const base::ListValue* args) {
std::string data_to_save;
printing::StickySettings* sticky_settings = GetStickySettings();
if (args->GetString(0, &data_to_save) && !data_to_save.empty())
@@ -870,7 +871,8 @@ void PrintPreviewHandler::HandleSaveAppState(const ListValue* args) {
preview_web_contents()->GetBrowserContext())->GetPrefs());
}
-void PrintPreviewHandler::HandleGetPrinterCapabilities(const ListValue* args) {
+void PrintPreviewHandler::HandleGetPrinterCapabilities(
+ const base::ListValue* args) {
std::string printer_name;
bool ret = args->GetString(0, &printer_name);
if (!ret || printer_name.empty())
@@ -895,7 +897,7 @@ void PrintPreviewHandler::OnSigninComplete() {
print_preview_ui->OnReloadPrintersList();
}
-void PrintPreviewHandler::HandleSignin(const ListValue* /*args*/) {
+void PrintPreviewHandler::HandleSignin(const base::ListValue* /*args*/) {
gfx::NativeWindow modal_parent = platform_util::GetTopLevel(
preview_web_contents()->GetView()->GetNativeView());
print_dialog_cloud::CreateCloudPrintSigninDialog(
@@ -943,7 +945,8 @@ void PrintPreviewHandler::PrintWithCloudPrintDialog() {
ClosePreviewDialog();
}
-void PrintPreviewHandler::HandleManageCloudPrint(const ListValue* /*args*/) {
+void PrintPreviewHandler::HandleManageCloudPrint(
+ const base::ListValue* /*args*/) {
++manage_cloud_printers_dialog_request_count_;
Profile* profile = Profile::FromBrowserContext(
preview_web_contents()->GetBrowserContext());
@@ -956,7 +959,8 @@ void PrintPreviewHandler::HandleManageCloudPrint(const ListValue* /*args*/) {
false));
}
-void PrintPreviewHandler::HandleShowSystemDialog(const ListValue* /*args*/) {
+void PrintPreviewHandler::HandleShowSystemDialog(
+ const base::ListValue* /*args*/) {
ReportStats();
ReportUserActionHistogram(FALLBACK_TO_ADVANCED_SETTINGS_DIALOG);
@@ -975,7 +979,8 @@ void PrintPreviewHandler::HandleShowSystemDialog(const ListValue* /*args*/) {
print_preview_ui->OnCancelPendingPreviewRequest();
}
-void PrintPreviewHandler::HandleManagePrinters(const ListValue* /*args*/) {
+void PrintPreviewHandler::HandleManagePrinters(
+ const base::ListValue* /*args*/) {
++manage_printers_dialog_request_count_;
printing::PrinterManagerDialog::ShowPrinterManagerDialog();
}
@@ -991,7 +996,8 @@ void PrintPreviewHandler::HandlePrintWithCloudPrintDialog(
PrintWithCloudPrintDialog();
}
-void PrintPreviewHandler::HandleClosePreviewDialog(const ListValue* /*args*/) {
+void PrintPreviewHandler::HandleClosePreviewDialog(
+ const base::ListValue* /*args*/) {
ReportStats();
ReportUserActionHistogram(CANCEL);
@@ -1024,7 +1030,8 @@ void PrintPreviewHandler::GetNumberFormatAndMeasurementSystem(
settings->SetInteger(kMeasurementSystem, system);
}
-void PrintPreviewHandler::HandleGetInitialSettings(const ListValue* /*args*/) {
+void PrintPreviewHandler::HandleGetInitialSettings(
+ const base::ListValue* /*args*/) {
// Send before SendInitialSettings to allow cloud printer auto select.
SendCloudPrintEnabled();
BrowserThread::PostTaskAndReplyWithResult(
@@ -1034,7 +1041,7 @@ void PrintPreviewHandler::HandleGetInitialSettings(const ListValue* /*args*/) {
weak_factory_.GetWeakPtr()));
}
-void PrintPreviewHandler::HandleReportUiEvent(const ListValue* args) {
+void PrintPreviewHandler::HandleReportUiEvent(const base::ListValue* args) {
int event_group, event_number;
if (!args->GetInteger(0, &event_group) || !args->GetInteger(1, &event_number))
return;
@@ -1066,7 +1073,7 @@ void PrintPreviewHandler::HandleReportUiEvent(const ListValue* args) {
}
}
-void PrintPreviewHandler::HandleForceOpenNewTab(const ListValue* args) {
+void PrintPreviewHandler::HandleForceOpenNewTab(const base::ListValue* args) {
std::string url;
if (!args->GetString(0, &url))
return;
@@ -1125,12 +1132,13 @@ void PrintPreviewHandler::ClosePreviewDialog() {
void PrintPreviewHandler::SendAccessToken(const std::string& type,
const std::string& access_token) {
VLOG(1) << "Get getAccessToken finished";
- web_ui()->CallJavascriptFunction("onDidGetAccessToken", StringValue(type),
- StringValue(access_token));
+ web_ui()->CallJavascriptFunction("onDidGetAccessToken",
+ base::StringValue(type),
+ base::StringValue(access_token));
}
void PrintPreviewHandler::SendPrinterCapabilities(
- const DictionaryValue* settings_info) {
+ const base::DictionaryValue* settings_info) {
VLOG(1) << "Get printer capabilities finished";
#if defined(USE_CUPS)
@@ -1175,7 +1183,7 @@ void PrintPreviewHandler::SendCloudPrintJob(const base::RefCountedBytes* data) {
data->size());
std::string base64_data;
base::Base64Encode(raw_data, &base64_data);
- StringValue data_value(base64_data);
+ base::StringValue data_value(base64_data);
web_ui()->CallJavascriptFunction("printToCloud", data_value);
}
diff --git a/chrome/browser/ui/webui/print_preview/sticky_settings.cc b/chrome/browser/ui/webui/print_preview/sticky_settings.cc
index 626413b..9e3a61f 100644
--- a/chrome/browser/ui/webui/print_preview/sticky_settings.cc
+++ b/chrome/browser/ui/webui/print_preview/sticky_settings.cc
@@ -34,7 +34,7 @@ void StickySettings::StoreSavePath(const base::FilePath& path) {
void StickySettings::SaveInPrefs(PrefService* prefs) {
DCHECK(prefs);
if (prefs) {
- scoped_ptr<DictionaryValue> value(new DictionaryValue);
+ scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue);
if (save_path_.get())
value->SetString(printing::kSettingSavePath, save_path_->value());
if (printer_app_state_.get())
@@ -47,7 +47,7 @@ void StickySettings::SaveInPrefs(PrefService* prefs) {
void StickySettings::RestoreFromPrefs(PrefService* prefs) {
DCHECK(prefs);
if (prefs) {
- const DictionaryValue* value =
+ const base::DictionaryValue* value =
prefs->GetDictionary(prefs::kPrintPreviewStickySettings);
base::FilePath::StringType save_path;
diff --git a/chrome/browser/ui/webui/profiler_ui.cc b/chrome/browser/ui/webui/profiler_ui.cc
index 494f628..4df4a7a 100644
--- a/chrome/browser/ui/webui/profiler_ui.cc
+++ b/chrome/browser/ui/webui/profiler_ui.cc
@@ -121,8 +121,8 @@ class ProfilerMessageHandler : public WebUIMessageHandler {
virtual void RegisterMessages() OVERRIDE;
// Messages.
- void OnGetData(const ListValue* list);
- void OnResetData(const ListValue* list);
+ void OnGetData(const base::ListValue* list);
+ void OnResetData(const base::ListValue* list);
private:
DISALLOW_COPY_AND_ASSIGN(ProfilerMessageHandler);
@@ -138,12 +138,12 @@ void ProfilerMessageHandler::RegisterMessages() {
base::Unretained(this)));
}
-void ProfilerMessageHandler::OnGetData(const ListValue* list) {
+void ProfilerMessageHandler::OnGetData(const base::ListValue* list) {
ProfilerUI* profiler_ui = static_cast<ProfilerUI*>(web_ui()->GetController());
profiler_ui->GetData();
}
-void ProfilerMessageHandler::OnResetData(const ListValue* list) {
+void ProfilerMessageHandler::OnResetData(const base::ListValue* list) {
tracked_objects::ThreadData::ResetAllThreadData();
}
@@ -175,7 +175,7 @@ void ProfilerUI::ReceivedProfilerData(
const tracked_objects::ProcessDataSnapshot& profiler_data,
int process_type) {
// Serialize the data to JSON.
- DictionaryValue json_data;
+ base::DictionaryValue json_data;
task_profiler::TaskProfilerDataSerializer::ToValue(profiler_data,
process_type,
&json_data);
diff --git a/chrome/browser/ui/webui/set_as_default_browser_ui.cc b/chrome/browser/ui/webui/set_as_default_browser_ui.cc
index e7f8149..19b0b0a 100644
--- a/chrome/browser/ui/webui/set_as_default_browser_ui.cc
+++ b/chrome/browser/ui/webui/set_as_default_browser_ui.cc
@@ -116,7 +116,7 @@ class SetAsDefaultBrowserHandler
private:
// Handler for the 'Next' (or 'make Chrome the Metro browser') button.
- void HandleLaunchSetDefaultBrowserFlow(const ListValue* args);
+ void HandleLaunchSetDefaultBrowserFlow(const base::ListValue* args);
// Close this web ui.
void ConcludeInteraction(MakeChromeDefaultResult interaction_result);
@@ -182,7 +182,7 @@ bool SetAsDefaultBrowserHandler::IsInteractiveSetDefaultPermitted() {
}
void SetAsDefaultBrowserHandler::HandleLaunchSetDefaultBrowserFlow(
- const ListValue* args) {
+ const base::ListValue* args) {
set_default_returned_ = false;
set_default_result_ = false;
default_browser_worker_->StartSetAsDefault();
diff --git a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
index e69109d..37c3e9f 100644
--- a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
+++ b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
@@ -229,7 +229,7 @@ void UserManagerScreenHandler::HandleAuthenticatedLaunchUser(
void UserManagerScreenHandler::HandleRemoveUser(const base::ListValue* args) {
DCHECK(args);
- const Value* profile_path_value;
+ const base::Value* profile_path_value;
if (!args->Get(0, &profile_path_value))
return;
@@ -375,7 +375,7 @@ void UserManagerScreenHandler::GetLocalizedValues(
}
void UserManagerScreenHandler::SendUserList() {
- ListValue users_list;
+ base::ListValue users_list;
base::FilePath active_profile_path =
web_ui()->GetWebContents()->GetBrowserContext()->GetPath();
const ProfileInfoCache& info_cache =
@@ -385,7 +385,7 @@ void UserManagerScreenHandler::SendUserList() {
// certain actions (i.e. delete another user).
bool active_user_is_managed = Profile::FromWebUI(web_ui())->IsManaged();
for (size_t i = 0; i < info_cache.GetNumberOfProfiles(); ++i) {
- DictionaryValue* profile_value = new DictionaryValue();
+ base::DictionaryValue* profile_value = new base::DictionaryValue();
base::FilePath profile_path = info_cache.GetPathOfProfileAtIndex(i);
bool is_active_user = (profile_path == active_profile_path);
diff --git a/chrome/browser/ui/webui/signin_internals_ui.cc b/chrome/browser/ui/webui/signin_internals_ui.cc
index dbad788..304d1cd 100644
--- a/chrome/browser/ui/webui/signin_internals_ui.cc
+++ b/chrome/browser/ui/webui/signin_internals_ui.cc
@@ -52,9 +52,10 @@ SignInInternalsUI::~SignInInternalsUI() {
}
}
-bool SignInInternalsUI::OverrideHandleWebUIMessage(const GURL& source_url,
- const std::string& name,
- const ListValue& content) {
+bool SignInInternalsUI::OverrideHandleWebUIMessage(
+ const GURL& source_url,
+ const std::string& name,
+ const base::ListValue& content) {
if (name == "getSigninInfo") {
Profile* profile = Profile::FromWebUI(web_ui());
if (!profile)
@@ -78,7 +79,8 @@ bool SignInInternalsUI::OverrideHandleWebUIMessage(const GURL& source_url,
return false;
}
-void SignInInternalsUI::OnSigninStateChanged(scoped_ptr<DictionaryValue> info) {
+void SignInInternalsUI::OnSigninStateChanged(
+ scoped_ptr<base::DictionaryValue> info) {
const std::string& event_handler = "chrome.signin.onSigninInfoChanged.fire";
web_ui()->CallJavascriptFunction(event_handler, *info);
}
diff --git a/chrome/browser/ui/webui/signin_internals_ui.h b/chrome/browser/ui/webui/signin_internals_ui.h
index 511a5c5..8dab32f 100644
--- a/chrome/browser/ui/webui/signin_internals_ui.h
+++ b/chrome/browser/ui/webui/signin_internals_ui.h
@@ -26,7 +26,8 @@ class SignInInternalsUI : public content::WebUIController,
const base::ListValue& args) OVERRIDE;
// AboutSigninInternals::Observer::OnSigninStateChanged implementation.
- virtual void OnSigninStateChanged(scoped_ptr<DictionaryValue> info) OVERRIDE;
+ virtual void OnSigninStateChanged(
+ scoped_ptr<base::DictionaryValue> info) OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(SignInInternalsUI);
diff --git a/chrome/browser/ui/webui/sync_file_system_internals/extension_statuses_handler.cc b/chrome/browser/ui/webui/sync_file_system_internals/extension_statuses_handler.cc
index 5456172..1849ec9 100644
--- a/chrome/browser/ui/webui/sync_file_system_internals/extension_statuses_handler.cc
+++ b/chrome/browser/ui/webui/sync_file_system_internals/extension_statuses_handler.cc
@@ -61,7 +61,7 @@ void ExtensionStatusesHandler::GetExtensionStatusesAsDictionary(
if (!extension)
continue;
- base::DictionaryValue* dict = new DictionaryValue;
+ base::DictionaryValue* dict = new base::DictionaryValue;
dict->SetString("extensionID", extension_id);
dict->SetString("extensionName", extension->name());
dict->SetString("status", itr->second);
diff --git a/chrome/browser/ui/webui/sync_file_system_internals/sync_file_system_internals_handler.cc b/chrome/browser/ui/webui/sync_file_system_internals/sync_file_system_internals_handler.cc
index 6f08453..b8af67a 100644
--- a/chrome/browser/ui/webui/sync_file_system_internals/sync_file_system_internals_handler.cc
+++ b/chrome/browser/ui/webui/sync_file_system_internals/sync_file_system_internals_handler.cc
@@ -118,7 +118,7 @@ void SyncFileSystemInternalsHandler::GetLog(
if (log_entry->id <= last_log_id_sent)
continue;
- base::DictionaryValue* dict = new DictionaryValue;
+ base::DictionaryValue* dict = new base::DictionaryValue;
dict->SetInteger("id", log_entry->id);
dict->SetString("time",
google_apis::util::FormatTimeAsStringLocaltime(log_entry->when));
diff --git a/chrome/browser/ui/webui/sync_internals_ui.cc b/chrome/browser/ui/webui/sync_internals_ui.cc
index cdf31d5..18da81f 100644
--- a/chrome/browser/ui/webui/sync_internals_ui.cc
+++ b/chrome/browser/ui/webui/sync_internals_ui.cc
@@ -96,10 +96,11 @@ SyncInternalsUI::~SyncInternalsUI() {
}
}
-bool SyncInternalsUI::OverrideHandleWebUIMessage(const GURL& source_url,
- const std::string& name,
- const ListValue& content) {
- scoped_ptr<ListValue> content_copy(content.DeepCopy());
+bool SyncInternalsUI::OverrideHandleWebUIMessage(
+ const GURL& source_url,
+ const std::string& name,
+ const base::ListValue& content) {
+ scoped_ptr<base::ListValue> content_copy(content.DeepCopy());
JsArgList args(content_copy.get());
VLOG(1) << "Received message: " << name << " with args "
<< args.ToString();
@@ -110,7 +111,7 @@ bool SyncInternalsUI::OverrideHandleWebUIMessage(const GURL& source_url,
} else if (name == "getAboutInfo") {
// We handle this case directly because it needs to work even if
// the sync service doesn't exist.
- ListValue return_args;
+ base::ListValue return_args;
Profile* profile = Profile::FromWebUI(web_ui());
ProfileSyncService* service = GetProfileSyncService(profile);
return_args.Append(
@@ -134,7 +135,7 @@ void SyncInternalsUI::HandleJsEvent(
VLOG(1) << "Handling event: " << name << " with details "
<< details.ToString();
const std::string& event_handler = "chrome.sync." + name + ".fire";
- std::vector<const Value*> arg_list(1, &details.Get());
+ std::vector<const base::Value*> arg_list(1, &details.Get());
web_ui()->CallJavascriptFunction(event_handler, arg_list);
}
@@ -143,6 +144,7 @@ void SyncInternalsUI::HandleJsReply(
VLOG(1) << "Handling reply for " << name << " message with args "
<< args.ToString();
const std::string& reply_handler = "chrome.sync." + name + ".handleReply";
- std::vector<const Value*> arg_list(args.Get().begin(), args.Get().end());
+ std::vector<const base::Value*> arg_list(
+ args.Get().begin(), args.Get().end());
web_ui()->CallJavascriptFunction(reply_handler, arg_list);
}
diff --git a/chrome/browser/ui/webui/sync_internals_ui_unittest.cc b/chrome/browser/ui/webui/sync_internals_ui_unittest.cc
index 02ad293..8351137 100644
--- a/chrome/browser/ui/webui/sync_internals_ui_unittest.cc
+++ b/chrome/browser/ui/webui/sync_internals_ui_unittest.cc
@@ -119,16 +119,16 @@ TEST_F(SyncInternalsUITestWithService, HandleJsReply) {
ExecuteJavascript(
ASCIIToUTF16("chrome.sync.testMessage.handleReply(5,true);")));
- ListValue args;
- args.Append(Value::CreateIntegerValue(5));
- args.Append(Value::CreateBooleanValue(true));
+ base::ListValue args;
+ args.Append(base::Value::CreateIntegerValue(5));
+ args.Append(base::Value::CreateBooleanValue(true));
sync_internals_ui_->HandleJsReply("testMessage", JsArgList(&args));
}
TEST_F(SyncInternalsUITestWithService, OnWebUISendBasic) {
const std::string& name = "testName";
- ListValue args;
- args.Append(Value::CreateIntegerValue(10));
+ base::ListValue args;
+ args.Append(base::Value::CreateIntegerValue(10));
EXPECT_CALL(mock_js_controller_,
ProcessJsMessage(name, HasArgsAsList(args), _));
@@ -185,17 +185,17 @@ TEST_F(SyncInternalsUITestWithoutService, HandleJsReply) {
ExecuteJavascript(
ASCIIToUTF16("chrome.sync.testMessage.handleReply(5,true);")));
- ListValue args;
- args.Append(Value::CreateIntegerValue(5));
- args.Append(Value::CreateBooleanValue(true));
+ base::ListValue args;
+ args.Append(base::Value::CreateIntegerValue(5));
+ args.Append(base::Value::CreateBooleanValue(true));
sync_internals_ui_->HandleJsReply(
"testMessage", JsArgList(&args));
}
TEST_F(SyncInternalsUITestWithoutService, OnWebUISendBasic) {
const std::string& name = "testName";
- ListValue args;
- args.Append(Value::CreateIntegerValue(5));
+ base::ListValue args;
+ args.Append(base::Value::CreateIntegerValue(5));
// Should drop the message.
sync_internals_ui_->OverrideHandleWebUIMessage(GURL(), name, args);
@@ -209,7 +209,7 @@ TEST_F(SyncInternalsUITestWithoutService, OnWebUISendGetAboutInfo) {
EXPECT_CALL(*web_ui_,
ExecuteJavascript(ASCIIToUTF16(kAboutInfoCall)));
- ListValue args;
+ base::ListValue args;
sync_internals_ui_->OverrideHandleWebUIMessage(
GURL(), "getAboutInfo", args);
}
diff --git a/chrome/browser/ui/webui/sync_setup_handler.cc b/chrome/browser/ui/webui/sync_setup_handler.cc
index 7b4c1bf..06614fd 100644
--- a/chrome/browser/ui/webui/sync_setup_handler.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler.cc
@@ -113,8 +113,8 @@ ModelTypeNameMap GetSelectableTypeNameMap() {
}
bool GetConfiguration(const std::string& json, SyncConfigInfo* config) {
- scoped_ptr<Value> parsed_value(base::JSONReader::Read(json));
- DictionaryValue* result;
+ scoped_ptr<base::Value> parsed_value(base::JSONReader::Read(json));
+ base::DictionaryValue* result;
if (!parsed_value || !parsed_value->GetAsDictionary(&result)) {
DLOG(ERROR) << "GetConfiguration() not passed a Dictionary";
return false;
@@ -190,12 +190,13 @@ SyncSetupHandler::~SyncSetupHandler() {
CloseSyncSetup();
}
-void SyncSetupHandler::GetLocalizedValues(DictionaryValue* localized_strings) {
+void SyncSetupHandler::GetLocalizedValues(
+ base::DictionaryValue* localized_strings) {
GetStaticLocalizedValues(localized_strings, web_ui());
}
void SyncSetupHandler::GetStaticLocalizedValues(
- DictionaryValue* localized_strings,
+ base::DictionaryValue* localized_strings,
content::WebUI* web_ui) {
DCHECK(localized_strings);
@@ -332,7 +333,7 @@ void SyncSetupHandler::DisplayConfigureSync(bool show_advanced,
// passwords)
// usePassphrase: true if the data is encrypted with a secondary passphrase
// show_passphrase: true if a passphrase is needed to decrypt the sync data
- DictionaryValue args;
+ base::DictionaryValue args;
// Tell the UI layer which data types are registered/enabled by the user.
const syncer::ModelTypeSet registered_types =
@@ -406,7 +407,7 @@ void SyncSetupHandler::DisplayConfigureSync(bool show_advanced,
GetStringUTF16(IDS_SYNC_FULL_ENCRYPTION_DATA));
}
- StringValue page("configure");
+ base::StringValue page("configure");
web_ui()->CallJavascriptFunction(
"SyncSetupOverlay.showSyncSetupPage", page, args);
@@ -416,7 +417,7 @@ void SyncSetupHandler::DisplayConfigureSync(bool show_advanced,
}
void SyncSetupHandler::ConfigureSyncDone() {
- StringValue page("done");
+ base::StringValue page("done");
web_ui()->CallJavascriptFunction(
"SyncSetupOverlay.showSyncSetupPage", page);
@@ -536,8 +537,8 @@ bool SyncSetupHandler::PrepareSyncSetup() {
void SyncSetupHandler::DisplaySpinner() {
configuring_sync_ = true;
- StringValue page("spinner");
- DictionaryValue args;
+ base::StringValue page("spinner");
+ base::DictionaryValue args;
const int kTimeoutSec = 30;
DCHECK(!backend_start_timer_);
@@ -559,13 +560,13 @@ void SyncSetupHandler::DisplayTimeout() {
// Do not listen to sync startup events.
sync_startup_tracker_.reset();
- StringValue page("timeout");
- DictionaryValue args;
+ base::StringValue page("timeout");
+ base::DictionaryValue args;
web_ui()->CallJavascriptFunction(
"SyncSetupOverlay.showSyncSetupPage", page, args);
}
-void SyncSetupHandler::OnDidClosePage(const ListValue* args) {
+void SyncSetupHandler::OnDidClosePage(const base::ListValue* args) {
CloseSyncSetup();
}
@@ -598,7 +599,7 @@ ProfileSyncService* SyncSetupHandler::GetSyncService() const {
ProfileSyncServiceFactory::GetForProfile(GetProfile()) : NULL;
}
-void SyncSetupHandler::HandleConfigure(const ListValue* args) {
+void SyncSetupHandler::HandleConfigure(const base::ListValue* args) {
DCHECK(!sync_startup_tracker_);
std::string json;
if (!args->GetString(0, &json)) {
@@ -716,7 +717,7 @@ void SyncSetupHandler::HandleConfigure(const ListValue* args) {
ProfileMetrics::LogProfileSyncInfo(ProfileMetrics::SYNC_CHOOSE);
}
-void SyncSetupHandler::HandleShowSetupUI(const ListValue* args) {
+void SyncSetupHandler::HandleShowSetupUI(const base::ListValue* args) {
ProfileSyncService* service = GetSyncService();
DCHECK(service);
@@ -751,21 +752,21 @@ void SyncSetupHandler::HandleShowSetupUI(const ListValue* args) {
#if defined(OS_CHROMEOS)
// On ChromeOS, we need to sign out the user session to fix an auth error, so
// the user goes through the real signin flow to generate a new auth token.
-void SyncSetupHandler::HandleDoSignOutOnAuthError(const ListValue* args) {
+void SyncSetupHandler::HandleDoSignOutOnAuthError(const base::ListValue* args) {
DVLOG(1) << "Signing out the user to fix a sync error.";
chrome::AttemptUserExit();
}
#endif
#if !defined(OS_CHROMEOS)
-void SyncSetupHandler::HandleStartSignin(const ListValue* args) {
+void SyncSetupHandler::HandleStartSignin(const base::ListValue* args) {
// Should only be called if the user is not already signed in.
DCHECK(SigninManagerFactory::GetForProfile(GetProfile())->
GetAuthenticatedUsername().empty());
OpenSyncSetup();
}
-void SyncSetupHandler::HandleStopSyncing(const ListValue* args) {
+void SyncSetupHandler::HandleStopSyncing(const base::ListValue* args) {
if (GetSyncService())
ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS);
#if !defined(OS_CHROMEOS)
@@ -774,7 +775,7 @@ void SyncSetupHandler::HandleStopSyncing(const ListValue* args) {
}
#endif
-void SyncSetupHandler::HandleCloseTimeout(const ListValue* args) {
+void SyncSetupHandler::HandleCloseTimeout(const base::ListValue* args) {
CloseSyncSetup();
}
@@ -885,7 +886,7 @@ void SyncSetupHandler::FocusUI() {
void SyncSetupHandler::CloseUI() {
CloseSyncSetup();
- StringValue page("done");
+ base::StringValue page("done");
web_ui()->CallJavascriptFunction(
"SyncSetupOverlay.showSyncSetupPage", page);
}
diff --git a/chrome/browser/ui/webui/sync_setup_handler_unittest.cc b/chrome/browser/ui/webui/sync_setup_handler_unittest.cc
index b72c06b..d6eff19 100644
--- a/chrome/browser/ui/webui/sync_setup_handler_unittest.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler_unittest.cc
@@ -68,12 +68,12 @@ enum EncryptAllConfig {
// Create a json-format string with the key/value pairs appropriate for a call
// to HandleConfigure(). If |extra_values| is non-null, then the values from
// the passed dictionary are added to the json.
-std::string GetConfiguration(const DictionaryValue* extra_values,
+std::string GetConfiguration(const base::DictionaryValue* extra_values,
SyncAllDataConfig sync_all,
syncer::ModelTypeSet types,
const std::string& passphrase,
EncryptAllConfig encrypt_all) {
- DictionaryValue result;
+ base::DictionaryValue result;
if (extra_values)
result.MergeDictionary(extra_values);
result.SetBoolean("syncAllDataTypes", sync_all == SYNC_ALL_DATA);
@@ -100,7 +100,7 @@ std::string GetConfiguration(const DictionaryValue* extra_values,
// Checks whether the passed |dictionary| contains a |key| with the given
// |expected_value|. If |omit_if_false| is true, then the value should only
// be present if |expected_value| is true.
-void CheckBool(const DictionaryValue* dictionary,
+void CheckBool(const base::DictionaryValue* dictionary,
const std::string& key,
bool expected_value,
bool omit_if_false) {
@@ -116,7 +116,7 @@ void CheckBool(const DictionaryValue* dictionary,
}
}
-void CheckBool(const DictionaryValue* dictionary,
+void CheckBool(const base::DictionaryValue* dictionary,
const std::string& key,
bool expected_value) {
return CheckBool(dictionary, key, expected_value, false);
@@ -125,7 +125,7 @@ void CheckBool(const DictionaryValue* dictionary,
// Checks to make sure that the values stored in |dictionary| match the values
// expected by the showSyncSetupPage() JS function for a given set of data
// types.
-void CheckConfigDataTypeArguments(DictionaryValue* dictionary,
+void CheckConfigDataTypeArguments(base::DictionaryValue* dictionary,
SyncAllDataConfig config,
syncer::ModelTypeSet types) {
CheckBool(dictionary, "syncAllDataTypes", config == SYNC_ALL_DATA);
@@ -234,8 +234,8 @@ class TestWebUI : public content::WebUI {
public:
CallData() : arg1(NULL), arg2(NULL) {}
std::string function_name;
- Value* arg1;
- Value* arg2;
+ base::Value* arg1;
+ base::Value* arg2;
};
const std::vector<CallData>& call_data() { return call_data_; }
private:
@@ -507,7 +507,7 @@ TEST_F(SyncSetupHandlerTest,
EXPECT_EQ("SyncSetupOverlay.showSyncSetupPage", data1.function_name);
ASSERT_TRUE(data1.arg1->GetAsString(&page));
EXPECT_EQ(page, "configure");
- DictionaryValue* dictionary;
+ base::DictionaryValue* dictionary;
ASSERT_TRUE(data1.arg2->GetAsDictionary(&dictionary));
CheckBool(dictionary, "passphraseFailed", false);
CheckBool(dictionary, "showSyncEverythingPage", false);
@@ -641,8 +641,8 @@ TEST_F(SyncSetupHandlerNonCrosTest, GaiaErrorInitializingSync) {
TEST_F(SyncSetupHandlerTest, TestSyncEverything) {
std::string args = GetConfiguration(
NULL, SYNC_ALL_DATA, GetAllTypes(), std::string(), ENCRYPT_PASSWORDS);
- ListValue list_args;
- list_args.Append(new StringValue(args));
+ base::ListValue list_args;
+ list_args.Append(new base::StringValue(args));
EXPECT_CALL(*mock_pss_, IsPassphraseRequiredForDecryption())
.WillRepeatedly(Return(false));
EXPECT_CALL(*mock_pss_, IsPassphraseRequired())
@@ -659,8 +659,8 @@ TEST_F(SyncSetupHandlerTest, TestSyncEverything) {
TEST_F(SyncSetupHandlerTest, TestSyncNothing) {
std::string args = GetConfiguration(
NULL, SYNC_NOTHING, GetAllTypes(), std::string(), ENCRYPT_PASSWORDS);
- ListValue list_args;
- list_args.Append(new StringValue(args));
+ base::ListValue list_args;
+ list_args.Append(new base::StringValue(args));
EXPECT_CALL(*mock_pss_, DisableForUser());
SetupInitializedProfileSyncService();
handler_->HandleConfigure(&list_args);
@@ -674,8 +674,8 @@ TEST_F(SyncSetupHandlerTest, TestSyncNothing) {
TEST_F(SyncSetupHandlerTest, TurnOnEncryptAll) {
std::string args = GetConfiguration(
NULL, SYNC_ALL_DATA, GetAllTypes(), std::string(), ENCRYPT_ALL_DATA);
- ListValue list_args;
- list_args.Append(new StringValue(args));
+ base::ListValue list_args;
+ list_args.Append(new base::StringValue(args));
EXPECT_CALL(*mock_pss_, IsPassphraseRequiredForDecryption())
.WillRepeatedly(Return(false));
EXPECT_CALL(*mock_pss_, IsPassphraseRequired())
@@ -693,8 +693,8 @@ TEST_F(SyncSetupHandlerTest, TurnOnEncryptAll) {
TEST_F(SyncSetupHandlerTest, TestPassphraseStillRequired) {
std::string args = GetConfiguration(
NULL, SYNC_ALL_DATA, GetAllTypes(), std::string(), ENCRYPT_PASSWORDS);
- ListValue list_args;
- list_args.Append(new StringValue(args));
+ base::ListValue list_args;
+ list_args.Append(new base::StringValue(args));
EXPECT_CALL(*mock_pss_, IsPassphraseRequiredForDecryption())
.WillRepeatedly(Return(true));
EXPECT_CALL(*mock_pss_, IsPassphraseRequired())
@@ -712,15 +712,15 @@ TEST_F(SyncSetupHandlerTest, TestPassphraseStillRequired) {
}
TEST_F(SyncSetupHandlerTest, SuccessfullySetPassphrase) {
- DictionaryValue dict;
+ base::DictionaryValue dict;
dict.SetBoolean("isGooglePassphrase", true);
std::string args = GetConfiguration(&dict,
SYNC_ALL_DATA,
GetAllTypes(),
"gaiaPassphrase",
ENCRYPT_PASSWORDS);
- ListValue list_args;
- list_args.Append(new StringValue(args));
+ base::ListValue list_args;
+ list_args.Append(new base::StringValue(args));
// Act as if an encryption passphrase is required the first time, then never
// again after that.
EXPECT_CALL(*mock_pss_, IsPassphraseRequired()).WillOnce(Return(true));
@@ -739,15 +739,15 @@ TEST_F(SyncSetupHandlerTest, SuccessfullySetPassphrase) {
}
TEST_F(SyncSetupHandlerTest, SelectCustomEncryption) {
- DictionaryValue dict;
+ base::DictionaryValue dict;
dict.SetBoolean("isGooglePassphrase", false);
std::string args = GetConfiguration(&dict,
SYNC_ALL_DATA,
GetAllTypes(),
"custom_passphrase",
ENCRYPT_PASSWORDS);
- ListValue list_args;
- list_args.Append(new StringValue(args));
+ base::ListValue list_args;
+ list_args.Append(new base::StringValue(args));
EXPECT_CALL(*mock_pss_, IsPassphraseRequiredForDecryption())
.WillRepeatedly(Return(false));
EXPECT_CALL(*mock_pss_, IsPassphraseRequired())
@@ -766,15 +766,15 @@ TEST_F(SyncSetupHandlerTest, SelectCustomEncryption) {
}
TEST_F(SyncSetupHandlerTest, UnsuccessfullySetPassphrase) {
- DictionaryValue dict;
+ base::DictionaryValue dict;
dict.SetBoolean("isGooglePassphrase", true);
std::string args = GetConfiguration(&dict,
SYNC_ALL_DATA,
GetAllTypes(),
"invalid_passphrase",
ENCRYPT_PASSWORDS);
- ListValue list_args;
- list_args.Append(new StringValue(args));
+ base::ListValue list_args;
+ list_args.Append(new base::StringValue(args));
EXPECT_CALL(*mock_pss_, IsPassphraseRequiredForDecryption())
.WillRepeatedly(Return(true));
EXPECT_CALL(*mock_pss_, IsPassphraseRequired())
@@ -795,7 +795,7 @@ TEST_F(SyncSetupHandlerTest, UnsuccessfullySetPassphrase) {
// Make sure we display an error message to the user due to the failed
// passphrase.
const TestWebUI::CallData& data = web_ui_.call_data()[0];
- DictionaryValue* dictionary;
+ base::DictionaryValue* dictionary;
ASSERT_TRUE(data.arg2->GetAsDictionary(&dictionary));
CheckBool(dictionary, "passphraseFailed", true);
}
@@ -813,8 +813,8 @@ TEST_F(SyncSetupHandlerTest, TestSyncIndividualTypes) {
type_to_set,
std::string(),
ENCRYPT_PASSWORDS);
- ListValue list_args;
- list_args.Append(new StringValue(args));
+ base::ListValue list_args;
+ list_args.Append(new base::StringValue(args));
EXPECT_CALL(*mock_pss_, IsPassphraseRequiredForDecryption())
.WillRepeatedly(Return(false));
EXPECT_CALL(*mock_pss_, IsPassphraseRequired())
@@ -836,8 +836,8 @@ TEST_F(SyncSetupHandlerTest, TestSyncAllManually) {
GetAllTypes(),
std::string(),
ENCRYPT_PASSWORDS);
- ListValue list_args;
- list_args.Append(new StringValue(args));
+ base::ListValue list_args;
+ list_args.Append(new base::StringValue(args));
EXPECT_CALL(*mock_pss_, IsPassphraseRequiredForDecryption())
.WillRepeatedly(Return(false));
EXPECT_CALL(*mock_pss_, IsPassphraseRequired())
@@ -919,7 +919,7 @@ TEST_F(SyncSetupHandlerTest, ShowSetupSyncEverything) {
ExpectConfig();
const TestWebUI::CallData& data = web_ui_.call_data()[0];
- DictionaryValue* dictionary;
+ base::DictionaryValue* dictionary;
ASSERT_TRUE(data.arg2->GetAsDictionary(&dictionary));
CheckBool(dictionary, "showSyncEverythingPage", false);
CheckBool(dictionary, "syncAllDataTypes", true);
@@ -953,7 +953,7 @@ TEST_F(SyncSetupHandlerTest, ShowSetupManuallySyncAll) {
ExpectConfig();
const TestWebUI::CallData& data = web_ui_.call_data()[0];
- DictionaryValue* dictionary;
+ base::DictionaryValue* dictionary;
ASSERT_TRUE(data.arg2->GetAsDictionary(&dictionary));
CheckConfigDataTypeArguments(dictionary, CHOOSE_WHAT_TO_SYNC, GetAllTypes());
}
@@ -983,7 +983,7 @@ TEST_F(SyncSetupHandlerTest, ShowSetupSyncForAllTypesIndividually) {
LoginUIServiceFactory::GetForProfile(profile_.get())->LoginUIClosed(
handler_.get());
const TestWebUI::CallData& data = web_ui_.call_data()[0];
- DictionaryValue* dictionary;
+ base::DictionaryValue* dictionary;
ASSERT_TRUE(data.arg2->GetAsDictionary(&dictionary));
CheckConfigDataTypeArguments(dictionary, CHOOSE_WHAT_TO_SYNC, types);
Mock::VerifyAndClearExpectations(mock_pss_);
@@ -1005,7 +1005,7 @@ TEST_F(SyncSetupHandlerTest, ShowSetupGaiaPassphraseRequired) {
ExpectConfig();
const TestWebUI::CallData& data = web_ui_.call_data()[0];
- DictionaryValue* dictionary;
+ base::DictionaryValue* dictionary;
ASSERT_TRUE(data.arg2->GetAsDictionary(&dictionary));
CheckBool(dictionary, "showPassphrase", true);
CheckBool(dictionary, "usePassphrase", false);
@@ -1027,7 +1027,7 @@ TEST_F(SyncSetupHandlerTest, ShowSetupCustomPassphraseRequired) {
ExpectConfig();
const TestWebUI::CallData& data = web_ui_.call_data()[0];
- DictionaryValue* dictionary;
+ base::DictionaryValue* dictionary;
ASSERT_TRUE(data.arg2->GetAsDictionary(&dictionary));
CheckBool(dictionary, "showPassphrase", true);
CheckBool(dictionary, "usePassphrase", true);
@@ -1049,7 +1049,7 @@ TEST_F(SyncSetupHandlerTest, ShowSetupEncryptAll) {
ExpectConfig();
const TestWebUI::CallData& data = web_ui_.call_data()[0];
- DictionaryValue* dictionary;
+ base::DictionaryValue* dictionary;
ASSERT_TRUE(data.arg2->GetAsDictionary(&dictionary));
CheckBool(dictionary, "encryptAllData", true);
}
diff --git a/chrome/browser/ui/webui/system_info_ui.cc b/chrome/browser/ui/webui/system_info_ui.cc
index 7d757e5..6563ff8 100644
--- a/chrome/browser/ui/webui/system_info_ui.cc
+++ b/chrome/browser/ui/webui/system_info_ui.cc
@@ -123,7 +123,7 @@ void SystemInfoUIHTMLSource::SysInfoComplete(
}
void SystemInfoUIHTMLSource::RequestComplete() {
- DictionaryValue strings;
+ base::DictionaryValue strings;
strings.SetString("title", l10n_util::GetStringUTF16(IDS_ABOUT_SYS_TITLE));
strings.SetString("description",
l10n_util::GetStringUTF16(IDS_ABOUT_SYS_DESC));
@@ -144,12 +144,12 @@ void SystemInfoUIHTMLSource::RequestComplete() {
l10n_util::GetStringUTF16(IDS_ABOUT_SYS_PARSE_ERROR));
webui::SetFontAndTextDirection(&strings);
if (response_.get()) {
- ListValue* details = new ListValue();
+ base::ListValue* details = new base::ListValue();
strings.Set("details", details);
for (SystemLogsResponse::const_iterator it = response_->begin();
it != response_->end();
++it) {
- DictionaryValue* val = new DictionaryValue;
+ base::DictionaryValue* val = new base::DictionaryValue;
val->SetString("statName", it->first);
val->SetString("statValue", it->second);
details->Append(val);
diff --git a/chrome/browser/ui/webui/task_manager/task_manager_dialog.cc b/chrome/browser/ui/webui/task_manager/task_manager_dialog.cc
index b4228cf..774a51b 100644
--- a/chrome/browser/ui/webui/task_manager/task_manager_dialog.cc
+++ b/chrome/browser/ui/webui/task_manager/task_manager_dialog.cc
@@ -85,7 +85,7 @@ class TaskManagerDialogImpl : public WebDialogDelegate {
#if !defined(TOOLKIT_VIEWS)
// If dialog's bounds are previously saved, use them.
if (g_browser_process->local_state()) {
- const DictionaryValue* placement_pref =
+ const base::DictionaryValue* placement_pref =
g_browser_process->local_state()->GetDictionary(
prefs::kTaskManagerWindowPlacement);
int width, height;
@@ -128,7 +128,7 @@ class TaskManagerDialogImpl : public WebDialogDelegate {
if (g_browser_process->local_state()) {
DictionaryPrefUpdate update(g_browser_process->local_state(),
prefs::kTaskManagerWindowPlacement);
- DictionaryValue* placement_pref = update.Get();
+ base::DictionaryValue* placement_pref = update.Get();
placement_pref->SetInteger("width", dialog_size.width());
placement_pref->SetInteger("height", dialog_size.height());
}
diff --git a/chrome/browser/ui/webui/task_manager/task_manager_handler.cc b/chrome/browser/ui/webui/task_manager/task_manager_handler.cc
index 98ecf46..1ebdb1f 100644
--- a/chrome/browser/ui/webui/task_manager/task_manager_handler.cc
+++ b/chrome/browser/ui/webui/task_manager/task_manager_handler.cc
@@ -108,7 +108,7 @@ void TaskManagerHandler::RegisterMessages() {
base::Unretained(this)));
}
-static int parseIndex(const Value* value) {
+static int parseIndex(const base::Value* value) {
int index = -1;
base::string16 base::string16_index;
double double_index;
@@ -123,8 +123,9 @@ static int parseIndex(const Value* value) {
return index;
}
-void TaskManagerHandler::HandleKillProcesses(const ListValue* unique_ids) {
- for (ListValue::const_iterator i = unique_ids->begin();
+void TaskManagerHandler::HandleKillProcesses(
+ const base::ListValue* unique_ids) {
+ for (base::ListValue::const_iterator i = unique_ids->begin();
i != unique_ids->end(); ++i) {
int unique_id = parseIndex(*i);
int resource_index = model_->GetResourceIndexByUniqueId(unique_id);
@@ -135,8 +136,8 @@ void TaskManagerHandler::HandleKillProcesses(const ListValue* unique_ids) {
}
}
-void TaskManagerHandler::HandleActivatePage(const ListValue* unique_ids) {
- for (ListValue::const_iterator i = unique_ids->begin();
+void TaskManagerHandler::HandleActivatePage(const base::ListValue* unique_ids) {
+ for (base::ListValue::const_iterator i = unique_ids->begin();
i != unique_ids->end(); ++i) {
int unique_id = parseIndex(*i);
int resource_index = model_->GetResourceIndexByUniqueId(unique_id);
@@ -148,8 +149,8 @@ void TaskManagerHandler::HandleActivatePage(const ListValue* unique_ids) {
}
}
-void TaskManagerHandler::HandleInspect(const ListValue* unique_ids) {
- for (ListValue::const_iterator i = unique_ids->begin();
+void TaskManagerHandler::HandleInspect(const base::ListValue* unique_ids) {
+ for (base::ListValue::const_iterator i = unique_ids->begin();
i != unique_ids->end(); ++i) {
int unique_id = parseIndex(*i);
int resource_index = model_->GetResourceIndexByUniqueId(unique_id);
@@ -162,7 +163,7 @@ void TaskManagerHandler::HandleInspect(const ListValue* unique_ids) {
}
}
-void TaskManagerHandler::DisableTaskManager(const ListValue* indexes) {
+void TaskManagerHandler::DisableTaskManager(const base::ListValue* indexes) {
if (!is_enabled_)
return;
@@ -171,7 +172,7 @@ void TaskManagerHandler::DisableTaskManager(const ListValue* indexes) {
model_->RemoveObserver(this);
}
-void TaskManagerHandler::EnableTaskManager(const ListValue* indexes) {
+void TaskManagerHandler::EnableTaskManager(const base::ListValue* indexes) {
if (is_enabled_)
return;
@@ -183,7 +184,7 @@ void TaskManagerHandler::EnableTaskManager(const ListValue* indexes) {
model_->StartUpdating();
}
-void TaskManagerHandler::OpenAboutMemory(const ListValue* indexes) {
+void TaskManagerHandler::OpenAboutMemory(const base::ListValue* indexes) {
content::RenderViewHost* rvh =
web_ui()->GetWebContents()->GetRenderViewHost();
if (rvh) {
@@ -197,7 +198,7 @@ void TaskManagerHandler::OpenAboutMemory(const ListValue* indexes) {
task_manager_->OpenAboutMemory(chrome::GetActiveDesktop());
}
-void TaskManagerHandler::HandleSetUpdateColumn(const ListValue* args) {
+void TaskManagerHandler::HandleSetUpdateColumn(const base::ListValue* args) {
DCHECK_EQ(2U, args->GetSize());
bool ret = true;
@@ -248,7 +249,7 @@ void TaskManagerHandler::OnReadyPeriodicalUpdate() {
base::DictionaryValue* TaskManagerHandler::CreateTaskGroupValue(
int group_index) {
- DictionaryValue* val = new DictionaryValue();
+ base::DictionaryValue* val = new base::DictionaryValue();
if (group_index >= model_->GroupCount())
return val;
@@ -281,8 +282,8 @@ base::DictionaryValue* TaskManagerHandler::CreateTaskGroupValue(
void TaskManagerHandler::CreateGroupColumnList(const std::string& column_name,
const int index,
const int length,
- DictionaryValue* val) {
- ListValue* list = new ListValue();
+ base::DictionaryValue* val) {
+ base::ListValue* list = new base::ListValue();
for (int i = index; i < (index + length); ++i) {
list->Append(CreateColumnValue(column_name, i));
}
@@ -293,91 +294,93 @@ base::Value* TaskManagerHandler::CreateColumnValue(
const std::string& column_name,
const int i) {
if (column_name == "uniqueId")
- return Value::CreateIntegerValue(model_->GetResourceUniqueId(i));
+ return base::Value::CreateIntegerValue(model_->GetResourceUniqueId(i));
if (column_name == "type") {
- return Value::CreateStringValue(
+ return base::Value::CreateStringValue(
TaskManager::Resource::GetResourceTypeAsString(
model_->GetResourceType(i)));
}
if (column_name == "processId")
- return Value::CreateStringValue(model_->GetResourceProcessId(i));
+ return base::Value::CreateStringValue(model_->GetResourceProcessId(i));
if (column_name == "processIdValue")
- return Value::CreateIntegerValue(model_->GetProcessId(i));
+ return base::Value::CreateIntegerValue(model_->GetProcessId(i));
if (column_name == "cpuUsage")
- return Value::CreateStringValue(model_->GetResourceCPUUsage(i));
+ return base::Value::CreateStringValue(model_->GetResourceCPUUsage(i));
if (column_name == "cpuUsageValue")
- return Value::CreateDoubleValue(model_->GetCPUUsage(i));
+ return base::Value::CreateDoubleValue(model_->GetCPUUsage(i));
if (column_name == "privateMemory")
- return Value::CreateStringValue(model_->GetResourcePrivateMemory(i));
+ return base::Value::CreateStringValue(model_->GetResourcePrivateMemory(i));
if (column_name == "privateMemoryValue") {
size_t private_memory;
model_->GetPrivateMemory(i, &private_memory);
- return Value::CreateDoubleValue(private_memory);
+ return base::Value::CreateDoubleValue(private_memory);
}
if (column_name == "sharedMemory")
- return Value::CreateStringValue(model_->GetResourceSharedMemory(i));
+ return base::Value::CreateStringValue(model_->GetResourceSharedMemory(i));
if (column_name == "sharedMemoryValue") {
size_t shared_memory;
model_->GetSharedMemory(i, &shared_memory);
- return Value::CreateDoubleValue(shared_memory);
+ return base::Value::CreateDoubleValue(shared_memory);
}
if (column_name == "physicalMemory")
- return Value::CreateStringValue(model_->GetResourcePhysicalMemory(i));
+ return base::Value::CreateStringValue(model_->GetResourcePhysicalMemory(i));
if (column_name == "physicalMemoryValue") {
size_t physical_memory;
model_->GetPhysicalMemory(i, &physical_memory);
- return Value::CreateDoubleValue(physical_memory);
+ return base::Value::CreateDoubleValue(physical_memory);
}
if (column_name == "icon") {
ui::ScaleFactor icon_scale_factor = web_ui()->GetDeviceScaleFactor();
const gfx::ImageSkia& image = model_->GetResourceIcon(i);
const gfx::ImageSkiaRep image_rep =
image.GetRepresentation(icon_scale_factor);
- return Value::CreateStringValue(
+ return base::Value::CreateStringValue(
webui::GetBitmapDataUrl(image_rep.sk_bitmap()));
}
if (column_name == "title")
- return Value::CreateStringValue(model_->GetResourceTitle(i));
+ return base::Value::CreateStringValue(model_->GetResourceTitle(i));
if (column_name == "profileName")
- return Value::CreateStringValue(model_->GetResourceProfileName(i));
+ return base::Value::CreateStringValue(model_->GetResourceProfileName(i));
if (column_name == "networkUsage")
- return Value::CreateStringValue(model_->GetResourceNetworkUsage(i));
+ return base::Value::CreateStringValue(model_->GetResourceNetworkUsage(i));
if (column_name == "networkUsageValue")
- return Value::CreateDoubleValue(model_->GetNetworkUsage(i));
+ return base::Value::CreateDoubleValue(model_->GetNetworkUsage(i));
if (column_name == "webCoreImageCacheSize") {
- return Value::CreateStringValue(
+ return base::Value::CreateStringValue(
model_->GetResourceWebCoreImageCacheSize(i));
}
if (column_name == "webCoreImageCacheSizeValue") {
blink::WebCache::ResourceTypeStats resource_stats;
model_->GetWebCoreCacheStats(i, &resource_stats);
- return Value::CreateDoubleValue(resource_stats.images.size);
+ return base::Value::CreateDoubleValue(resource_stats.images.size);
}
if (column_name == "webCoreScriptsCacheSize") {
- return Value::CreateStringValue(
+ return base::Value::CreateStringValue(
model_->GetResourceWebCoreScriptsCacheSize(i));
}
if (column_name == "webCoreScriptsCacheSizeValue") {
blink::WebCache::ResourceTypeStats resource_stats;
model_->GetWebCoreCacheStats(i, &resource_stats);
- return Value::CreateDoubleValue(resource_stats.scripts.size);
+ return base::Value::CreateDoubleValue(resource_stats.scripts.size);
+ }
+ if (column_name == "webCoreCSSCacheSize") {
+ return base::Value::CreateStringValue(
+ model_->GetResourceWebCoreCSSCacheSize(i));
}
- if (column_name == "webCoreCSSCacheSize")
- return Value::CreateStringValue(model_->GetResourceWebCoreCSSCacheSize(i));
if (column_name == "webCoreCSSCacheSizeValue") {
blink::WebCache::ResourceTypeStats resource_stats;
model_->GetWebCoreCacheStats(i, &resource_stats);
- return Value::CreateDoubleValue(resource_stats.cssStyleSheets.size);
+ return base::Value::CreateDoubleValue(resource_stats.cssStyleSheets.size);
}
if (column_name == "fps")
- return Value::CreateStringValue(model_->GetResourceFPS(i));
+ return base::Value::CreateStringValue(model_->GetResourceFPS(i));
if (column_name == "fpsValue") {
float fps;
model_->GetFPS(i, &fps);
- return Value::CreateDoubleValue(fps);
+ return base::Value::CreateDoubleValue(fps);
}
if (column_name == "videoMemory")
- return Value::CreateStringValue(model_->GetResourceVideoMemory(i));
+ return base::Value::CreateStringValue(model_->GetResourceVideoMemory(i));
if (column_name == "videoMemoryValue") {
size_t video_memory;
bool has_duplicates;
@@ -386,32 +389,36 @@ base::Value* TaskManagerHandler::CreateColumnValue(
value = static_cast<double>(video_memory);
else
value = 0;
- return Value::CreateDoubleValue(value);
+ return base::Value::CreateDoubleValue(value);
+ }
+ if (column_name == "sqliteMemoryUsed") {
+ return base::Value::CreateStringValue(
+ model_->GetResourceSqliteMemoryUsed(i));
}
- if (column_name == "sqliteMemoryUsed")
- return Value::CreateStringValue(model_->GetResourceSqliteMemoryUsed(i));
if (column_name == "sqliteMemoryUsedValue") {
size_t sqlite_memory;
model_->GetSqliteMemoryUsedBytes(i, &sqlite_memory);
- return Value::CreateDoubleValue(sqlite_memory);
+ return base::Value::CreateDoubleValue(sqlite_memory);
+ }
+ if (column_name == "goatsTeleported") {
+ return base::Value::CreateStringValue(
+ model_->GetResourceGoatsTeleported(i));
}
- if (column_name == "goatsTeleported")
- return Value::CreateStringValue(model_->GetResourceGoatsTeleported(i));
if (column_name == "goatsTeleportedValue")
- return Value::CreateIntegerValue(model_->GetGoatsTeleported(i));
+ return base::Value::CreateIntegerValue(model_->GetGoatsTeleported(i));
if (column_name == "v8MemoryAllocatedSize") {
- return Value::CreateStringValue(
+ return base::Value::CreateStringValue(
model_->GetResourceV8MemoryAllocatedSize(i));
}
if (column_name == "v8MemoryAllocatedSizeValue") {
size_t v8_memory;
model_->GetV8Memory(i, &v8_memory);
- return Value::CreateDoubleValue(v8_memory);
+ return base::Value::CreateDoubleValue(v8_memory);
}
if (column_name == "canInspect")
- return Value::CreateBooleanValue(model_->CanInspect(i));
+ return base::Value::CreateBooleanValue(model_->CanInspect(i));
if (column_name == "canActivate")
- return Value::CreateBooleanValue(model_->CanActivate(i));
+ return base::Value::CreateBooleanValue(model_->CanActivate(i));
NOTREACHED();
return NULL;
diff --git a/chrome/browser/ui/webui/translate_internals/translate_internals_handler.cc b/chrome/browser/ui/webui/translate_internals/translate_internals_handler.cc
index 7a052b7..b75981e 100644
--- a/chrome/browser/ui/webui/translate_internals/translate_internals_handler.cc
+++ b/chrome/browser/ui/webui/translate_internals/translate_internals_handler.cc
@@ -170,14 +170,14 @@ void TranslateInternalsHandler::SendSupportedLanguagesToJs() {
base::Time last_updated =
TranslateManager::GetSupportedLanguagesLastUpdated();
- ListValue* languages_list = new ListValue();
- ListValue* alpha_languages_list = new ListValue();
+ base::ListValue* languages_list = new base::ListValue();
+ base::ListValue* alpha_languages_list = new base::ListValue();
for (std::vector<std::string>::iterator it = languages.begin();
it != languages.end(); ++it) {
const std::string& lang = *it;
- languages_list->Append(new StringValue(lang));
+ languages_list->Append(new base::StringValue(lang));
if (TranslateManager::IsAlphaLanguage(lang))
- alpha_languages_list->Append(new StringValue(lang));
+ alpha_languages_list->Append(new base::StringValue(lang));
}
dict.Set("languages", languages_list);
diff --git a/chrome/browser/ui/webui/uber/uber_ui.cc b/chrome/browser/ui/webui/uber/uber_ui.cc
index da6daaa..297a7f4 100644
--- a/chrome/browser/ui/webui/uber/uber_ui.cc
+++ b/chrome/browser/ui/webui/uber/uber_ui.cc
@@ -165,7 +165,7 @@ void UberUI::RenderViewReused(RenderViewHost* render_view_host) {
bool UberUI::OverrideHandleWebUIMessage(const GURL& source_url,
const std::string& message,
- const ListValue& args) {
+ const base::ListValue& args) {
// Find the appropriate subpage and forward the message.
SubpageMap::iterator subpage = sub_uis_.find(source_url.GetOrigin().spec());
if (subpage == sub_uis_.end()) {
diff --git a/chrome/browser/ui/webui/uber/uber_ui.h b/chrome/browser/ui/webui/uber/uber_ui.h
index a9f4946..e8e7f38 100644
--- a/chrome/browser/ui/webui/uber/uber_ui.h
+++ b/chrome/browser/ui/webui/uber/uber_ui.h
@@ -25,7 +25,7 @@ class UberUI : public content::WebUIController {
// WebUIController implementation.
virtual bool OverrideHandleWebUIMessage(const GURL& source_url,
const std::string& message,
- const ListValue& args) OVERRIDE;
+ const base::ListValue& args) OVERRIDE;
// We forward these to |sub_uis_|.
virtual void RenderViewCreated(
diff --git a/chrome/browser/ui/webui/version_handler.cc b/chrome/browser/ui/webui/version_handler.cc
index bd61eae..6a1af51 100644
--- a/chrome/browser/ui/webui/version_handler.cc
+++ b/chrome/browser/ui/webui/version_handler.cc
@@ -61,7 +61,7 @@ void VersionHandler::RegisterMessages() {
base::Unretained(this)));
}
-void VersionHandler::HandleRequestVersionInfo(const ListValue* args) {
+void VersionHandler::HandleRequestVersionInfo(const base::ListValue* args) {
#if defined(ENABLE_PLUGINS)
// The Flash version information is needed in the response, so make sure
// the plugins are loaded.
@@ -104,10 +104,10 @@ void VersionHandler::HandleRequestVersionInfo(const ListValue* args) {
chrome_variations::GetFieldTrialActiveGroupIdsAsStrings(&variations);
#endif
- ListValue variations_list;
+ base::ListValue variations_list;
for (std::vector<std::string>::const_iterator it = variations.begin();
it != variations.end(); ++it) {
- variations_list.Append(Value::CreateStringValue(*it));
+ variations_list.Append(base::Value::CreateStringValue(*it));
}
// In release mode, this will return an empty list to clear the section.
@@ -118,8 +118,8 @@ void VersionHandler::OnGotFilePaths(base::string16* executable_path_data,
base::string16* profile_path_data) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
- StringValue exec_path(*executable_path_data);
- StringValue profile_path(*profile_path_data);
+ base::StringValue exec_path(*executable_path_data);
+ base::StringValue profile_path(*profile_path_data);
web_ui()->CallJavascriptFunction("returnFilePaths", exec_path, profile_path);
}
@@ -143,7 +143,7 @@ void VersionHandler::OnGotPlugins(
}
}
- StringValue arg(flash_version);
+ base::StringValue arg(flash_version);
web_ui()->CallJavascriptFunction("returnFlashVersion", arg);
}
#endif // defined(ENABLE_PLUGINS)
diff --git a/chrome/browser/ui/webui/version_handler.h b/chrome/browser/ui/webui/version_handler.h
index f705da5..13583b9 100644
--- a/chrome/browser/ui/webui/version_handler.h
+++ b/chrome/browser/ui/webui/version_handler.h
@@ -24,7 +24,7 @@ class VersionHandler : public content::WebUIMessageHandler {
// Callback for the "requestVersionInfo" message. This asynchronously requests
// the flash version and eventually returns it to the front end along with the
// list of variations using OnGotPlugins.
- virtual void HandleRequestVersionInfo(const ListValue* args);
+ virtual void HandleRequestVersionInfo(const base::ListValue* args);
private:
// Callback which handles returning the executable and profile paths to the
diff --git a/chrome/browser/ui/webui/version_handler_chromeos.cc b/chrome/browser/ui/webui/version_handler_chromeos.cc
index eda8373..46f31ef 100644
--- a/chrome/browser/ui/webui/version_handler_chromeos.cc
+++ b/chrome/browser/ui/webui/version_handler_chromeos.cc
@@ -13,7 +13,8 @@ VersionHandlerChromeOS::VersionHandlerChromeOS() {
VersionHandlerChromeOS::~VersionHandlerChromeOS() {
}
-void VersionHandlerChromeOS::HandleRequestVersionInfo(const ListValue* args) {
+void VersionHandlerChromeOS::HandleRequestVersionInfo(
+ const base::ListValue* args) {
// Start the asynchronous load of the version.
loader_.GetVersion(
chromeos::VersionLoader::VERSION_FULL,
@@ -25,6 +26,6 @@ void VersionHandlerChromeOS::HandleRequestVersionInfo(const ListValue* args) {
}
void VersionHandlerChromeOS::OnVersion(const std::string& version) {
- StringValue arg(version);
+ base::StringValue arg(version);
web_ui()->CallJavascriptFunction("returnOsVersion", arg);
}
diff --git a/chrome/browser/ui/webui/version_handler_chromeos.h b/chrome/browser/ui/webui/version_handler_chromeos.h
index 8a7c6d1..f87bd03 100644
--- a/chrome/browser/ui/webui/version_handler_chromeos.h
+++ b/chrome/browser/ui/webui/version_handler_chromeos.h
@@ -18,7 +18,7 @@ class VersionHandlerChromeOS : public VersionHandler {
virtual ~VersionHandlerChromeOS();
// VersionHandler overrides:
- virtual void HandleRequestVersionInfo(const ListValue* args) OVERRIDE;
+ virtual void HandleRequestVersionInfo(const base::ListValue* args) OVERRIDE;
// Callback from chromeos::VersionLoader giving the version.
void OnVersion(const std::string& version);
diff --git a/chrome/browser/ui/webui/web_ui_test_handler.cc b/chrome/browser/ui/webui/web_ui_test_handler.cc
index 0c347e4..de7131c 100644
--- a/chrome/browser/ui/webui/web_ui_test_handler.cc
+++ b/chrome/browser/ui/webui/web_ui_test_handler.cc
@@ -58,7 +58,7 @@ void WebUITestHandler::RegisterMessages() {
base::Bind(&WebUITestHandler::HandleTestResult, base::Unretained(this)));
}
-void WebUITestHandler::HandleTestResult(const ListValue* test_result) {
+void WebUITestHandler::HandleTestResult(const base::ListValue* test_result) {
// Quit the message loop if |is_waiting_| so waiting process can get result or
// error. To ensure this gets done, do this before ASSERT* calls.
if (is_waiting_)
diff --git a/chrome/browser/ui/webui/welcome_handler_android.cc b/chrome/browser/ui/webui/welcome_handler_android.cc
index a585bb3..a854fde 100644
--- a/chrome/browser/ui/webui/welcome_handler_android.cc
+++ b/chrome/browser/ui/webui/welcome_handler_android.cc
@@ -41,15 +41,16 @@ void WelcomeHandler::RegisterMessages() {
observer_manager_.Add(sync_service_);
}
-void WelcomeHandler::HandleUpdateSyncFooterVisibility(const ListValue* args) {
+void WelcomeHandler::HandleUpdateSyncFooterVisibility(
+ const base::ListValue* args) {
UpdateSyncFooterVisibility(true);
}
-void WelcomeHandler::HandleShowSyncSettings(const ListValue* args) {
+void WelcomeHandler::HandleShowSyncSettings(const base::ListValue* args) {
chrome::android::ChromiumApplication::ShowSyncSettings();
}
-void WelcomeHandler::HandleShowTermsOfService(const ListValue* args) {
+void WelcomeHandler::HandleShowTermsOfService(const base::ListValue* args) {
chrome::android::ChromiumApplication::ShowTermsOfServiceDialog();
}
diff --git a/chrome/browser/ui/webui/welcome_handler_android.h b/chrome/browser/ui/webui/welcome_handler_android.h
index b22f895..e289430 100644
--- a/chrome/browser/ui/webui/welcome_handler_android.h
+++ b/chrome/browser/ui/webui/welcome_handler_android.h
@@ -26,15 +26,15 @@ class WelcomeHandler : public content::WebUIMessageHandler,
// Callback for the "updateSyncFooterVisibility" message. This makes the sync
// footer in the page visible if sync is enabled.
- void HandleUpdateSyncFooterVisibility(const ListValue* args);
+ void HandleUpdateSyncFooterVisibility(const base::ListValue* args);
// Callback for the "showSyncSettings" message. This opens the sync settings
// menu fragment.
- void HandleShowSyncSettings(const ListValue* args);
+ void HandleShowSyncSettings(const base::ListValue* args);
// Callback for the "showTermsOfService" message. This opens the terms of
// service popup.
- void HandleShowTermsOfService(const ListValue* args);
+ void HandleShowTermsOfService(const base::ListValue* args);
// ProfileSyncServiceObserver implementation
virtual void OnStateChanged() OVERRIDE;
diff --git a/chrome/browser/ui/window_sizer/window_sizer.cc b/chrome/browser/ui/window_sizer/window_sizer.cc
index acbbb71..f621ab2 100644
--- a/chrome/browser/ui/window_sizer/window_sizer.cc
+++ b/chrome/browser/ui/window_sizer/window_sizer.cc
@@ -52,7 +52,7 @@ class DefaultStateProvider : public WindowSizer::StateProvider {
return false;
std::string window_name(chrome::GetWindowPlacementKey(browser_));
- const DictionaryValue* wp_pref =
+ const base::DictionaryValue* wp_pref =
browser_->profile()->GetPrefs()->GetDictionary(window_name.c_str());
int top = 0, left = 0, bottom = 0, right = 0;
bool maximized = false;
diff --git a/chrome/browser/value_store/leveldb_value_store.cc b/chrome/browser/value_store/leveldb_value_store.cc
index c092b33..043bcb3 100644
--- a/chrome/browser/value_store/leveldb_value_store.cc
+++ b/chrome/browser/value_store/leveldb_value_store.cc
@@ -91,12 +91,12 @@ ValueStore::ReadResult LeveldbValueStore::Get(const std::string& key) {
if (open_error)
return MakeReadResult(open_error.Pass());
- scoped_ptr<Value> setting;
+ scoped_ptr<base::Value> setting;
scoped_ptr<Error> error = ReadFromDb(leveldb::ReadOptions(), key, &setting);
if (error)
return MakeReadResult(error.Pass());
- DictionaryValue* settings = new DictionaryValue();
+ base::DictionaryValue* settings = new base::DictionaryValue();
if (setting)
settings->SetWithoutPathExpansion(key, setting.release());
return MakeReadResult(make_scoped_ptr(settings));
@@ -111,7 +111,7 @@ ValueStore::ReadResult LeveldbValueStore::Get(
return MakeReadResult(open_error.Pass());
leveldb::ReadOptions options;
- scoped_ptr<DictionaryValue> settings(new DictionaryValue());
+ scoped_ptr<base::DictionaryValue> settings(new base::DictionaryValue());
// All interaction with the db is done on the same thread, so snapshotting
// isn't strictly necessary. This is just defensive.
@@ -119,7 +119,7 @@ ValueStore::ReadResult LeveldbValueStore::Get(
options.snapshot = snapshot.get();
for (std::vector<std::string>::const_iterator it = keys.begin();
it != keys.end(); ++it) {
- scoped_ptr<Value> setting;
+ scoped_ptr<base::Value> setting;
scoped_ptr<Error> error = ReadFromDb(options, *it, &setting);
if (error)
return MakeReadResult(error.Pass());
@@ -141,14 +141,14 @@ ValueStore::ReadResult LeveldbValueStore::Get() {
leveldb::ReadOptions options = leveldb::ReadOptions();
// All interaction with the db is done on the same thread, so snapshotting
// isn't strictly necessary. This is just defensive.
- scoped_ptr<DictionaryValue> settings(new DictionaryValue());
+ scoped_ptr<base::DictionaryValue> settings(new base::DictionaryValue());
ScopedSnapshot snapshot(db_.get());
options.snapshot = snapshot.get();
scoped_ptr<leveldb::Iterator> it(db_->NewIterator(options));
for (it->SeekToFirst(); it->Valid(); it->Next()) {
std::string key = it->key().ToString();
- Value* value = json_reader.ReadToValue(it->value().ToString());
+ base::Value* value = json_reader.ReadToValue(it->value().ToString());
if (!value) {
return MakeReadResult(
Error::Create(CORRUPTION, kInvalidJson, util::NewKey(key)));
@@ -168,7 +168,7 @@ ValueStore::ReadResult LeveldbValueStore::Get() {
}
ValueStore::WriteResult LeveldbValueStore::Set(
- WriteOptions options, const std::string& key, const Value& value) {
+ WriteOptions options, const std::string& key, const base::Value& value) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
scoped_ptr<Error> open_error = EnsureDbIsOpen();
@@ -188,7 +188,7 @@ ValueStore::WriteResult LeveldbValueStore::Set(
}
ValueStore::WriteResult LeveldbValueStore::Set(
- WriteOptions options, const DictionaryValue& settings) {
+ WriteOptions options, const base::DictionaryValue& settings) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
scoped_ptr<Error> open_error = EnsureDbIsOpen();
@@ -198,7 +198,8 @@ ValueStore::WriteResult LeveldbValueStore::Set(
leveldb::WriteBatch batch;
scoped_ptr<ValueStoreChangeList> changes(new ValueStoreChangeList());
- for (DictionaryValue::Iterator it(settings); !it.IsAtEnd(); it.Advance()) {
+ for (base::DictionaryValue::Iterator it(settings);
+ !it.IsAtEnd(); it.Advance()) {
scoped_ptr<Error> batch_error =
AddToBatch(options, it.key(), it.value(), &batch, changes.get());
if (batch_error)
@@ -228,7 +229,7 @@ ValueStore::WriteResult LeveldbValueStore::Remove(
for (std::vector<std::string>::const_iterator it = keys.begin();
it != keys.end(); ++it) {
- scoped_ptr<Value> old_value;
+ scoped_ptr<base::Value> old_value;
scoped_ptr<Error> read_error =
ReadFromDb(leveldb::ReadOptions(), *it, &old_value);
if (read_error)
@@ -257,7 +258,7 @@ ValueStore::WriteResult LeveldbValueStore::Clear() {
base::DictionaryValue& whole_db = read_result->settings();
while (!whole_db.empty()) {
- std::string next_key = DictionaryValue::Iterator(whole_db).key();
+ std::string next_key = base::DictionaryValue::Iterator(whole_db).key();
scoped_ptr<base::Value> next_value;
whole_db.RemoveWithoutPathExpansion(next_key, &next_value);
changes->push_back(
@@ -292,7 +293,7 @@ scoped_ptr<ValueStore::Error> LeveldbValueStore::EnsureDbIsOpen() {
scoped_ptr<ValueStore::Error> LeveldbValueStore::ReadFromDb(
leveldb::ReadOptions options,
const std::string& key,
- scoped_ptr<Value>* setting) {
+ scoped_ptr<base::Value>* setting) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
DCHECK(setting);
@@ -308,7 +309,7 @@ scoped_ptr<ValueStore::Error> LeveldbValueStore::ReadFromDb(
if (!s.ok())
return ToValueStoreError(s, util::NewKey(key));
- Value* value = base::JSONReader().ReadToValue(value_as_json);
+ base::Value* value = base::JSONReader().ReadToValue(value_as_json);
if (!value)
return Error::Create(CORRUPTION, kInvalidJson, util::NewKey(key));
@@ -325,7 +326,7 @@ scoped_ptr<ValueStore::Error> LeveldbValueStore::AddToBatch(
bool write_new_value = true;
if (!(options & NO_GENERATE_CHANGES)) {
- scoped_ptr<Value> old_value;
+ scoped_ptr<base::Value> old_value;
scoped_ptr<Error> read_error =
ReadFromDb(leveldb::ReadOptions(), key, &old_value);
if (read_error)
diff --git a/chrome/browser/value_store/leveldb_value_store.h b/chrome/browser/value_store/leveldb_value_store.h
index ce6e484..91217e3 100644
--- a/chrome/browser/value_store/leveldb_value_store.h
+++ b/chrome/browser/value_store/leveldb_value_store.h
@@ -39,9 +39,9 @@ class LeveldbValueStore : public ValueStore {
virtual WriteResult Set(
WriteOptions options,
const std::string& key,
- const Value& value) OVERRIDE;
+ const base::Value& value) OVERRIDE;
virtual WriteResult Set(
- WriteOptions options, const DictionaryValue& values) OVERRIDE;
+ WriteOptions options, const base::DictionaryValue& values) OVERRIDE;
virtual WriteResult Remove(const std::string& key) OVERRIDE;
virtual WriteResult Remove(const std::vector<std::string>& keys) OVERRIDE;
virtual WriteResult Clear() OVERRIDE;
@@ -55,7 +55,7 @@ class LeveldbValueStore : public ValueStore {
leveldb::ReadOptions options,
const std::string& key,
// Will be reset() with the result, if any.
- scoped_ptr<Value>* setting);
+ scoped_ptr<base::Value>* setting);
// Adds a setting to a WriteBatch, and logs the change in |changes|. For use
// with WriteToDb.
diff --git a/chrome/browser/value_store/testing_value_store.cc b/chrome/browser/value_store/testing_value_store.cc
index 594e0bd..c8d177c 100644
--- a/chrome/browser/value_store/testing_value_store.cc
+++ b/chrome/browser/value_store/testing_value_store.cc
@@ -46,10 +46,10 @@ ValueStore::ReadResult TestingValueStore::Get(
if (error_code_ != OK)
return MakeReadResult(TestingError());
- DictionaryValue* settings = new DictionaryValue();
+ base::DictionaryValue* settings = new base::DictionaryValue();
for (std::vector<std::string>::const_iterator it = keys.begin();
it != keys.end(); ++it) {
- Value* value = NULL;
+ base::Value* value = NULL;
if (storage_.GetWithoutPathExpansion(*it, &value)) {
settings->SetWithoutPathExpansion(*it, value->DeepCopy());
}
@@ -65,21 +65,22 @@ ValueStore::ReadResult TestingValueStore::Get() {
}
ValueStore::WriteResult TestingValueStore::Set(
- WriteOptions options, const std::string& key, const Value& value) {
- DictionaryValue settings;
+ WriteOptions options, const std::string& key, const base::Value& value) {
+ base::DictionaryValue settings;
settings.SetWithoutPathExpansion(key, value.DeepCopy());
return Set(options, settings);
}
ValueStore::WriteResult TestingValueStore::Set(
- WriteOptions options, const DictionaryValue& settings) {
+ WriteOptions options, const base::DictionaryValue& settings) {
write_count_++;
if (error_code_ != OK)
return MakeWriteResult(TestingError());
scoped_ptr<ValueStoreChangeList> changes(new ValueStoreChangeList());
- for (DictionaryValue::Iterator it(settings); !it.IsAtEnd(); it.Advance()) {
- Value* old_value = NULL;
+ for (base::DictionaryValue::Iterator it(settings);
+ !it.IsAtEnd(); it.Advance()) {
+ base::Value* old_value = NULL;
if (!storage_.GetWithoutPathExpansion(it.key(), &old_value) ||
!old_value->Equals(&it.value())) {
changes->push_back(
@@ -106,7 +107,7 @@ ValueStore::WriteResult TestingValueStore::Remove(
scoped_ptr<ValueStoreChangeList> changes(new ValueStoreChangeList());
for (std::vector<std::string>::const_iterator it = keys.begin();
it != keys.end(); ++it) {
- scoped_ptr<Value> old_value;
+ scoped_ptr<base::Value> old_value;
if (storage_.RemoveWithoutPathExpansion(*it, &old_value)) {
changes->push_back(ValueStoreChange(*it, old_value.release(), NULL));
}
@@ -116,7 +117,8 @@ ValueStore::WriteResult TestingValueStore::Remove(
ValueStore::WriteResult TestingValueStore::Clear() {
std::vector<std::string> keys;
- for (DictionaryValue::Iterator it(storage_); !it.IsAtEnd(); it.Advance()) {
+ for (base::DictionaryValue::Iterator it(storage_);
+ !it.IsAtEnd(); it.Advance()) {
keys.push_back(it.key());
}
return Remove(keys);
diff --git a/chrome/browser/value_store/testing_value_store.h b/chrome/browser/value_store/testing_value_store.h
index f0be2b9..53fc7c8 100644
--- a/chrome/browser/value_store/testing_value_store.h
+++ b/chrome/browser/value_store/testing_value_store.h
@@ -37,9 +37,9 @@ class TestingValueStore : public ValueStore {
virtual WriteResult Set(
WriteOptions options,
const std::string& key,
- const Value& value) OVERRIDE;
+ const base::Value& value) OVERRIDE;
virtual WriteResult Set(
- WriteOptions options, const DictionaryValue& values) OVERRIDE;
+ WriteOptions options, const base::DictionaryValue& values) OVERRIDE;
virtual WriteResult Remove(const std::string& key) OVERRIDE;
virtual WriteResult Remove(const std::vector<std::string>& keys) OVERRIDE;
virtual WriteResult Clear() OVERRIDE;
@@ -47,7 +47,7 @@ class TestingValueStore : public ValueStore {
private:
scoped_ptr<ValueStore::Error> TestingError();
- DictionaryValue storage_;
+ base::DictionaryValue storage_;
int read_count_;
int write_count_;
ErrorCode error_code_;
diff --git a/chrome/browser/value_store/value_store.cc b/chrome/browser/value_store/value_store.cc
index 380dc84..9b7b1b0 100644
--- a/chrome/browser/value_store/value_store.cc
+++ b/chrome/browser/value_store/value_store.cc
@@ -17,8 +17,8 @@ ValueStore::Error::~Error() {}
// Implementation of ReadResultType.
-ValueStore::ReadResultType::ReadResultType(scoped_ptr<DictionaryValue> settings)
- : settings_(settings.Pass()) {
+ValueStore::ReadResultType::ReadResultType(
+ scoped_ptr<base::DictionaryValue> settings) : settings_(settings.Pass()) {
CHECK(settings_);
}
diff --git a/chrome/browser/value_store/value_store_change.cc b/chrome/browser/value_store/value_store_change.cc
index fd9b9c9c..dd7140a 100644
--- a/chrome/browser/value_store/value_store_change.cc
+++ b/chrome/browser/value_store/value_store_change.cc
@@ -10,10 +10,10 @@
// static
std::string ValueStoreChange::ToJson(
const ValueStoreChangeList& changes) {
- DictionaryValue changes_value;
+ base::DictionaryValue changes_value;
for (ValueStoreChangeList::const_iterator it = changes.begin();
it != changes.end(); ++it) {
- DictionaryValue* change_value = new DictionaryValue();
+ base::DictionaryValue* change_value = new base::DictionaryValue();
if (it->old_value()) {
change_value->Set("oldValue", it->old_value()->DeepCopy());
}
@@ -28,7 +28,7 @@ std::string ValueStoreChange::ToJson(
}
ValueStoreChange::ValueStoreChange(
- const std::string& key, Value* old_value, Value* new_value)
+ const std::string& key, base::Value* old_value, base::Value* new_value)
: inner_(new Inner(key, old_value, new_value)) {}
ValueStoreChange::~ValueStoreChange() {}
@@ -38,12 +38,12 @@ const std::string& ValueStoreChange::key() const {
return inner_->key_;
}
-const Value* ValueStoreChange::old_value() const {
+const base::Value* ValueStoreChange::old_value() const {
DCHECK(inner_.get());
return inner_->old_value_.get();
}
-const Value* ValueStoreChange::new_value() const {
+const base::Value* ValueStoreChange::new_value() const {
DCHECK(inner_.get());
return inner_->new_value_.get();
}
diff --git a/chrome/browser/value_store/value_store_change_unittest.cc b/chrome/browser/value_store/value_store_change_unittest.cc
index 21a6de6..32eb83b 100644
--- a/chrome/browser/value_store/value_store_change_unittest.cc
+++ b/chrome/browser/value_store/value_store_change_unittest.cc
@@ -19,22 +19,22 @@ using extensions::ListBuilder;
namespace {
TEST(ValueStoreChangeTest, NullOldValue) {
- ValueStoreChange change("key", NULL, Value::CreateStringValue("value"));
+ ValueStoreChange change("key", NULL, base::Value::CreateStringValue("value"));
EXPECT_EQ("key", change.key());
EXPECT_EQ(NULL, change.old_value());
{
- scoped_ptr<Value> expected(Value::CreateStringValue("value"));
+ scoped_ptr<base::Value> expected(base::Value::CreateStringValue("value"));
EXPECT_TRUE(change.new_value()->Equals(expected.get()));
}
}
TEST(ValueStoreChangeTest, NullNewValue) {
- ValueStoreChange change("key", Value::CreateStringValue("value"), NULL);
+ ValueStoreChange change("key", base::Value::CreateStringValue("value"), NULL);
EXPECT_EQ("key", change.key());
{
- scoped_ptr<Value> expected(Value::CreateStringValue("value"));
+ scoped_ptr<base::Value> expected(base::Value::CreateStringValue("value"));
EXPECT_TRUE(change.old_value()->Equals(expected.get()));
}
EXPECT_EQ(NULL, change.new_value());
@@ -42,23 +42,25 @@ TEST(ValueStoreChangeTest, NullNewValue) {
TEST(ValueStoreChangeTest, NonNullValues) {
ValueStoreChange change("key",
- Value::CreateStringValue("old_value"),
- Value::CreateStringValue("new_value"));
+ base::Value::CreateStringValue("old_value"),
+ base::Value::CreateStringValue("new_value"));
EXPECT_EQ("key", change.key());
{
- scoped_ptr<Value> expected(Value::CreateStringValue("old_value"));
+ scoped_ptr<base::Value> expected(
+ base::Value::CreateStringValue("old_value"));
EXPECT_TRUE(change.old_value()->Equals(expected.get()));
}
{
- scoped_ptr<Value> expected(Value::CreateStringValue("new_value"));
+ scoped_ptr<base::Value> expected(
+ base::Value::CreateStringValue("new_value"));
EXPECT_TRUE(change.new_value()->Equals(expected.get()));
}
}
TEST(ValueStoreChangeTest, ToJson) {
// Create a mildly complicated structure that has dots in it.
- scoped_ptr<DictionaryValue> value = DictionaryBuilder()
+ scoped_ptr<base::DictionaryValue> value = DictionaryBuilder()
.Set("key", "value")
.Set("key.with.dots", "value.with.dots")
.Set("tricked", DictionaryBuilder()
@@ -73,14 +75,14 @@ TEST(ValueStoreChangeTest, ToJson) {
ValueStoreChange("key.with.dots", value->DeepCopy(), value->DeepCopy()));
std::string json = ValueStoreChange::ToJson(change_list);
- scoped_ptr<Value> from_json(base::JSONReader::Read(json));
+ scoped_ptr<base::Value> from_json(base::JSONReader::Read(json));
ASSERT_TRUE(from_json.get());
DictionaryBuilder v1(*value);
DictionaryBuilder v2(*value);
DictionaryBuilder v3(*value);
DictionaryBuilder v4(*value);
- scoped_ptr<DictionaryValue> expected_from_json = DictionaryBuilder()
+ scoped_ptr<base::DictionaryValue> expected_from_json = DictionaryBuilder()
.Set("key", DictionaryBuilder()
.Set("oldValue", v1)
.Set("newValue", v2))
diff --git a/chrome/browser/value_store/value_store_unittest.cc b/chrome/browser/value_store/value_store_unittest.cc
index 0e8847c..11315d9 100644
--- a/chrome/browser/value_store/value_store_unittest.cc
+++ b/chrome/browser/value_store/value_store_unittest.cc
@@ -15,7 +15,7 @@ namespace {
const ValueStore::WriteOptions DEFAULTS = ValueStore::DEFAULTS;
// Gets the pretty-printed JSON for a value.
-std::string GetJSON(const Value& value) {
+std::string GetJSON(const base::Value& value) {
std::string json;
base::JSONWriter::WriteWithOptions(&value,
base::JSONWriter::OPTIONS_PRETTY_PRINT,
@@ -27,8 +27,9 @@ std::string GetJSON(const Value& value) {
// Compares two possibly NULL values for equality, filling |error| with an
// appropriate error message if they're different.
-bool ValuesEqual(
- const Value* expected, const Value* actual, std::string* error) {
+bool ValuesEqual(const base::Value* expected,
+ const base::Value* actual,
+ std::string* error) {
if (expected == actual) {
return true;
}
@@ -52,7 +53,7 @@ bool ValuesEqual(
// settings.
testing::AssertionResult SettingsEq(
const char* _1, const char* _2,
- const DictionaryValue& expected,
+ const base::DictionaryValue& expected,
ValueStore::ReadResult actual_result) {
if (actual_result->HasError()) {
return testing::AssertionFailure() <<
@@ -126,16 +127,16 @@ ValueStoreTest::ValueStoreTest()
: key1_("foo"),
key2_("bar"),
key3_("baz"),
- empty_dict_(new DictionaryValue()),
- dict1_(new DictionaryValue()),
- dict3_(new DictionaryValue()),
- dict12_(new DictionaryValue()),
- dict123_(new DictionaryValue()),
+ empty_dict_(new base::DictionaryValue()),
+ dict1_(new base::DictionaryValue()),
+ dict3_(new base::DictionaryValue()),
+ dict12_(new base::DictionaryValue()),
+ dict123_(new base::DictionaryValue()),
ui_thread_(BrowserThread::UI, base::MessageLoop::current()),
file_thread_(BrowserThread::FILE, base::MessageLoop::current()) {
- val1_.reset(Value::CreateStringValue(key1_ + "Value"));
- val2_.reset(Value::CreateStringValue(key2_ + "Value"));
- val3_.reset(Value::CreateStringValue(key3_ + "Value"));
+ val1_.reset(base::Value::CreateStringValue(key1_ + "Value"));
+ val2_.reset(base::Value::CreateStringValue(key2_ + "Value"));
+ val3_.reset(base::Value::CreateStringValue(key3_ + "Value"));
list1_.push_back(key1_);
list2_.push_back(key2_);
@@ -320,10 +321,10 @@ TEST_P(ValueStoreTest, ClearWhenNotEmpty) {
// indexing into a dictionary.
TEST_P(ValueStoreTest, DotsInKeyNames) {
std::string dot_key("foo.bar");
- StringValue dot_value("baz.qux");
+ base::StringValue dot_value("baz.qux");
std::vector<std::string> dot_list;
dot_list.push_back(dot_key);
- DictionaryValue dot_dict;
+ base::DictionaryValue dot_dict;
dot_dict.SetWithoutPathExpansion(dot_key, dot_value.DeepCopy());
EXPECT_PRED_FORMAT2(SettingsEq, *empty_dict_, storage_->Get(dot_key));
@@ -370,8 +371,8 @@ TEST_P(ValueStoreTest, DotsInKeyNames) {
}
TEST_P(ValueStoreTest, DotsInKeyNamesWithDicts) {
- DictionaryValue outer_dict;
- DictionaryValue* inner_dict = new DictionaryValue();
+ base::DictionaryValue outer_dict;
+ base::DictionaryValue* inner_dict = new base::DictionaryValue();
outer_dict.Set("foo", inner_dict);
inner_dict->SetString("bar", "baz");
@@ -393,7 +394,7 @@ TEST_P(ValueStoreTest, ComplexChangedKeysScenarios) {
// - Removing over missing and present keys, combinations.
// - Clearing.
std::vector<std::string> complex_list;
- DictionaryValue complex_changed_dict;
+ base::DictionaryValue complex_changed_dict;
storage_->Set(DEFAULTS, key1_, *val1_);
EXPECT_PRED_FORMAT2(ChangesEq,
@@ -439,7 +440,7 @@ TEST_P(ValueStoreTest, ComplexChangedKeysScenarios) {
EXPECT_PRED_FORMAT2(ChangesEq, changes, storage_->Set(DEFAULTS, *dict123_));
}
{
- DictionaryValue to_set;
+ base::DictionaryValue to_set;
to_set.Set(key1_, val2_->DeepCopy());
to_set.Set(key2_, val2_->DeepCopy());
to_set.Set("asdf", val1_->DeepCopy());
diff --git a/chrome/browser/value_store/value_store_unittest.h b/chrome/browser/value_store/value_store_unittest.h
index d4a931e..0bef1df 100644
--- a/chrome/browser/value_store/value_store_unittest.h
+++ b/chrome/browser/value_store/value_store_unittest.h
@@ -36,9 +36,9 @@ class ValueStoreTest : public testing::TestWithParam<ValueStoreTestParam> {
std::string key2_;
std::string key3_;
- scoped_ptr<Value> val1_;
- scoped_ptr<Value> val2_;
- scoped_ptr<Value> val3_;
+ scoped_ptr<base::Value> val1_;
+ scoped_ptr<base::Value> val2_;
+ scoped_ptr<base::Value> val3_;
std::vector<std::string> empty_list_;
std::vector<std::string> list1_;
@@ -56,11 +56,11 @@ class ValueStoreTest : public testing::TestWithParam<ValueStoreTestParam> {
std::set<std::string> set13_;
std::set<std::string> set123_;
- scoped_ptr<DictionaryValue> empty_dict_;
- scoped_ptr<DictionaryValue> dict1_;
- scoped_ptr<DictionaryValue> dict3_;
- scoped_ptr<DictionaryValue> dict12_;
- scoped_ptr<DictionaryValue> dict123_;
+ scoped_ptr<base::DictionaryValue> empty_dict_;
+ scoped_ptr<base::DictionaryValue> dict1_;
+ scoped_ptr<base::DictionaryValue> dict3_;
+ scoped_ptr<base::DictionaryValue> dict12_;
+ scoped_ptr<base::DictionaryValue> dict123_;
private:
base::ScopedTempDir temp_dir_;