summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-23 20:42:16 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-23 20:42:16 +0000
commit2c95d104fe9af1364ddd7361d3919cd2568a0134 (patch)
treec34dddb1c6cc2f1e12d3643fc9e17de2bc9ac2f6
parent732ccd291fdcf3330bf1a10a616ab8f1519695d1 (diff)
downloadchromium_src-2c95d104fe9af1364ddd7361d3919cd2568a0134.zip
chromium_src-2c95d104fe9af1364ddd7361d3919cd2568a0134.tar.gz
chromium_src-2c95d104fe9af1364ddd7361d3919cd2568a0134.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/120823002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242403 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/views/profile_reset_bubble_view.cc6
-rw-r--r--chrome/browser/ui/views/task_manager_view.cc4
-rw-r--r--chrome/browser/ui/website_settings/website_settings.cc10
-rw-r--r--chrome/browser/ui/webui/about_ui.cc52
-rw-r--r--chrome/browser/ui/webui/bidi_checker_web_ui_test.cc4
-rw-r--r--chrome/browser/ui/webui/certificate_viewer_webui.cc72
-rw-r--r--chrome/browser/ui/webui/chromeos/bluetooth_pairing_ui.cc2
-rw-r--r--chrome/browser/ui/webui/chromeos/charger_replacement_ui.cc2
-rw-r--r--chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.cc16
-rw-r--r--chrome/browser/ui/webui/chromeos/drive_internals_ui.cc18
-rw-r--r--chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc31
-rw-r--r--chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc16
-rw-r--r--chrome/browser/ui/webui/chromeos/login/base_screen_handler.cc2
-rw-r--r--chrome/browser/ui/webui/chromeos/login/base_screen_handler_utils.h16
-rw-r--r--chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc2
-rw-r--r--chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc8
-rw-r--r--chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc6
-rw-r--r--chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc14
-rw-r--r--chrome/browser/ui/webui/chromeos/login/screen_manager_handler.cc2
-rw-r--r--chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc14
-rw-r--r--chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h4
-rw-r--r--chrome/browser/ui/webui/chromeos/login/update_screen_handler.cc10
-rw-r--r--chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc36
-rw-r--r--chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc8
-rw-r--r--chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc28
-rw-r--r--chrome/browser/ui/webui/chromeos/slow_ui.cc12
-rw-r--r--chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc2
-rw-r--r--chrome/browser/ui/webui/components_ui.cc15
-rw-r--r--chrome/browser/ui/webui/conflicts_ui.cc8
-rw-r--r--chrome/browser/ui/webui/constrained_web_dialog_ui.cc2
-rw-r--r--chrome/browser/ui/webui/cookies_tree_model_util.cc2
-rw-r--r--chrome/browser/ui/webui/crashes_ui.cc8
-rw-r--r--chrome/browser/ui/webui/downloads_dom_handler.cc4
-rw-r--r--chrome/browser/ui/webui/extensions/command_handler.cc13
-rw-r--r--chrome/browser/ui/webui/extensions/extension_info_ui.cc2
-rw-r--r--chrome/browser/ui/webui/extensions/extension_settings_handler.cc6
-rw-r--r--chrome/browser/ui/webui/extensions/extension_settings_handler.h2
-rw-r--r--chrome/browser/ui/webui/extensions/install_extension_handler.cc11
-rw-r--r--chrome/browser/ui/webui/extensions/install_extension_handler.h8
-rw-r--r--chrome/browser/ui/webui/extensions/pack_extension_handler.cc16
-rw-r--r--chrome/browser/ui/webui/extensions/pack_extension_handler.h4
-rw-r--r--chrome/browser/ui/webui/flags_ui.cc23
-rw-r--r--chrome/browser/ui/webui/flash_ui.cc14
-rw-r--r--chrome/browser/ui/webui/help/help_handler.cc12
-rw-r--r--chrome/browser/ui/webui/history_ui.cc49
-rw-r--r--chrome/browser/ui/webui/history_ui.h4
-rw-r--r--chrome/browser/ui/webui/identity_internals_ui.cc25
-rw-r--r--chrome/browser/ui/webui/inspect_ui.cc39
-rw-r--r--chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc9
-rw-r--r--chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h6
-rw-r--r--chrome/browser/ui/webui/media/webrtc_logs_ui.cc9
-rw-r--r--chrome/browser/ui/webui/memory_internals/memory_internals_proxy.cc8
-rw-r--r--chrome/browser/ui/webui/metrics_handler.cc8
-rw-r--r--chrome/browser/ui/webui/nacl_ui.cc34
-rw-r--r--chrome/browser/ui/webui/net_export_ui.cc25
-rw-r--r--chrome/browser/ui/webui/net_internals/net_internals_ui.cc281
-rw-r--r--chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc31
-rw-r--r--chrome/browser/ui/webui/ntp/android/bookmarks_handler.cc39
-rw-r--r--chrome/browser/ui/webui/ntp/android/bookmarks_handler.h16
-rw-r--r--chrome/browser/ui/webui/ntp/android/context_menu_handler.cc20
-rw-r--r--chrome/browser/ui/webui/ntp/android/new_tab_page_ready_handler.cc6
-rw-r--r--chrome/browser/ui/webui/ntp/android/ntp_resource_cache_android.cc2
-rw-r--r--chrome/browser/ui/webui/ntp/android/promo_handler.cc6
-rw-r--r--chrome/browser/ui/webui/ntp/app_launcher_handler.cc71
-rw-r--r--chrome/browser/ui/webui/ntp/favicon_webui_handler.cc24
-rw-r--r--chrome/browser/ui/webui/ntp/foreign_session_handler.cc35
-rw-r--r--chrome/browser/ui/webui/ntp/foreign_session_handler.h12
-rw-r--r--chrome/browser/ui/webui/ntp/most_visited_handler.cc17
-rw-r--r--chrome/browser/ui/webui/ntp/new_tab_page_handler.cc21
-rw-r--r--chrome/browser/ui/webui/ntp/new_tab_page_handler.h17
-rw-r--r--chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc8
-rw-r--r--chrome/browser/ui/webui/ntp/new_tab_ui.cc4
-rw-r--r--chrome/browser/ui/webui/ntp/ntp_login_handler.cc16
-rw-r--r--chrome/browser/ui/webui/ntp/ntp_login_handler.h11
74 files changed, 724 insertions, 676 deletions
diff --git a/chrome/browser/ui/views/profile_reset_bubble_view.cc b/chrome/browser/ui/views/profile_reset_bubble_view.cc
index 099f9a7..29bb842 100644
--- a/chrome/browser/ui/views/profile_reset_bubble_view.cc
+++ b/chrome/browser/ui/views/profile_reset_bubble_view.cc
@@ -85,7 +85,7 @@ class FeedbackView : public views::View {
// |feedback| ListValue which contains a list of key/value pairs stored in
// DictionaryValues. The key is to be displayed right aligned on the left, and
// the value as a left aligned multiline text on the right.
- void SetupLayoutManager(const ListValue& feedback) {
+ void SetupLayoutManager(const base::ListValue& feedback) {
RemoveAllChildViews(true);
set_background(views::Background::CreateSolidBackground(
kLightGrayBackgroundColor));
@@ -101,7 +101,7 @@ class FeedbackView : public views::View {
cs->AddColumn(GridLayout::FILL, GridLayout::FILL, 1,
GridLayout::FIXED, kFeedbackViewColumnWidth, 0);
for (size_t i = 0; i < feedback.GetSize(); ++i) {
- const DictionaryValue* dictionary = NULL;
+ const base::DictionaryValue* dictionary = NULL;
if (!feedback.GetDictionary(i, &dictionary) || !dictionary)
continue;
@@ -348,7 +348,7 @@ void ProfileResetBubbleView::SetupLayoutManager(bool report_checked) {
layout->AddView(controls_.help_button);
if (show_help_pane_) {
- scoped_ptr<ListValue> feedback(GetReadableFeedback(profile_));
+ scoped_ptr<base::ListValue> feedback(GetReadableFeedback(profile_));
if (feedback.get()) {
// We need a single row to add the scroll view containing the feedback.
const int kReportDetailsColumnSetId = 5;
diff --git a/chrome/browser/ui/views/task_manager_view.cc b/chrome/browser/ui/views/task_manager_view.cc
index 564b30e..f8653ee 100644
--- a/chrome/browser/ui/views/task_manager_view.cc
+++ b/chrome/browser/ui/views/task_manager_view.cc
@@ -576,7 +576,7 @@ bool TaskManagerView::ExecuteWindowsCommand(int command_id) {
if (g_browser_process->local_state()) {
DictionaryPrefUpdate update(g_browser_process->local_state(),
GetWindowName().c_str());
- DictionaryValue* window_preferences = update.Get();
+ base::DictionaryValue* window_preferences = update.Get();
window_preferences->SetBoolean("always_on_top", is_always_on_top_);
}
return true;
@@ -724,7 +724,7 @@ bool TaskManagerView::GetSavedAlwaysOnTopState(bool* always_on_top) const {
if (!g_browser_process->local_state())
return false;
- const DictionaryValue* dictionary =
+ const base::DictionaryValue* dictionary =
g_browser_process->local_state()->GetDictionary(GetWindowName().c_str());
return dictionary &&
dictionary->GetBoolean("always_on_top", always_on_top) && always_on_top;
diff --git a/chrome/browser/ui/website_settings/website_settings.cc b/chrome/browser/ui/website_settings/website_settings.cc
index 53c5146..b3c6571 100644
--- a/chrome/browser/ui/website_settings/website_settings.cc
+++ b/chrome/browser/ui/website_settings/website_settings.cc
@@ -231,7 +231,7 @@ void WebsiteSettings::OnSitePermissionChanged(ContentSettingsType type,
// This is not a concern for CONTENT_SETTINGS_TYPE_MEDIASTREAM since users
// can not create media settings exceptions by hand.
content_settings::SettingInfo info;
- scoped_ptr<Value> v(content_settings_->GetWebsiteSetting(
+ scoped_ptr<base::Value> v(content_settings_->GetWebsiteSetting(
site_url_, site_url_, type, std::string(), &info));
DCHECK(info.source == content_settings::SETTING_SOURCE_USER);
ContentSettingsPattern::Relation r1 =
@@ -249,9 +249,9 @@ void WebsiteSettings::OnSitePermissionChanged(ContentSettingsType type,
secondary_pattern = info.secondary_pattern;
}
- Value* value = NULL;
+ base::Value* value = NULL;
if (setting != CONTENT_SETTING_DEFAULT)
- value = Value::CreateIntegerValue(setting);
+ value = base::Value::CreateIntegerValue(setting);
content_settings_->SetWebsiteSetting(
primary_pattern, secondary_pattern, type, std::string(), value);
}
@@ -579,10 +579,10 @@ void WebsiteSettings::PresentSitePermissions() {
else
permission_info.setting = mic_setting;
} else {
- scoped_ptr<Value> value(content_settings_->GetWebsiteSetting(
+ scoped_ptr<base::Value> value(content_settings_->GetWebsiteSetting(
site_url_, site_url_, permission_info.type, std::string(), &info));
DCHECK(value.get());
- if (value->GetType() == Value::TYPE_INTEGER) {
+ if (value->GetType() == base::Value::TYPE_INTEGER) {
permission_info.setting =
content_settings::ValueToContentSetting(value.get());
} else {
diff --git a/chrome/browser/ui/webui/about_ui.cc b/chrome/browser/ui/webui/about_ui.cc
index 66c71ea..759f4b8 100644
--- a/chrome/browser/ui/webui/about_ui.cc
+++ b/chrome/browser/ui/webui/about_ui.cc
@@ -131,9 +131,10 @@ class AboutMemoryHandler : public MemoryDetails {
private:
virtual ~AboutMemoryHandler() {}
- void BindProcessMetrics(DictionaryValue* data,
+ void BindProcessMetrics(base::DictionaryValue* data,
ProcessMemoryInformation* info);
- void AppendProcess(ListValue* child_data, ProcessMemoryInformation* info);
+ void AppendProcess(base::ListValue* child_data,
+ ProcessMemoryInformation* info);
content::URLDataSource::GotDataCallback callback_;
@@ -609,9 +610,9 @@ void FinishMemoryDataRequest(
// if |query| is "raw", returns plain text of counter deltas.
// otherwise, returns HTML with pretty JS/HTML to display the data.
std::string AboutStats(const std::string& query) {
- // We keep the DictionaryValue tree live so that we can do delta
+ // We keep the base::DictionaryValue tree live so that we can do delta
// stats computations across runs.
- CR_DEFINE_STATIC_LOCAL(DictionaryValue, root, ());
+ CR_DEFINE_STATIC_LOCAL(base::DictionaryValue, root, ());
static base::TimeTicks last_sample_time = base::TimeTicks::Now();
base::TimeTicks now = base::TimeTicks::Now();
@@ -624,15 +625,15 @@ std::string AboutStats(const std::string& query) {
// We maintain two lists - one for counters and one for timers.
// Timers actually get stored on both lists.
- ListValue* counters;
+ base::ListValue* counters;
if (!root.GetList("counters", &counters)) {
- counters = new ListValue();
+ counters = new base::ListValue();
root.Set("counters", counters);
}
- ListValue* timers;
+ base::ListValue* timers;
if (!root.GetList("timers", &timers)) {
- timers = new ListValue();
+ timers = new base::ListValue();
root.Set("timers", timers);
}
@@ -652,10 +653,10 @@ std::string AboutStats(const std::string& query) {
name.replace(pos, 1, ":");
// Try to see if this name already exists.
- DictionaryValue* counter = NULL;
+ base::DictionaryValue* counter = NULL;
for (size_t scan_index = 0;
scan_index < counters->GetSize(); scan_index++) {
- DictionaryValue* dictionary;
+ base::DictionaryValue* dictionary;
if (counters->GetDictionary(scan_index, &dictionary)) {
std::string scan_name;
if (dictionary->GetString("name", &scan_name) && scan_name == name) {
@@ -667,7 +668,7 @@ std::string AboutStats(const std::string& query) {
}
if (counter == NULL) {
- counter = new DictionaryValue();
+ counter = new base::DictionaryValue();
counter->SetString("name", name);
counters->Append(counter);
}
@@ -718,11 +719,12 @@ std::string AboutStats(const std::string& query) {
data.append(base::StringPrintf("Counter changes in the last %ldms\n",
static_cast<long int>(time_since_last_sample.InMilliseconds())));
for (size_t i = 0; i < counters->GetSize(); ++i) {
- Value* entry = NULL;
+ base::Value* entry = NULL;
bool rv = counters->Get(i, &entry);
if (!rv)
continue; // None of these should fail.
- DictionaryValue* counter = static_cast<DictionaryValue*>(entry);
+ base::DictionaryValue* counter =
+ static_cast<base::DictionaryValue*>(entry);
int delta;
rv = counter->GetInteger("delta", &delta);
if (!rv)
@@ -754,7 +756,7 @@ std::string AboutStats(const std::string& query) {
// as well.
for (int index = static_cast<int>(timers->GetSize())-1; index >= 0;
index--) {
- scoped_ptr<Value> value;
+ scoped_ptr<base::Value> value;
timers->Remove(index, &value);
// We don't care about the value pointer; it's still tracked
// on the counters list.
@@ -854,7 +856,7 @@ std::string AboutSandbox() {
// Helper for AboutMemory to bind results from a ProcessMetrics object
// to a DictionaryValue. Fills ws_usage and comm_usage so that the objects
// can be used in caller's scope (e.g for appending to a net total).
-void AboutMemoryHandler::BindProcessMetrics(DictionaryValue* data,
+void AboutMemoryHandler::BindProcessMetrics(base::DictionaryValue* data,
ProcessMemoryInformation* info) {
DCHECK(data && info);
@@ -873,12 +875,12 @@ void AboutMemoryHandler::BindProcessMetrics(DictionaryValue* data,
// Helper for AboutMemory to append memory usage information for all
// sub-processes (i.e. renderers, plugins) used by Chrome.
-void AboutMemoryHandler::AppendProcess(ListValue* child_data,
+void AboutMemoryHandler::AppendProcess(base::ListValue* child_data,
ProcessMemoryInformation* info) {
DCHECK(child_data && info);
// Append a new DictionaryValue for this renderer to our list.
- DictionaryValue* child = new DictionaryValue();
+ base::DictionaryValue* child = new base::DictionaryValue();
child_data->Append(child);
BindProcessMetrics(child, info);
@@ -888,16 +890,16 @@ void AboutMemoryHandler::AppendProcess(ListValue* child_data,
if (info->is_diagnostics)
child_label.append(" (diagnostics)");
child->SetString("child_name", child_label);
- ListValue* titles = new ListValue();
+ base::ListValue* titles = new base::ListValue();
child->Set("titles", titles);
for (size_t i = 0; i < info->titles.size(); ++i)
- titles->Append(new StringValue(info->titles[i]));
+ titles->Append(new base::StringValue(info->titles[i]));
}
void AboutMemoryHandler::OnDetailsAvailable() {
// the root of the JSON hierarchy for about:memory jstemplate
- scoped_ptr<DictionaryValue> root(new DictionaryValue);
- ListValue* browsers = new ListValue();
+ scoped_ptr<base::DictionaryValue> root(new base::DictionaryValue);
+ base::ListValue* browsers = new base::ListValue();
root->Set("browsers", browsers);
const std::vector<ProcessData>& browser_processes = processes();
@@ -927,7 +929,7 @@ void AboutMemoryHandler::OnDetailsAvailable() {
}
++iterator;
}
- DictionaryValue* browser_data = new DictionaryValue();
+ base::DictionaryValue* browser_data = new base::DictionaryValue();
browsers->Append(browser_data);
browser_data->SetString("name", browser_processes[index].name);
@@ -947,9 +949,9 @@ void AboutMemoryHandler::OnDetailsAvailable() {
VLOG(1) << "memory: " << log_string;
// Set the browser & renderer detailed process data.
- DictionaryValue* browser_data = new DictionaryValue();
+ base::DictionaryValue* browser_data = new base::DictionaryValue();
root->Set("browzr_data", browser_data);
- ListValue* child_data = new ListValue();
+ base::ListValue* child_data = new base::ListValue();
root->Set("child_data", child_data);
ProcessData process = browser_processes[0]; // Chrome is the first browser.
@@ -965,7 +967,7 @@ void AboutMemoryHandler::OnDetailsAvailable() {
root->SetBoolean("show_other_browsers",
browser_defaults::kShowOtherBrowsersInAboutMemory);
- DictionaryValue load_time_data;
+ base::DictionaryValue load_time_data;
load_time_data.SetString(
"summary_desc",
l10n_util::GetStringUTF16(IDS_MEMORY_USAGE_SUMMARY_DESC));
diff --git a/chrome/browser/ui/webui/bidi_checker_web_ui_test.cc b/chrome/browser/ui/webui/bidi_checker_web_ui_test.cc
index 7572887..f9f3aaa 100644
--- a/chrome/browser/ui/webui/bidi_checker_web_ui_test.cc
+++ b/chrome/browser/ui/webui/bidi_checker_web_ui_test.cc
@@ -106,8 +106,8 @@ void WebUIBidiCheckerBrowserTest::RunBidiCheckerOnPage(
const std::string& page_url, bool is_rtl) {
ui_test_utils::NavigateToURL(browser(), GURL(page_url));
ASSERT_TRUE(RunJavascriptTest("runBidiChecker",
- Value::CreateStringValue(page_url),
- Value::CreateBooleanValue(is_rtl)));
+ base::Value::CreateStringValue(page_url),
+ base::Value::CreateBooleanValue(is_rtl)));
}
void WebUIBidiCheckerBrowserTestLTR::RunBidiCheckerOnPage(
diff --git a/chrome/browser/ui/webui/certificate_viewer_webui.cc b/chrome/browser/ui/webui/certificate_viewer_webui.cc
index 7f6d3df..f2812d9 100644
--- a/chrome/browser/ui/webui/certificate_viewer_webui.cc
+++ b/chrome/browser/ui/webui/certificate_viewer_webui.cc
@@ -90,7 +90,7 @@ std::string CertificateViewerDialog::GetDialogArgs() const {
// Certificate information. The keys in this dictionary's general key
// correspond to the IDs in the Html page.
- DictionaryValue cert_info;
+ base::DictionaryValue cert_info;
net::X509Certificate::OSCertHandle cert_hnd = cert_->os_cert_handle();
// Get the certificate chain.
@@ -158,12 +158,12 @@ std::string CertificateViewerDialog::GetDialogArgs() const {
x509_certificate_model::HashCertSHA1(cert_hnd));
// Certificate hierarchy is constructed from bottom up.
- ListValue* children = NULL;
+ base::ListValue* children = NULL;
int index = 0;
for (net::X509Certificate::OSCertHandles::const_iterator i =
cert_chain.begin(); i != cert_chain.end(); ++i, ++index) {
- DictionaryValue* cert_node = new DictionaryValue();
- ListValue cert_details;
+ base::DictionaryValue* cert_node = new base::DictionaryValue();
+ base::ListValue cert_details;
cert_node->SetString("label", x509_certificate_model::GetTitle(*i).c_str());
cert_node->SetDouble("payload.index", index);
// Add the child from the previous iteration.
@@ -171,7 +171,7 @@ std::string CertificateViewerDialog::GetDialogArgs() const {
cert_node->Set("children", children);
// Add this node to the children list for the next iteration.
- children = new ListValue();
+ children = new base::ListValue();
children->Append(cert_node);
}
// Set the last node as the top of the certificate hierarchy.
@@ -243,23 +243,23 @@ void CertificateViewerDialogHandler::RequestCertificateFields(
net::X509Certificate::OSCertHandle cert = cert_chain_[cert_index];
- ListValue root_list;
- DictionaryValue* node_details;
- DictionaryValue* alt_node_details;
- ListValue* cert_sub_fields;
- root_list.Append(node_details = new DictionaryValue());
+ base::ListValue root_list;
+ base::DictionaryValue* node_details;
+ base::DictionaryValue* alt_node_details;
+ base::ListValue* cert_sub_fields;
+ root_list.Append(node_details = new base::DictionaryValue());
node_details->SetString("label", x509_certificate_model::GetTitle(cert));
- ListValue* cert_fields;
- node_details->Set("children", cert_fields = new ListValue());
- cert_fields->Append(node_details = new DictionaryValue());
+ base::ListValue* cert_fields;
+ node_details->Set("children", cert_fields = new base::ListValue());
+ cert_fields->Append(node_details = new base::DictionaryValue());
node_details->SetString("label",
l10n_util::GetStringUTF8(IDS_CERT_DETAILS_CERTIFICATE));
- node_details->Set("children", cert_fields = new ListValue());
+ node_details->Set("children", cert_fields = new base::ListValue());
// Main certificate fields.
- cert_fields->Append(node_details = new DictionaryValue());
+ cert_fields->Append(node_details = new base::DictionaryValue());
node_details->SetString("label",
l10n_util::GetStringUTF8(IDS_CERT_DETAILS_VERSION));
std::string version = x509_certificate_model::GetVersion(cert);
@@ -268,35 +268,35 @@ void CertificateViewerDialogHandler::RequestCertificateFields(
l10n_util::GetStringFUTF8(IDS_CERT_DETAILS_VERSION_FORMAT,
UTF8ToUTF16(version)));
- cert_fields->Append(node_details = new DictionaryValue());
+ cert_fields->Append(node_details = new base::DictionaryValue());
node_details->SetString("label",
l10n_util::GetStringUTF8(IDS_CERT_DETAILS_SERIAL_NUMBER));
node_details->SetString("payload.val",
x509_certificate_model::GetSerialNumberHexified(cert,
l10n_util::GetStringUTF8(IDS_CERT_INFO_FIELD_NOT_PRESENT)));
- cert_fields->Append(node_details = new DictionaryValue());
+ cert_fields->Append(node_details = new base::DictionaryValue());
node_details->SetString("label",
l10n_util::GetStringUTF8(IDS_CERT_DETAILS_CERTIFICATE_SIG_ALG));
node_details->SetString("payload.val",
x509_certificate_model::ProcessSecAlgorithmSignature(cert));
- cert_fields->Append(node_details = new DictionaryValue());
+ cert_fields->Append(node_details = new base::DictionaryValue());
node_details->SetString("label",
l10n_util::GetStringUTF8(IDS_CERT_DETAILS_ISSUER));
node_details->SetString("payload.val",
x509_certificate_model::GetIssuerName(cert));
// Validity period.
- cert_fields->Append(node_details = new DictionaryValue());
+ cert_fields->Append(node_details = new base::DictionaryValue());
node_details->SetString("label",
l10n_util::GetStringUTF8(IDS_CERT_DETAILS_VALIDITY));
- node_details->Set("children", cert_sub_fields = new ListValue());
- cert_sub_fields->Append(node_details = new DictionaryValue());
+ node_details->Set("children", cert_sub_fields = new base::ListValue());
+ cert_sub_fields->Append(node_details = new base::DictionaryValue());
node_details->SetString("label",
l10n_util::GetStringUTF8(IDS_CERT_DETAILS_NOT_BEFORE));
- cert_sub_fields->Append(alt_node_details = new DictionaryValue());
+ cert_sub_fields->Append(alt_node_details = new base::DictionaryValue());
alt_node_details->SetString("label",
l10n_util::GetStringUTF8(IDS_CERT_DETAILS_NOT_AFTER));
base::Time issued, expires;
@@ -307,24 +307,24 @@ void CertificateViewerDialogHandler::RequestCertificateFields(
UTF16ToUTF8(base::TimeFormatShortDateAndTime(expires)));
}
- cert_fields->Append(node_details = new DictionaryValue());
+ cert_fields->Append(node_details = new base::DictionaryValue());
node_details->SetString("label",
l10n_util::GetStringUTF8(IDS_CERT_DETAILS_SUBJECT));
node_details->SetString("payload.val",
x509_certificate_model::GetSubjectName(cert));
// Subject key information.
- cert_fields->Append(node_details = new DictionaryValue());
+ cert_fields->Append(node_details = new base::DictionaryValue());
node_details->SetString("label",
l10n_util::GetStringUTF8(IDS_CERT_DETAILS_SUBJECT_KEY_INFO));
- node_details->Set("children", cert_sub_fields = new ListValue());
- cert_sub_fields->Append(node_details = new DictionaryValue());
+ node_details->Set("children", cert_sub_fields = new base::ListValue());
+ cert_sub_fields->Append(node_details = new base::DictionaryValue());
node_details->SetString("label",
l10n_util::GetStringUTF8(IDS_CERT_DETAILS_SUBJECT_KEY_ALG));
node_details->SetString("payload.val",
x509_certificate_model::ProcessSecAlgorithmSubjectPublicKey(cert));
- cert_sub_fields->Append(node_details = new DictionaryValue());
+ cert_sub_fields->Append(node_details = new base::DictionaryValue());
node_details->SetString("label",
l10n_util::GetStringUTF8(IDS_CERT_DETAILS_SUBJECT_KEY));
node_details->SetString("payload.val",
@@ -338,42 +338,42 @@ void CertificateViewerDialogHandler::RequestCertificateFields(
cert, &extensions);
if (!extensions.empty()) {
- cert_fields->Append(node_details = new DictionaryValue());
+ cert_fields->Append(node_details = new base::DictionaryValue());
node_details->SetString("label",
l10n_util::GetStringUTF8(IDS_CERT_DETAILS_EXTENSIONS));
- node_details->Set("children", cert_sub_fields = new ListValue());
+ node_details->Set("children", cert_sub_fields = new base::ListValue());
for (x509_certificate_model::Extensions::const_iterator i =
extensions.begin(); i != extensions.end(); ++i) {
- cert_sub_fields->Append(node_details = new DictionaryValue());
+ cert_sub_fields->Append(node_details = new base::DictionaryValue());
node_details->SetString("label", i->name);
node_details->SetString("payload.val", i->value);
}
}
- cert_fields->Append(node_details = new DictionaryValue());
+ cert_fields->Append(node_details = new base::DictionaryValue());
node_details->SetString("label",
l10n_util::GetStringUTF8(IDS_CERT_DETAILS_CERTIFICATE_SIG_ALG));
node_details->SetString("payload.val",
x509_certificate_model::ProcessSecAlgorithmSignatureWrap(cert));
- cert_fields->Append(node_details = new DictionaryValue());
+ cert_fields->Append(node_details = new base::DictionaryValue());
node_details->SetString("label",
l10n_util::GetStringUTF8(IDS_CERT_DETAILS_CERTIFICATE_SIG_VALUE));
node_details->SetString("payload.val",
x509_certificate_model::ProcessRawBitsSignatureWrap(cert));
- cert_fields->Append(node_details = new DictionaryValue());
+ cert_fields->Append(node_details = new base::DictionaryValue());
node_details->SetString("label",
l10n_util::GetStringUTF8(IDS_CERT_INFO_FINGERPRINTS_GROUP));
- node_details->Set("children", cert_sub_fields = new ListValue());
+ node_details->Set("children", cert_sub_fields = new base::ListValue());
- cert_sub_fields->Append(node_details = new DictionaryValue());
+ cert_sub_fields->Append(node_details = new base::DictionaryValue());
node_details->SetString("label",
l10n_util::GetStringUTF8(IDS_CERT_INFO_SHA256_FINGERPRINT_LABEL));
node_details->SetString("payload.val",
x509_certificate_model::HashCertSHA256(cert));
- cert_sub_fields->Append(node_details = new DictionaryValue());
+ cert_sub_fields->Append(node_details = new base::DictionaryValue());
node_details->SetString("label",
l10n_util::GetStringUTF8(IDS_CERT_INFO_SHA1_FINGERPRINT_LABEL));
node_details->SetString("payload.val",
diff --git a/chrome/browser/ui/webui/chromeos/bluetooth_pairing_ui.cc b/chrome/browser/ui/webui/chromeos/bluetooth_pairing_ui.cc
index cc8e7498..cc9b7ebd 100644
--- a/chrome/browser/ui/webui/chromeos/bluetooth_pairing_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/bluetooth_pairing_ui.cc
@@ -22,7 +22,7 @@ BluetoothPairingUI::BluetoothPairingUI(content::WebUI* web_ui)
: WebDialogUI(web_ui),
core_handler_(new options::CoreChromeOSOptionsHandler()),
bluetooth_handler_(new options::BluetoothOptionsHandler()) {
- DictionaryValue localized_strings;
+ base::DictionaryValue localized_strings;
core_handler_->set_handlers_host(this);
core_handler_->GetLocalizedValues(&localized_strings);
diff --git a/chrome/browser/ui/webui/chromeos/charger_replacement_ui.cc b/chrome/browser/ui/webui/chromeos/charger_replacement_ui.cc
index d377617..5378422 100644
--- a/chrome/browser/ui/webui/chromeos/charger_replacement_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/charger_replacement_ui.cc
@@ -16,7 +16,7 @@ namespace chromeos {
ChargerReplacementUI::ChargerReplacementUI(content::WebUI* web_ui)
: WebDialogUI(web_ui) {
- DictionaryValue localized_strings;
+ base::DictionaryValue localized_strings;
ChargerReplacementHandler::GetLocalizedValues(&localized_strings);
content::WebUIDataSource* source = content::WebUIDataSource::Create(
chrome::kChromeUIChargerReplacementHost);
diff --git a/chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.cc b/chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.cc
index 5f2d43a..800981f4 100644
--- a/chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.cc
@@ -106,12 +106,12 @@ class ChooseMobileNetworkHandler
private:
// Handlers for JS WebUI messages.
- void HandleCancel(const ListValue* args);
- void HandleConnect(const ListValue* args);
- void HandlePageReady(const ListValue* args);
+ void HandleCancel(const base::ListValue* args);
+ void HandleConnect(const base::ListValue* args);
+ void HandlePageReady(const base::ListValue* args);
std::string device_path_;
- ListValue networks_list_;
+ base::ListValue networks_list_;
bool is_page_ready_;
bool has_pending_results_;
@@ -183,7 +183,7 @@ void ChooseMobileNetworkHandler::DeviceListChanged() {
// Register API doesn't allow technology to be specified so just show unique
// network in UI.
if (network_ids.insert(it->network_id).second) {
- DictionaryValue* network = new DictionaryValue();
+ base::DictionaryValue* network = new base::DictionaryValue();
network->SetString(kNetworkIdProperty, it->network_id);
if (!it->long_name.empty())
network->SetString(kOperatorNameProperty, it->long_name);
@@ -205,7 +205,7 @@ void ChooseMobileNetworkHandler::DeviceListChanged() {
}
}
-void ChooseMobileNetworkHandler::HandleCancel(const ListValue* args) {
+void ChooseMobileNetworkHandler::HandleCancel(const base::ListValue* args) {
const size_t kConnectParamCount = 0;
if (args->GetSize() != kConnectParamCount) {
NOTREACHED();
@@ -221,7 +221,7 @@ void ChooseMobileNetworkHandler::HandleCancel(const ListValue* args) {
"Register in automatic mode."));
}
-void ChooseMobileNetworkHandler::HandleConnect(const ListValue* args) {
+void ChooseMobileNetworkHandler::HandleConnect(const base::ListValue* args) {
std::string network_id;
const size_t kConnectParamCount = 1;
if (args->GetSize() != kConnectParamCount ||
@@ -238,7 +238,7 @@ void ChooseMobileNetworkHandler::HandleConnect(const ListValue* args) {
std::string("Register to network: ") + network_id));
}
-void ChooseMobileNetworkHandler::HandlePageReady(const ListValue* args) {
+void ChooseMobileNetworkHandler::HandlePageReady(const base::ListValue* args) {
const size_t kConnectParamCount = 0;
if (args->GetSize() != kConnectParamCount) {
NOTREACHED();
diff --git a/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc b/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc
index f32ee93..85ba5fd 100644
--- a/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc
@@ -67,7 +67,7 @@ void GetGCacheContents(const base::FilePath& root_path,
DCHECK(gcache_summary);
// Use this map to sort the result list by the path.
- std::map<base::FilePath, DictionaryValue*> files;
+ std::map<base::FilePath, base::DictionaryValue*> files;
const int options = (base::FileEnumerator::FILES |
base::FileEnumerator::DIRECTORIES |
@@ -102,7 +102,7 @@ void GetGCacheContents(const base::FilePath& root_path,
}
// Convert |files| into |gcache_contents|.
- for (std::map<base::FilePath, DictionaryValue*>::const_iterator
+ for (std::map<base::FilePath, base::DictionaryValue*>::const_iterator
iter = files.begin(); iter != files.end(); ++iter) {
gcache_contents->Append(iter->second);
}
@@ -460,7 +460,7 @@ void DriveInternalsWebUIHandler::UpdateDriveRelatedFlagsSection() {
std::string value = "(not set)";
if (CommandLine::ForCurrentProcess()->HasSwitch(key))
value = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(key);
- base::DictionaryValue* flag = new DictionaryValue;
+ base::DictionaryValue* flag = new base::DictionaryValue;
flag->SetString("key", key);
flag->SetString("value", value.empty() ? "(set)" : value);
flags.Append(flag);
@@ -487,7 +487,7 @@ void DriveInternalsWebUIHandler::UpdateDriveRelatedPreferencesSection() {
// As of now, all preferences are boolean.
const std::string value =
(pref_service->GetBoolean(key.c_str()) ? "true" : "false");
- base::DictionaryValue* preference = new DictionaryValue;
+ base::DictionaryValue* preference = new base::DictionaryValue;
preference->SetString("key", key);
preference->SetString("value", value);
preferences.Append(preference);
@@ -662,7 +662,7 @@ void DriveInternalsWebUIHandler::UpdateInFlightOperationsSection(
for (size_t i = 0; i < info_list.size(); ++i) {
const drive::JobInfo& info = info_list[i];
- base::DictionaryValue* dict = new DictionaryValue;
+ base::DictionaryValue* dict = new base::DictionaryValue;
dict->SetInteger("id", info.job_id);
dict->SetString("type", drive::JobTypeToString(info.job_type));
dict->SetString("file_path", info.file_path.AsUTF8Unsafe());
@@ -681,8 +681,8 @@ void DriveInternalsWebUIHandler::UpdateGCacheContentsSection() {
// Start updating the GCache contents section.
Profile* profile = Profile::FromWebUI(web_ui());
const base::FilePath root_path = drive::util::GetCacheRootPath(profile);
- base::ListValue* gcache_contents = new ListValue;
- base::DictionaryValue* gcache_summary = new DictionaryValue;
+ base::ListValue* gcache_contents = new base::ListValue;
+ base::DictionaryValue* gcache_summary = new base::DictionaryValue;
BrowserThread::PostBlockingPoolTaskAndReply(
FROM_HERE,
base::Bind(&GetGCacheContents,
@@ -729,7 +729,7 @@ void DriveInternalsWebUIHandler::UpdateLocalStorageUsageSection() {
// Propagate the amount of local free space in bytes.
base::FilePath home_path;
if (PathService::Get(base::DIR_HOME, &home_path)) {
- base::DictionaryValue* local_storage_summary = new DictionaryValue;
+ base::DictionaryValue* local_storage_summary = new base::DictionaryValue;
BrowserThread::PostBlockingPoolTaskAndReply(
FROM_HERE,
base::Bind(&GetFreeDiskSpace, home_path, local_storage_summary),
@@ -766,7 +766,7 @@ void DriveInternalsWebUIHandler::UpdateEventLogSection() {
std::string severity = SeverityToString(log[i].severity);
- base::DictionaryValue* dict = new DictionaryValue;
+ base::DictionaryValue* dict = new base::DictionaryValue;
dict->SetString("key",
google_apis::util::FormatTimeAsStringLocaltime(log[i].when));
dict->SetString("value", "[" + severity + "] " + log[i].what);
diff --git a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc
index 0a1c11f..4e7f778 100644
--- a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc
@@ -120,14 +120,15 @@ class WebUIHandler
// BurnController::Delegate override.
virtual void OnFail(int error_message_id) OVERRIDE {
- StringValue error_message(l10n_util::GetStringUTF16(error_message_id));
+ base::StringValue error_message(
+ l10n_util::GetStringUTF16(error_message_id));
web_ui()->CallJavascriptFunction("browserBridge.reportFail", error_message);
}
// BurnController::Delegate override.
virtual void OnDeviceAdded(const disks::DiskMountManager::Disk& disk)
OVERRIDE {
- DictionaryValue disk_value;
+ base::DictionaryValue disk_value;
CreateDiskValue(disk, &disk_value);
web_ui()->CallJavascriptFunction("browserBridge.deviceAdded", disk_value);
}
@@ -135,7 +136,7 @@ class WebUIHandler
// BurnController::Delegate override.
virtual void OnDeviceRemoved(const disks::DiskMountManager::Disk& disk)
OVERRIDE {
- StringValue device_path_value(disk.device_path());
+ base::StringValue device_path_value(disk.device_path());
web_ui()->CallJavascriptFunction("browserBridge.deviceRemoved",
device_path_value);
}
@@ -144,7 +145,7 @@ class WebUIHandler
virtual void OnDeviceTooSmall(int64 device_size) OVERRIDE {
base::string16 size;
GetDataSizeText(device_size, &size);
- StringValue device_size_text(size);
+ base::StringValue device_size_text(size);
web_ui()->CallJavascriptFunction("browserBridge.reportDeviceTooSmall",
device_size_text);
}
@@ -184,7 +185,7 @@ class WebUIHandler
private:
void CreateDiskValue(const disks::DiskMountManager::Disk& disk,
- DictionaryValue* disk_value) {
+ base::DictionaryValue* disk_value) {
base::string16 label = ASCIIToUTF16(disk.drive_label());
base::i18n::AdjustStringForLocaleDirection(&label);
disk_value->SetString(std::string(kPropertyLabel), label);
@@ -195,12 +196,12 @@ class WebUIHandler
}
// Callback for the "getDevices" message.
- void HandleGetDevices(const ListValue* args) {
+ void HandleGetDevices(const base::ListValue* args) {
const std::vector<disks::DiskMountManager::Disk> disks
= burn_controller_->GetBurnableDevices();
- ListValue results_value;
+ base::ListValue results_value;
for (size_t i = 0; i != disks.size(); ++i) {
- DictionaryValue* disk_value = new DictionaryValue();
+ base::DictionaryValue* disk_value = new base::DictionaryValue();
CreateDiskValue(disks[i], disk_value);
results_value.Append(disk_value);
}
@@ -209,19 +210,19 @@ class WebUIHandler
}
// Callback for the webuiInitialized message.
- void HandleWebUIInitialized(const ListValue* args) {
+ void HandleWebUIInitialized(const base::ListValue* args) {
burn_controller_->Init();
}
// Callback for the "cancelBurnImage" message.
- void HandleCancelBurnImage(const ListValue* args) {
+ void HandleCancelBurnImage(const base::ListValue* args) {
burn_controller_->CancelBurnImage();
}
// Callback for the "burnImage" message.
// It may be called with NULL if there is a handler that has started burning,
// and thus set the target paths.
- void HandleBurnImage(const ListValue* args) {
+ void HandleBurnImage(const base::ListValue* args) {
base::FilePath target_device_path;
ExtractTargetedDevicePath(*args, 0, &target_device_path);
@@ -236,7 +237,7 @@ class WebUIHandler
int64 amount_finished,
int64 amount_total,
const base::string16& time_remaining_text) {
- DictionaryValue progress;
+ base::DictionaryValue progress;
int progress_message_id = 0;
switch (progress_type) {
case DOWNLOADING:
@@ -288,13 +289,13 @@ class WebUIHandler
}
// device_path has to be previously created.
- void ExtractTargetedDevicePath(const ListValue& list_value,
+ void ExtractTargetedDevicePath(const base::ListValue& list_value,
int index,
base::FilePath* device_path) {
- const Value* list_member;
+ const base::Value* list_member;
std::string image_dest;
if (list_value.Get(index, &list_member) &&
- list_member->GetType() == Value::TYPE_STRING &&
+ list_member->GetType() == base::Value::TYPE_STRING &&
list_member->GetAsString(&image_dest)) {
*device_path = base::FilePath(image_dest);
} else {
diff --git a/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc b/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc
index 8fb7d8a..5074b90 100644
--- a/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc
@@ -286,14 +286,14 @@ class KeyboardOverlayHandler
private:
// Called when the page requires the input method ID corresponding to the
// current input method or keyboard layout during initialization.
- void GetInputMethodId(const ListValue* args);
+ void GetInputMethodId(const base::ListValue* args);
// Called when the page requres the information of modifier key remapping
// during the initialization.
- void GetLabelMap(const ListValue* args);
+ void GetLabelMap(const base::ListValue* args);
// Called when the learn more link is clicked.
- void OpenLearnMorePage(const ListValue* args);
+ void OpenLearnMorePage(const base::ListValue* args);
Profile* profile_;
@@ -324,16 +324,16 @@ void KeyboardOverlayHandler::RegisterMessages() {
base::Unretained(this)));
}
-void KeyboardOverlayHandler::GetInputMethodId(const ListValue* args) {
+void KeyboardOverlayHandler::GetInputMethodId(const base::ListValue* args) {
chromeos::input_method::InputMethodManager* manager =
chromeos::input_method::InputMethodManager::Get();
const chromeos::input_method::InputMethodDescriptor& descriptor =
manager->GetCurrentInputMethod();
- StringValue param(descriptor.id());
+ base::StringValue param(descriptor.id());
web_ui()->CallJavascriptFunction("initKeyboardOverlayId", param);
}
-void KeyboardOverlayHandler::GetLabelMap(const ListValue* args) {
+void KeyboardOverlayHandler::GetLabelMap(const base::ListValue* args) {
DCHECK(profile_);
PrefService* pref_service = profile_->GetPrefs();
typedef std::map<ModifierKey, ModifierKey> ModifierMap;
@@ -347,7 +347,7 @@ void KeyboardOverlayHandler::GetLabelMap(const ListValue* args) {
// TODO(mazda): Support prefs::kLanguageRemapCapsLockKeyTo once Caps Lock is
// added to the overlay UI.
- DictionaryValue dict;
+ base::DictionaryValue dict;
for (ModifierMap::const_iterator i = modifier_map.begin();
i != modifier_map.end(); ++i) {
dict.SetString(ModifierKeyToLabel(i->first), ModifierKeyToLabel(i->second));
@@ -356,7 +356,7 @@ void KeyboardOverlayHandler::GetLabelMap(const ListValue* args) {
web_ui()->CallJavascriptFunction("initIdentifierMap", dict);
}
-void KeyboardOverlayHandler::OpenLearnMorePage(const ListValue* args) {
+void KeyboardOverlayHandler::OpenLearnMorePage(const base::ListValue* args) {
web_ui()->GetWebContents()->GetDelegate()->OpenURLFromTab(
web_ui()->GetWebContents(),
content::OpenURLParams(GURL(kLearnMoreURL),
diff --git a/chrome/browser/ui/webui/chromeos/login/base_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/base_screen_handler.cc
index d530039..313e149 100644
--- a/chrome/browser/ui/webui/chromeos/login/base_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/base_screen_handler.cc
@@ -96,7 +96,7 @@ void BaseScreenHandler::ShowScreen(const char* screen_name,
const base::DictionaryValue* data) {
if (!web_ui())
return;
- DictionaryValue screen_params;
+ base::DictionaryValue screen_params;
screen_params.SetString("id", screen_name);
if (data)
screen_params.SetWithoutPathExpansion("data", data->DeepCopy());
diff --git a/chrome/browser/ui/webui/chromeos/login/base_screen_handler_utils.h b/chrome/browser/ui/webui/chromeos/login/base_screen_handler_utils.h
index 05bfaec..af6925cb 100644
--- a/chrome/browser/ui/webui/chromeos/login/base_screen_handler_utils.h
+++ b/chrome/browser/ui/webui/chromeos/login/base_screen_handler_utils.h
@@ -26,45 +26,45 @@ struct UnwrapConstRef<const T&> {
};
template<typename T>
-inline bool ParseValue(const Value* value, T* out_value);
+inline bool ParseValue(const base::Value* value, T* out_value);
template<>
-inline bool ParseValue<bool>(const Value* value, bool* out_value) {
+inline bool ParseValue<bool>(const base::Value* value, bool* out_value) {
return value->GetAsBoolean(out_value);
}
template<>
-inline bool ParseValue<int>(const Value* value, int* out_value) {
+inline bool ParseValue<int>(const base::Value* value, int* out_value) {
return value->GetAsInteger(out_value);
}
template<>
-inline bool ParseValue<double>(const Value* value, double* out_value) {
+inline bool ParseValue<double>(const base::Value* value, double* out_value) {
return value->GetAsDouble(out_value);
}
template<>
-inline bool ParseValue<std::string>(const Value* value,
+inline bool ParseValue<std::string>(const base::Value* value,
std::string* out_value) {
return value->GetAsString(out_value);
}
template<>
-inline bool ParseValue<base::string16>(const Value* value,
+inline bool ParseValue<base::string16>(const base::Value* value,
base::string16* out_value) {
return value->GetAsString(out_value);
}
template<>
inline bool ParseValue<const base::DictionaryValue*>(
- const Value* value,
+ const base::Value* value,
const base::DictionaryValue** out_value) {
return value->GetAsDictionary(out_value);
}
template<typename T>
inline bool GetArg(const base::ListValue* args, size_t index, T* out_value) {
- const Value* value;
+ const base::Value* value;
if (!args->Get(index, &value))
return false;
return ParseValue(value, out_value);
diff --git a/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc
index 12322ed..b99b076 100644
--- a/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc
@@ -388,7 +388,7 @@ void EnrollmentScreenHandler::OnTokenFetched(
}
void EnrollmentScreenHandler::DoShow() {
- DictionaryValue screen_data;
+ base::DictionaryValue screen_data;
screen_data.SetString("signin_url", kGaiaExtStartPage);
screen_data.SetString("gaiaUrl", GaiaUrls::GetInstance()->gaia_url().spec());
screen_data.SetBoolean("is_auto_enrollment", is_auto_enrollment_);
diff --git a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
index 8df9127..121f31d 100644
--- a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
@@ -25,7 +25,7 @@ const char kJsScreenPath[] = "login.GaiaSigninScreen";
// Updates params dictionary passed to the auth extension with related
// preferences from CrosSettings.
-void UpdateAuthParamsFromSettings(DictionaryValue* params,
+void UpdateAuthParamsFromSettings(base::DictionaryValue* params,
const CrosSettings* cros_settings) {
bool allow_new_user = true;
cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user);
@@ -36,7 +36,7 @@ void UpdateAuthParamsFromSettings(DictionaryValue* params,
params->SetBoolean("guestSignin", allow_guest);
}
-void UpdateAuthParams(DictionaryValue* params, bool has_users) {
+void UpdateAuthParams(base::DictionaryValue* params, bool has_users) {
UpdateAuthParamsFromSettings(params, CrosSettings::Get());
// Allow locally managed user creation only if:
@@ -94,7 +94,7 @@ GaiaScreenHandler::~GaiaScreenHandler() {}
void GaiaScreenHandler::LoadGaia(const GaiaContext& context) {
LOG(WARNING) << "LoadGaia() call.";
- DictionaryValue params;
+ base::DictionaryValue params;
params.SetBoolean("forceReload", context.force_reload);
params.SetBoolean("isLocal", context.is_local);
@@ -141,7 +141,7 @@ void GaiaScreenHandler::LoadGaia(const GaiaContext& context) {
}
void GaiaScreenHandler::UpdateGaia(const GaiaContext& context) {
- DictionaryValue params;
+ base::DictionaryValue params;
UpdateAuthParams(&params, context.has_users);
CallJS("updateAuthExtension", params);
}
diff --git a/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc
index 8d5f98a..635aaf5 100644
--- a/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc
@@ -185,8 +185,8 @@ void LocallyManagedUserCreationScreenHandler::RegisterMessages() {
void LocallyManagedUserCreationScreenHandler::PrepareToShow() {}
void LocallyManagedUserCreationScreenHandler::Show() {
- scoped_ptr<DictionaryValue> data(new base::DictionaryValue());
- scoped_ptr<ListValue> users_list(new base::ListValue());
+ scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue());
+ scoped_ptr<base::ListValue> users_list(new base::ListValue());
const UserList& users = UserManager::Get()->GetUsers();
std::string owner;
chromeos::CrosSettings::Get()->GetString(chromeos::kDeviceOwner, &owner);
@@ -195,7 +195,7 @@ void LocallyManagedUserCreationScreenHandler::Show() {
if ((*it)->GetType() != User::USER_TYPE_REGULAR)
continue;
bool is_owner = ((*it)->email() == owner);
- DictionaryValue* user_dict = new DictionaryValue();
+ base::DictionaryValue* user_dict = new base::DictionaryValue();
SigninScreenHandler::FillUserDictionary(*it, is_owner, user_dict);
users_list->Append(user_dict);
}
diff --git a/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc
index 603c5c2b..e568e45 100644
--- a/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc
@@ -186,7 +186,7 @@ void NetworkScreenHandler::OnLanguageChangedCallback(
NetworkScreenHandler* const self = context->handler_.get();
- DictionaryValue localized_strings;
+ base::DictionaryValue localized_strings;
static_cast<OobeUI*>(self->web_ui()->GetController())
->GetLocalizedStrings(&localized_strings);
self->core_oobe_actor_->ReloadContent(localized_strings);
@@ -232,17 +232,17 @@ void NetworkScreenHandler::OnSystemTimezoneChanged() {
}
// static
-ListValue* NetworkScreenHandler::GetLanguageList() {
+base::ListValue* NetworkScreenHandler::GetLanguageList() {
const std::string app_locale = g_browser_process->GetApplicationLocale();
input_method::InputMethodManager* manager =
input_method::InputMethodManager::Get();
// GetSupportedInputMethods() never returns NULL.
scoped_ptr<input_method::InputMethodDescriptors> descriptors(
manager->GetSupportedInputMethods());
- ListValue* languages_list =
+ base::ListValue* languages_list =
options::CrosLanguageOptionsHandler::GetUILanguageList(*descriptors);
for (size_t i = 0; i < languages_list->GetSize(); ++i) {
- DictionaryValue* language_info = NULL;
+ base::DictionaryValue* language_info = NULL;
if (!languages_list->GetDictionary(i, &language_info))
NOTREACHED();
@@ -266,8 +266,8 @@ ListValue* NetworkScreenHandler::GetLanguageList() {
}
// static
-ListValue* NetworkScreenHandler::GetInputMethods() {
- ListValue* input_methods_list = new ListValue;
+base::ListValue* NetworkScreenHandler::GetInputMethods() {
+ base::ListValue* input_methods_list = new base::ListValue;
input_method::InputMethodManager* manager =
input_method::InputMethodManager::Get();
input_method::InputMethodUtil* util = manager->GetInputMethodUtil();
@@ -276,7 +276,7 @@ ListValue* NetworkScreenHandler::GetInputMethods() {
std::string current_input_method_id = manager->GetCurrentInputMethod().id();
for (size_t i = 0; i < input_methods->size(); ++i) {
const std::string ime_id = input_methods->at(i).id();
- DictionaryValue* input_method = new DictionaryValue;
+ base::DictionaryValue* input_method = new base::DictionaryValue;
input_method->SetString("value", ime_id);
input_method->SetString(
"title",
diff --git a/chrome/browser/ui/webui/chromeos/login/screen_manager_handler.cc b/chrome/browser/ui/webui/chromeos/login/screen_manager_handler.cc
index 2070f6f..9b3153a 100644
--- a/chrome/browser/ui/webui/chromeos/login/screen_manager_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/screen_manager_handler.cc
@@ -46,7 +46,7 @@ void ScreenManagerHandler::HandleButtonPressed(const std::string& screen_name,
void ScreenManagerHandler::HandleContextChanged(
const std::string& screen_name,
- const DictionaryValue* diff) {
+ const base::DictionaryValue* diff) {
if (delegate_)
delegate_->OnContextChanged(screen_name, diff);
}
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
index 6946d08..275fdf3 100644
--- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
@@ -515,14 +515,14 @@ void SigninScreenHandler::ShowImpl() {
input_method::InputMethodManager::Get()->GetXKeyboard()->
SetCapsLockEnabled(false);
- DictionaryValue params;
+ base::DictionaryValue params;
params.SetBoolean("disableAddUser", AllWhitelistedUsersPresent());
UpdateUIState(UI_STATE_ACCOUNT_PICKER, &params);
}
}
void SigninScreenHandler::UpdateUIState(UIState ui_state,
- DictionaryValue* params) {
+ base::DictionaryValue* params) {
switch (ui_state) {
case UI_STATE_GAIA_SIGNIN:
ui_state_ = UI_STATE_GAIA_SIGNIN;
@@ -707,7 +707,7 @@ void SigninScreenHandler::SetupAndShowOfflineMessage(
error_screen_actor_->AllowOfflineLogin(offline_login_allowed);
if (GetCurrentScreen() != OobeUI::SCREEN_ERROR_MESSAGE) {
- DictionaryValue params;
+ base::DictionaryValue params;
const std::string network_type = network_state_informer_->network_type();
params.SetString("lastNetworkType", network_type);
error_screen_actor_->SetUIState(ErrorScreen::UI_STATE_SIGNIN);
@@ -1138,7 +1138,7 @@ void SigninScreenHandler::HandleShowLocallyManagedUserCreationScreen() {
LOG(ERROR) << "Managed users not allowed.";
return;
}
- scoped_ptr<DictionaryValue> params(new DictionaryValue());
+ scoped_ptr<base::DictionaryValue> params(new base::DictionaryValue());
LoginDisplayHostImpl::default_host()->
StartWizard(WizardController::kLocallyManagedUserCreationScreenName,
params.Pass());
@@ -1242,7 +1242,7 @@ void SigninScreenHandler::HandleLaunchHelpApp(double help_topic_id) {
void SigninScreenHandler::FillUserDictionary(User* user,
bool is_owner,
- DictionaryValue* user_dict) {
+ base::DictionaryValue* user_dict) {
const std::string& email = user->email();
bool is_public_account =
user->GetType() == User::USER_TYPE_PUBLIC_ACCOUNT;
@@ -1289,7 +1289,7 @@ void SigninScreenHandler::SendUserList(bool animated) {
size_t max_non_owner_users = kMaxUsers - 1;
size_t non_owner_count = 0;
- ListValue users_list;
+ base::ListValue users_list;
const UserList& users = delegate_->GetUsers();
// TODO(nkostylev): Show optional intro dialog about multi-profiles feature
@@ -1309,7 +1309,7 @@ void SigninScreenHandler::SendUserList(bool animated) {
bool is_owner = (email == owner);
if (non_owner_count < max_non_owner_users || is_owner) {
- DictionaryValue* user_dict = new DictionaryValue();
+ base::DictionaryValue* user_dict = new base::DictionaryValue();
FillUserDictionary(*it, is_owner, user_dict);
bool is_public_account =
((*it)->GetType() == User::USER_TYPE_PUBLIC_ACCOUNT);
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h
index 3aa2b74..51f708a 100644
--- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h
+++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h
@@ -252,7 +252,7 @@ class SigninScreenHandler
// Updates current UI of the signin screen according to |ui_state|
// argument. Optionally it can pass screen initialization data via
// |params| argument.
- void UpdateUIState(UIState ui_state, DictionaryValue* params);
+ void UpdateUIState(UIState ui_state, base::DictionaryValue* params);
void UpdateStateInternal(ErrorScreenActor::ErrorReason reason,
bool force_update);
@@ -367,7 +367,7 @@ class SigninScreenHandler
// Fills |user_dict| with information about |user|.
static void FillUserDictionary(User* user,
bool is_owner,
- DictionaryValue* user_dict);
+ base::DictionaryValue* user_dict);
// Sends user list to account picker.
void SendUserList(bool animated);
diff --git a/chrome/browser/ui/webui/chromeos/login/update_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/update_screen_handler.cc
index d75476f8..96e93ba 100644
--- a/chrome/browser/ui/webui/chromeos/login/update_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/update_screen_handler.cc
@@ -105,23 +105,23 @@ void UpdateScreenHandler::ShowProgressMessage(bool visible) {
}
void UpdateScreenHandler::SetProgressMessage(ProgressMessage message) {
- scoped_ptr<StringValue> progress_message;
+ scoped_ptr<base::StringValue> progress_message;
switch (message) {
case PROGRESS_MESSAGE_UPDATE_AVAILABLE:
- progress_message.reset(Value::CreateStringValue(
+ progress_message.reset(base::Value::CreateStringValue(
l10n_util::GetStringUTF16(IDS_UPDATE_AVAILABLE)));
break;
case PROGRESS_MESSAGE_INSTALLING_UPDATE:
- progress_message.reset(Value::CreateStringValue(
+ progress_message.reset(base::Value::CreateStringValue(
l10n_util::GetStringFUTF16(IDS_INSTALLING_UPDATE,
l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME))));
break;
case PROGRESS_MESSAGE_VERIFYING:
- progress_message.reset(Value::CreateStringValue(
+ progress_message.reset(base::Value::CreateStringValue(
l10n_util::GetStringUTF16(IDS_UPDATE_VERIFYING)));
break;
case PROGRESS_MESSAGE_FINALIZING:
- progress_message.reset(Value::CreateStringValue(
+ progress_message.reset(base::Value::CreateStringValue(
l10n_util::GetStringUTF16(IDS_UPDATE_FINALIZING)));
break;
default:
diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc
index 5dcc4bd..9e8663b 100644
--- a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc
@@ -85,14 +85,15 @@ void DataRequestFailed(
}
// Converts the network properties into a JS object.
-void GetDeviceInfo(const DictionaryValue& properties, DictionaryValue* value) {
+void GetDeviceInfo(const base::DictionaryValue& properties,
+ base::DictionaryValue* value) {
std::string name;
properties.GetStringWithoutPathExpansion(shill::kNameProperty, &name);
bool activate_over_non_cellular_networks = false;
properties.GetBooleanWithoutPathExpansion(
shill::kActivateOverNonCellularNetworkProperty,
&activate_over_non_cellular_networks);
- const DictionaryValue* payment_dict;
+ const base::DictionaryValue* payment_dict;
std::string payment_url, post_method, post_data;
if (properties.GetDictionaryWithoutPathExpansion(
shill::kPaymentPortalProperty, &payment_dict)) {
@@ -131,7 +132,7 @@ void GetDeviceInfo(const DictionaryValue& properties, DictionaryValue* value) {
void SetActivationStateAndError(MobileActivator::PlanActivationState state,
const std::string& error_description,
- DictionaryValue* value) {
+ base::DictionaryValue* value) {
value->SetInteger("state", state);
if (!error_description.empty())
value->SetString("error", error_description);
@@ -223,10 +224,10 @@ class MobileSetupHandler
scoped_ptr<base::DictionaryValue> error_data);
// Handlers for JS WebUI messages.
- void HandleSetTransactionStatus(const ListValue* args);
- void HandleStartActivation(const ListValue* args);
- void HandlePaymentPortalLoad(const ListValue* args);
- void HandleGetDeviceInfo(const ListValue* args);
+ void HandleSetTransactionStatus(const base::ListValue* args);
+ void HandleStartActivation(const base::ListValue* args);
+ void HandlePaymentPortalLoad(const base::ListValue* args);
+ void HandleGetDeviceInfo(const base::ListValue* args);
// NetworkStateHandlerObserver implementation.
virtual void NetworkConnectionStateChanged(
@@ -287,7 +288,7 @@ void MobileSetupUIHTMLSource::GetPropertiesAndStartDataRequest(
const content::URLDataSource::GotDataCallback& callback,
const std::string& service_path,
const base::DictionaryValue& properties) {
- const DictionaryValue* payment_dict;
+ const base::DictionaryValue* payment_dict;
std::string name, usage_url, activation_state, payment_url;
if (!properties.GetStringWithoutPathExpansion(
shill::kNameProperty, &name) ||
@@ -310,7 +311,7 @@ void MobileSetupUIHTMLSource::GetPropertiesAndStartDataRequest(
}
NET_LOG_EVENT("Starting mobile setup", service_path);
- DictionaryValue strings;
+ base::DictionaryValue strings;
strings.SetString("connecting_header",
l10n_util::GetStringFUTF16(IDS_MOBILE_CONNECTING_HEADER,
@@ -395,7 +396,7 @@ void MobileSetupHandler::OnActivationStateChanged(
return;
if (!network) {
- DictionaryValue device_dict;
+ base::DictionaryValue device_dict;
SetActivationStateAndError(state, error_description, &device_dict);
web_ui()->CallJavascriptFunction(kJsDeviceStatusChangedCallback,
device_dict);
@@ -419,7 +420,7 @@ void MobileSetupHandler::GetPropertiesAndCallStatusChanged(
const std::string& error_description,
const std::string& service_path,
const base::DictionaryValue& properties) {
- DictionaryValue device_dict;
+ base::DictionaryValue device_dict;
GetDeviceInfo(properties, &device_dict);
SetActivationStateAndError(state, error_description, &device_dict);
web_ui()->CallJavascriptFunction(kJsDeviceStatusChangedCallback, device_dict);
@@ -440,7 +441,7 @@ void MobileSetupHandler::RegisterMessages() {
base::Unretained(this)));
}
-void MobileSetupHandler::HandleStartActivation(const ListValue* args) {
+void MobileSetupHandler::HandleStartActivation(const base::ListValue* args) {
DCHECK_EQ(TYPE_UNDETERMINED, type_);
if (!web_ui())
@@ -457,7 +458,8 @@ void MobileSetupHandler::HandleStartActivation(const ListValue* args) {
MobileActivator::GetInstance()->InitiateActivation(path.substr(1));
}
-void MobileSetupHandler::HandleSetTransactionStatus(const ListValue* args) {
+void MobileSetupHandler::HandleSetTransactionStatus(
+ const base::ListValue* args) {
DCHECK_EQ(TYPE_ACTIVATION, type_);
if (!web_ui())
return;
@@ -474,7 +476,7 @@ void MobileSetupHandler::HandleSetTransactionStatus(const ListValue* args) {
LowerCaseEqualsASCII(status, kJsApiResultOK));
}
-void MobileSetupHandler::HandlePaymentPortalLoad(const ListValue* args) {
+void MobileSetupHandler::HandlePaymentPortalLoad(const base::ListValue* args) {
// Only activation flow webui is interested in these events.
if (type_ != TYPE_ACTIVATION || !web_ui())
return;
@@ -491,7 +493,7 @@ void MobileSetupHandler::HandlePaymentPortalLoad(const ListValue* args) {
LowerCaseEqualsASCII(result, kJsApiResultOK));
}
-void MobileSetupHandler::HandleGetDeviceInfo(const ListValue* args) {
+void MobileSetupHandler::HandleGetDeviceInfo(const base::ListValue* args) {
DCHECK_NE(TYPE_ACTIVATION, type_);
if (!web_ui())
return;
@@ -544,7 +546,7 @@ void MobileSetupHandler::HandleGetDeviceInfo(const ListValue* args) {
void MobileSetupHandler::GetPropertiesAndCallGetDeviceInfo(
const std::string& service_path,
const base::DictionaryValue& properties) {
- DictionaryValue device_info;
+ base::DictionaryValue device_info;
GetDeviceInfo(properties, &device_info);
web_ui()->CallJavascriptFunction(kJsGetDeviceInfoCallback, device_info);
}
@@ -557,7 +559,7 @@ void MobileSetupHandler::GetPropertiesFailure(
NET_LOG_ERROR("MobileActivator GetProperties Failed: " + error_name,
service_path);
// Invoke |callback_name| with an empty dictionary.
- DictionaryValue device_dict;
+ base::DictionaryValue device_dict;
web_ui()->CallJavascriptFunction(callback_name, device_dict);
}
diff --git a/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc b/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc
index b015146..e6f37a0 100644
--- a/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc
@@ -30,7 +30,7 @@ namespace {
class ProxySettingsHTMLSource : public content::URLDataSource {
public:
- explicit ProxySettingsHTMLSource(DictionaryValue* localized_strings);
+ explicit ProxySettingsHTMLSource(base::DictionaryValue* localized_strings);
// content::URLDataSource implementation.
virtual std::string GetSource() const OVERRIDE;
@@ -50,13 +50,13 @@ class ProxySettingsHTMLSource : public content::URLDataSource {
virtual ~ProxySettingsHTMLSource() {}
private:
- scoped_ptr<DictionaryValue> localized_strings_;
+ scoped_ptr<base::DictionaryValue> localized_strings_;
DISALLOW_COPY_AND_ASSIGN(ProxySettingsHTMLSource);
};
ProxySettingsHTMLSource::ProxySettingsHTMLSource(
- DictionaryValue* localized_strings)
+ base::DictionaryValue* localized_strings)
: localized_strings_(localized_strings) {
}
@@ -90,7 +90,7 @@ ProxySettingsUI::ProxySettingsUI(content::WebUI* web_ui)
proxy_handler_(new options::ProxyHandler()),
core_handler_(new options::CoreChromeOSOptionsHandler()) {
// |localized_strings| will be owned by ProxySettingsHTMLSource.
- DictionaryValue* localized_strings = new DictionaryValue();
+ base::DictionaryValue* localized_strings = new base::DictionaryValue();
core_handler_->set_handlers_host(this);
core_handler_->GetLocalizedValues(localized_strings);
diff --git a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
index c5f383e..06a809c 100644
--- a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
@@ -225,12 +225,12 @@ class SimUnlockHandler : public WebUIMessageHandler,
void HandleEnterCode(SimUnlockCode code_type, const std::string& code);
// Handlers for JS WebUI messages.
- void HandleCancel(const ListValue* args);
- void HandleChangePinCode(const ListValue* args);
- void HandleEnterPinCode(const ListValue* args);
- void HandleEnterPukCode(const ListValue* args);
- void HandleProceedToPukInput(const ListValue* args);
- void HandleSimStatusInitialize(const ListValue* args);
+ void HandleCancel(const base::ListValue* args);
+ void HandleChangePinCode(const base::ListValue* args);
+ void HandleEnterPinCode(const base::ListValue* args);
+ void HandleEnterPukCode(const base::ListValue* args);
+ void HandleProceedToPukInput(const base::ListValue* args);
+ void HandleSimStatusInitialize(const base::ListValue* args);
// Initialize current SIM card status, passes that to page.
void InitializeSimStatus();
@@ -292,7 +292,7 @@ void SimUnlockUIHTMLSource::StartDataRequest(
int render_process_id,
int render_frame_id,
const content::URLDataSource::GotDataCallback& callback) {
- DictionaryValue strings;
+ base::DictionaryValue strings;
strings.SetString("title",
l10n_util::GetStringUTF16(IDS_SIM_UNLOCK_ENTER_PIN_TITLE));
strings.SetString("ok", l10n_util::GetStringUTF16(IDS_OK));
@@ -620,7 +620,7 @@ void SimUnlockHandler::NotifyOnRequirePinChangeEnded(bool new_value) {
content::Details<bool>(&new_value));
}
-void SimUnlockHandler::HandleCancel(const ListValue* args) {
+void SimUnlockHandler::HandleCancel(const base::ListValue* args) {
const size_t kEnterCodeParamCount = 0;
if (args->GetSize() != kEnterCodeParamCount) {
NOTREACHED();
@@ -631,7 +631,7 @@ void SimUnlockHandler::HandleCancel(const ListValue* args) {
base::Bind(&TaskProxy::HandleCancel, task.get()));
}
-void SimUnlockHandler::HandleChangePinCode(const ListValue* args) {
+void SimUnlockHandler::HandleChangePinCode(const base::ListValue* args) {
const size_t kChangePinParamCount = 2;
std::string pin;
std::string new_pin;
@@ -652,7 +652,7 @@ void SimUnlockHandler::HandleEnterCode(SimUnlockCode code_type,
base::Bind(&TaskProxy::HandleEnterCode, task.get()));
}
-void SimUnlockHandler::HandleEnterPinCode(const ListValue* args) {
+void SimUnlockHandler::HandleEnterPinCode(const base::ListValue* args) {
const size_t kEnterPinParamCount = 1;
std::string pin;
if (args->GetSize() != kEnterPinParamCount || !args->GetString(0, &pin)) {
@@ -662,7 +662,7 @@ void SimUnlockHandler::HandleEnterPinCode(const ListValue* args) {
HandleEnterCode(CODE_PIN, pin);
}
-void SimUnlockHandler::HandleEnterPukCode(const ListValue* args) {
+void SimUnlockHandler::HandleEnterPukCode(const base::ListValue* args) {
const size_t kEnterPukParamCount = 2;
std::string puk;
std::string new_pin;
@@ -676,7 +676,7 @@ void SimUnlockHandler::HandleEnterPukCode(const ListValue* args) {
HandleEnterCode(CODE_PUK, puk);
}
-void SimUnlockHandler::HandleProceedToPukInput(const ListValue* args) {
+void SimUnlockHandler::HandleProceedToPukInput(const base::ListValue* args) {
const size_t kProceedToPukInputParamCount = 0;
if (args->GetSize() != kProceedToPukInputParamCount) {
NOTREACHED();
@@ -687,7 +687,7 @@ void SimUnlockHandler::HandleProceedToPukInput(const ListValue* args) {
base::Bind(&TaskProxy::HandleProceedToPukInput, task.get()));
}
-void SimUnlockHandler::HandleSimStatusInitialize(const ListValue* args) {
+void SimUnlockHandler::HandleSimStatusInitialize(const base::ListValue* args) {
const size_t kSimStatusInitializeParamCount = 1;
double mode;
if (args->GetSize() != kSimStatusInitializeParamCount ||
@@ -812,7 +812,7 @@ void SimUnlockHandler::ProcessSimCardState(
void SimUnlockHandler::UpdatePage(const DeviceState* cellular,
const std::string& error_msg) {
- DictionaryValue sim_dict;
+ base::DictionaryValue sim_dict;
if (cellular)
sim_dict.SetInteger(kTriesLeft, cellular->sim_retries_left());
sim_dict.SetInteger(kState, state_);
diff --git a/chrome/browser/ui/webui/chromeos/slow_ui.cc b/chrome/browser/ui/webui/chromeos/slow_ui.cc
index 9740836..71161db 100644
--- a/chrome/browser/ui/webui/chromeos/slow_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/slow_ui.cc
@@ -69,9 +69,9 @@ class SlowHandler : public WebUIMessageHandler {
void UpdatePage();
// Handlers for JS WebUI messages.
- void HandleDisable(const ListValue* args);
- void HandleEnable(const ListValue* args);
- void LoadComplete(const ListValue* args);
+ void HandleDisable(const base::ListValue* args);
+ void HandleEnable(const base::ListValue* args);
+ void LoadComplete(const base::ListValue* args);
Profile* profile_;
scoped_ptr<PrefChangeRegistrar> user_pref_registrar_;
@@ -102,17 +102,17 @@ void SlowHandler::RegisterMessages() {
base::Unretained(this)));
}
-void SlowHandler::HandleDisable(const ListValue* args) {
+void SlowHandler::HandleDisable(const base::ListValue* args) {
PrefService* pref_service = profile_->GetPrefs();
pref_service->SetBoolean(prefs::kPerformanceTracingEnabled, false);
}
-void SlowHandler::HandleEnable(const ListValue* args) {
+void SlowHandler::HandleEnable(const base::ListValue* args) {
PrefService* pref_service = profile_->GetPrefs();
pref_service->SetBoolean(prefs::kPerformanceTracingEnabled, true);
}
-void SlowHandler::LoadComplete(const ListValue* args) {
+void SlowHandler::LoadComplete(const base::ListValue* args) {
UpdatePage();
}
diff --git a/chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc b/chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc
index 5c6d156..f813cb5 100644
--- a/chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc
+++ b/chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc
@@ -37,7 +37,7 @@ void AddAccountUITweaksLocalizedValues(
void AddAccountUITweaksLocalizedValues(
content::WebUIDataSource* source) {
DCHECK(source);
- DictionaryValue dict;
+ base::DictionaryValue dict;
AddAccountUITweaksLocalizedValues(&dict);
source->AddLocalizedStrings(dict);
}
diff --git a/chrome/browser/ui/webui/components_ui.cc b/chrome/browser/ui/webui/components_ui.cc
index f0c273b..01a9df2 100644
--- a/chrome/browser/ui/webui/components_ui.cc
+++ b/chrome/browser/ui/webui/components_ui.cc
@@ -69,10 +69,10 @@ class ComponentsDOMHandler : public WebUIMessageHandler {
virtual void RegisterMessages() OVERRIDE;
// Callback for the "requestComponentsData" message.
- void HandleRequestComponentsData(const ListValue* args);
+ void HandleRequestComponentsData(const base::ListValue* args);
// Callback for the "checkUpdate" message.
- void HandleCheckUpdate(const ListValue* args);
+ void HandleCheckUpdate(const base::ListValue* args);
private:
void LoadComponents();
@@ -95,7 +95,8 @@ void ComponentsDOMHandler::RegisterMessages() {
base::Unretained(this)));
}
-void ComponentsDOMHandler::HandleRequestComponentsData(const ListValue* args) {
+void ComponentsDOMHandler::HandleRequestComponentsData(
+ const base::ListValue* args) {
LoadComponents();
}
@@ -103,7 +104,7 @@ void ComponentsDOMHandler::HandleRequestComponentsData(const ListValue* args) {
// TODO(shrikant): We need to make this button available based on current
// state e.g. If component state is currently updating then we need to disable
// button. (https://code.google.com/p/chromium/issues/detail?id=272540)
-void ComponentsDOMHandler::HandleCheckUpdate(const ListValue* args) {
+void ComponentsDOMHandler::HandleCheckUpdate(const base::ListValue* args) {
if (args->GetSize() != 1) {
NOTREACHED();
return;
@@ -124,11 +125,11 @@ void ComponentsDOMHandler::LoadComponents() {
cus->GetComponents(&components);
// Construct DictionaryValues to return to UI.
- ListValue* component_list = new ListValue();
+ base::ListValue* component_list = new base::ListValue();
for (size_t j = 0; j < components.size(); ++j) {
const CrxComponentInfo& component = components[j];
- DictionaryValue* component_entry = new DictionaryValue();
+ base::DictionaryValue* component_entry = new base::DictionaryValue();
component_entry->SetString("id", component.id);
component_entry->SetString("name", component.name);
component_entry->SetString("version", component.version);
@@ -136,7 +137,7 @@ void ComponentsDOMHandler::LoadComponents() {
component_list->Append(component_entry);
}
- DictionaryValue results;
+ base::DictionaryValue results;
results.Set("components", component_list);
web_ui()->CallJavascriptFunction("returnComponentsData", results);
}
diff --git a/chrome/browser/ui/webui/conflicts_ui.cc b/chrome/browser/ui/webui/conflicts_ui.cc
index cc937aa..8dad0fa 100644
--- a/chrome/browser/ui/webui/conflicts_ui.cc
+++ b/chrome/browser/ui/webui/conflicts_ui.cc
@@ -85,7 +85,7 @@ class ConflictsDOMHandler : public WebUIMessageHandler,
virtual void RegisterMessages();
// Callback for the "requestModuleList" message.
- void HandleRequestModuleList(const ListValue* args);
+ void HandleRequestModuleList(const base::ListValue* args);
private:
void SendModuleList();
@@ -105,7 +105,7 @@ void ConflictsDOMHandler::RegisterMessages() {
base::Unretained(this)));
}
-void ConflictsDOMHandler::HandleRequestModuleList(const ListValue* args) {
+void ConflictsDOMHandler::HandleRequestModuleList(const base::ListValue* args) {
// This request is handled asynchronously. See Observe for when we reply back.
registrar_.Add(this, chrome::NOTIFICATION_MODULE_LIST_ENUMERATED,
content::NotificationService::AllSources());
@@ -114,8 +114,8 @@ void ConflictsDOMHandler::HandleRequestModuleList(const ListValue* args) {
void ConflictsDOMHandler::SendModuleList() {
EnumerateModulesModel* loaded_modules = EnumerateModulesModel::GetInstance();
- ListValue* list = loaded_modules->GetModuleList();
- DictionaryValue results;
+ base::ListValue* list = loaded_modules->GetModuleList();
+ base::DictionaryValue results;
results.Set("moduleList", list);
// Add the section title and the total count for bad modules found.
diff --git a/chrome/browser/ui/webui/constrained_web_dialog_ui.cc b/chrome/browser/ui/webui/constrained_web_dialog_ui.cc
index e9c39c8..b6f94fc 100644
--- a/chrome/browser/ui/webui/constrained_web_dialog_ui.cc
+++ b/chrome/browser/ui/webui/constrained_web_dialog_ui.cc
@@ -75,7 +75,7 @@ void ConstrainedWebDialogUI::RenderViewCreated(
dialog_delegate->OnDialogShown(web_ui(), render_view_host);
}
-void ConstrainedWebDialogUI::OnDialogCloseMessage(const ListValue* args) {
+void ConstrainedWebDialogUI::OnDialogCloseMessage(const base::ListValue* args) {
ConstrainedWebDialogDelegate* delegate = GetConstrainedDelegate();
if (!delegate)
return;
diff --git a/chrome/browser/ui/webui/cookies_tree_model_util.cc b/chrome/browser/ui/webui/cookies_tree_model_util.cc
index 212ae31..1db24c4 100644
--- a/chrome/browser/ui/webui/cookies_tree_model_util.cc
+++ b/chrome/browser/ui/webui/cookies_tree_model_util.cc
@@ -291,7 +291,7 @@ void CookiesTreeModelUtil::GetChildNodeList(const CookieTreeNode* parent,
int count,
base::ListValue* nodes) {
for (int i = 0; i < count; ++i) {
- scoped_ptr<base::DictionaryValue> dict(new DictionaryValue);
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue);
const CookieTreeNode* child = parent->GetChild(start + i);
if (GetCookieTreeNodeDictionary(*child, dict.get()))
nodes->Append(dict.release());
diff --git a/chrome/browser/ui/webui/crashes_ui.cc b/chrome/browser/ui/webui/crashes_ui.cc
index 67d9a55..64fbfff 100644
--- a/chrome/browser/ui/webui/crashes_ui.cc
+++ b/chrome/browser/ui/webui/crashes_ui.cc
@@ -82,7 +82,7 @@ class CrashesDOMHandler : public WebUIMessageHandler,
private:
// Asynchronously fetches the list of crashes. Called from JS.
- void HandleRequestCrashes(const ListValue* args);
+ void HandleRequestCrashes(const base::ListValue* args);
// Sends the recent crashes list JS.
void UpdateUI();
@@ -110,7 +110,7 @@ void CrashesDOMHandler::RegisterMessages() {
base::Unretained(this)));
}
-void CrashesDOMHandler::HandleRequestCrashes(const ListValue* args) {
+void CrashesDOMHandler::HandleRequestCrashes(const base::ListValue* args) {
if (first_load_) {
first_load_ = false;
if (list_available_)
@@ -129,7 +129,7 @@ void CrashesDOMHandler::OnUploadListAvailable() {
void CrashesDOMHandler::UpdateUI() {
bool crash_reporting_enabled = CrashesUI::CrashReportingUIEnabled();
- ListValue crash_list;
+ base::ListValue crash_list;
if (crash_reporting_enabled) {
std::vector<CrashUploadList::UploadInfo> crashes;
@@ -137,7 +137,7 @@ void CrashesDOMHandler::UpdateUI() {
for (std::vector<CrashUploadList::UploadInfo>::iterator i = crashes.begin();
i != crashes.end(); ++i) {
- DictionaryValue* crash = new DictionaryValue();
+ base::DictionaryValue* crash = new base::DictionaryValue();
crash->SetString("id", i->id);
crash->SetString("time", base::TimeFormatFriendlyDateAndTime(i->time));
crash_list.Append(crash);
diff --git a/chrome/browser/ui/webui/downloads_dom_handler.cc b/chrome/browser/ui/webui/downloads_dom_handler.cc
index 70b6f90..b5d0a40 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler.cc
@@ -112,14 +112,14 @@ const char* GetDangerTypeString(content::DownloadDangerType danger_type) {
// Returns a JSON dictionary containing some of the attributes of |download|.
// The JSON dictionary will also have a field "id" set to |id|, and a field
// "otr" set to |incognito|.
-DictionaryValue* CreateDownloadItemValue(
+base::DictionaryValue* CreateDownloadItemValue(
content::DownloadItem* download_item,
bool incognito) {
// TODO(asanka): Move towards using download_model here for getting status and
// progress. The difference currently only matters to Drive downloads and
// those don't show up on the downloads page, but should.
DownloadItemModel download_model(download_item);
- DictionaryValue* file_value = new DictionaryValue();
+ base::DictionaryValue* file_value = new base::DictionaryValue();
file_value->SetInteger(
"started", static_cast<int>(download_item->GetStartTime().ToTimeT()));
diff --git a/chrome/browser/ui/webui/extensions/command_handler.cc b/chrome/browser/ui/webui/extensions/command_handler.cc
index 69cf63b..23dc878 100644
--- a/chrome/browser/ui/webui/extensions/command_handler.cc
+++ b/chrome/browser/ui/webui/extensions/command_handler.cc
@@ -74,13 +74,13 @@ void CommandHandler::Observe(
}
void CommandHandler::UpdateCommandDataOnPage() {
- DictionaryValue results;
+ base::DictionaryValue results;
GetAllCommands(&results);
web_ui()->CallJavascriptFunction(
"extensions.ExtensionCommandsOverlay.returnExtensionsData", results);
}
-void CommandHandler::HandleRequestExtensionsData(const ListValue* args) {
+void CommandHandler::HandleRequestExtensionsData(const base::ListValue* args) {
UpdateCommandDataOnPage();
}
@@ -121,14 +121,15 @@ void CommandHandler::HandleSetCommandScope(
UpdateCommandDataOnPage();
}
-void CommandHandler::HandleSetShortcutHandlingSuspended(const ListValue* args) {
+void CommandHandler::HandleSetShortcutHandlingSuspended(
+ const base::ListValue* args) {
bool suspended;
if (args->GetBoolean(0, &suspended))
ExtensionKeybindingRegistry::SetShortcutHandlingSuspended(suspended);
}
void CommandHandler::GetAllCommands(base::DictionaryValue* commands) {
- ListValue* results = new ListValue;
+ base::ListValue* results = new base::ListValue;
Profile* profile = Profile::FromWebUI(web_ui());
CommandService* command_service = CommandService::Get(profile);
@@ -137,12 +138,12 @@ void CommandHandler::GetAllCommands(base::DictionaryValue* commands) {
extension_service()->extensions();
for (ExtensionSet::const_iterator extension = extensions->begin();
extension != extensions->end(); ++extension) {
- scoped_ptr<DictionaryValue> extension_dict(new DictionaryValue);
+ scoped_ptr<base::DictionaryValue> extension_dict(new base::DictionaryValue);
extension_dict->SetString("name", (*extension)->name());
extension_dict->SetString("id", (*extension)->id());
// Add the keybindings to a list structure.
- scoped_ptr<ListValue> extensions_list(new ListValue());
+ scoped_ptr<base::ListValue> extensions_list(new base::ListValue());
bool active = false;
diff --git a/chrome/browser/ui/webui/extensions/extension_info_ui.cc b/chrome/browser/ui/webui/extensions/extension_info_ui.cc
index 163db8e..b494ccf 100644
--- a/chrome/browser/ui/webui/extensions/extension_info_ui.cc
+++ b/chrome/browser/ui/webui/extensions/extension_info_ui.cc
@@ -64,7 +64,7 @@ void ExtensionInfoUI::AddExtensionDataToSource(
if (!extension)
return;
- DictionaryValue extension_data;
+ base::DictionaryValue extension_data;
GetExtensionBasicInfo(extension, true, &extension_data);
source_->AddLocalizedStrings(extension_data);
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
index 1873e04..6a52d4d 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
@@ -312,15 +312,15 @@ base::DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue(
const ErrorConsole::ErrorList& errors =
error_console->GetErrorsForExtension(extension->id());
if (!errors.empty()) {
- scoped_ptr<ListValue> manifest_errors(new ListValue);
- scoped_ptr<ListValue> runtime_errors(new ListValue);
+ scoped_ptr<base::ListValue> manifest_errors(new base::ListValue);
+ scoped_ptr<base::ListValue> runtime_errors(new base::ListValue);
for (ErrorConsole::ErrorList::const_iterator iter = errors.begin();
iter != errors.end(); ++iter) {
if ((*iter)->type() == ExtensionError::MANIFEST_ERROR) {
manifest_errors->Append((*iter)->ToValue().release());
} else { // Handle runtime error.
const RuntimeError* error = static_cast<const RuntimeError*>(*iter);
- scoped_ptr<DictionaryValue> value = error->ToValue();
+ scoped_ptr<base::DictionaryValue> value = error->ToValue();
bool can_inspect =
!(deleting_rwh_id_ == error->render_view_id() &&
deleting_rph_id_ == error->render_process_id()) &&
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.h b/chrome/browser/ui/webui/extensions/extension_settings_handler.h
index a79c4f5..75dd1fe 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.h
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.h
@@ -147,7 +147,7 @@ class ExtensionSettingsHandler
void HandleInspectMessage(const base::ListValue* args);
// Callback for "launch" message.
- void HandleLaunchMessage(const ListValue* args);
+ void HandleLaunchMessage(const base::ListValue* args);
// Callback for "reload" message.
void HandleReloadMessage(const base::ListValue* args);
diff --git a/chrome/browser/ui/webui/extensions/install_extension_handler.cc b/chrome/browser/ui/webui/extensions/install_extension_handler.cc
index f556cf5..83e22ef 100644
--- a/chrome/browser/ui/webui/extensions/install_extension_handler.cc
+++ b/chrome/browser/ui/webui/extensions/install_extension_handler.cc
@@ -60,7 +60,8 @@ void InstallExtensionHandler::RegisterMessages() {
base::Unretained(this)));
}
-void InstallExtensionHandler::HandleStartDragMessage(const ListValue* args) {
+void InstallExtensionHandler::HandleStartDragMessage(
+ const base::ListValue* args) {
content::DropData* drop_data =
web_ui()->GetWebContents()->GetView()->GetDropData();
if (!drop_data) {
@@ -82,12 +83,14 @@ void InstallExtensionHandler::HandleStartDragMessage(const ListValue* args) {
file_info.display_name.empty() ? file_info.path : file_info.display_name;
}
-void InstallExtensionHandler::HandleStopDragMessage(const ListValue* args) {
+void InstallExtensionHandler::HandleStopDragMessage(
+ const base::ListValue* args) {
file_to_install_.clear();
file_display_name_.clear();
}
-void InstallExtensionHandler::HandleInstallMessage(const ListValue* args) {
+void InstallExtensionHandler::HandleInstallMessage(
+ const base::ListValue* args) {
if (file_to_install_.empty()) {
LOG(ERROR) << "No file captured to install.";
return;
@@ -124,7 +127,7 @@ void InstallExtensionHandler::HandleInstallMessage(const ListValue* args) {
}
void InstallExtensionHandler::HandleInstallDirectoryMessage(
- const ListValue* args) {
+ const base::ListValue* args) {
Profile* profile = Profile::FromBrowserContext(
web_ui()->GetWebContents()->GetBrowserContext());
UnpackedInstaller::Create(
diff --git a/chrome/browser/ui/webui/extensions/install_extension_handler.h b/chrome/browser/ui/webui/extensions/install_extension_handler.h
index f19497e..de1146a 100644
--- a/chrome/browser/ui/webui/extensions/install_extension_handler.h
+++ b/chrome/browser/ui/webui/extensions/install_extension_handler.h
@@ -32,10 +32,10 @@ class InstallExtensionHandler : public content::WebUIMessageHandler {
// needed so that we can capture the file being dragged. If we wait until
// we receive a drop notification, the drop data in the browser process will
// have already been destroyed.
- void HandleStartDragMessage(const ListValue* args);
+ void HandleStartDragMessage(const base::ListValue* args);
// Handles a notification from the JavaScript that a drag has stopped.
- void HandleStopDragMessage(const ListValue* args);
+ void HandleStopDragMessage(const base::ListValue* args);
// Handles a notification from the JavaScript to install the file currently
// being dragged.
@@ -43,11 +43,11 @@ class InstallExtensionHandler : public content::WebUIMessageHandler {
// IMPORTANT: We purposefully do not allow the JavaScript to specify the file
// to be installed as a precaution against the extension management page
// getting XSS'd.
- void HandleInstallMessage(const ListValue* args);
+ void HandleInstallMessage(const base::ListValue* args);
// Handles a notification from the JavaScript to install the directory
// currently being dragged.
- void HandleInstallDirectoryMessage(const ListValue* args);
+ void HandleInstallDirectoryMessage(const base::ListValue* args);
// The path to the file that will be installed when HandleInstallMessage() is
// called.
diff --git a/chrome/browser/ui/webui/extensions/pack_extension_handler.cc b/chrome/browser/ui/webui/extensions/pack_extension_handler.cc
index 49f47c4..a68d3b2 100644
--- a/chrome/browser/ui/webui/extensions/pack_extension_handler.cc
+++ b/chrome/browser/ui/webui/extensions/pack_extension_handler.cc
@@ -68,8 +68,8 @@ void PackExtensionHandler::RegisterMessages() {
void PackExtensionHandler::OnPackSuccess(const base::FilePath& crx_file,
const base::FilePath& pem_file) {
- ListValue arguments;
- arguments.Append(Value::CreateStringValue(
+ base::ListValue arguments;
+ arguments.Append(base::Value::CreateStringValue(
UTF16ToUTF8(PackExtensionJob::StandardSuccessMessage(
crx_file, pem_file))));
web_ui()->CallJavascriptFunction(
@@ -94,8 +94,8 @@ void PackExtensionHandler::OnPackFailure(const std::string& error,
void PackExtensionHandler::FileSelected(const base::FilePath& path, int index,
void* params) {
- ListValue results;
- results.Append(Value::CreateStringValue(path.value()));
+ base::ListValue results;
+ results.Append(base::Value::CreateStringValue(path.value()));
web_ui()->CallJavascriptFunction("window.handleFilePathSelected", results);
}
@@ -104,7 +104,7 @@ void PackExtensionHandler::MultiFilesSelected(
NOTREACHED();
}
-void PackExtensionHandler::HandlePackMessage(const ListValue* args) {
+void PackExtensionHandler::HandlePackMessage(const base::ListValue* args) {
DCHECK_EQ(3U, args->GetSize());
double flags_double = 0.0;
@@ -149,7 +149,7 @@ void PackExtensionHandler::HandlePackMessage(const ListValue* args) {
}
void PackExtensionHandler::HandleSelectFilePathMessage(
- const ListValue* args) {
+ const base::ListValue* args) {
DCHECK_EQ(2U, args->GetSize());
std::string select_type;
@@ -200,8 +200,8 @@ void PackExtensionHandler::HandleSelectFilePathMessage(
}
void PackExtensionHandler::ShowAlert(const std::string& message) {
- ListValue arguments;
- arguments.Append(Value::CreateStringValue(message));
+ base::ListValue arguments;
+ arguments.Append(base::Value::CreateStringValue(message));
web_ui()->CallJavascriptFunction(
"extensions.PackExtensionOverlay.showError", arguments);
}
diff --git a/chrome/browser/ui/webui/extensions/pack_extension_handler.h b/chrome/browser/ui/webui/extensions/pack_extension_handler.h
index 49ec4ab..c815eff 100644
--- a/chrome/browser/ui/webui/extensions/pack_extension_handler.h
+++ b/chrome/browser/ui/webui/extensions/pack_extension_handler.h
@@ -49,14 +49,14 @@ class PackExtensionHandler : public content::WebUIMessageHandler,
virtual void FileSelectionCanceled(void* params) OVERRIDE {}
// JavaScript callback to start packing an extension.
- void HandlePackMessage(const ListValue* args);
+ void HandlePackMessage(const base::ListValue* args);
// JavaScript callback to show a file browse dialog.
// |args[0]| must be a string that specifies the file dialog type: file or
// folder.
// |args[1]| must be a string that specifies the operation to perform: load
// or pem.
- void HandleSelectFilePathMessage(const ListValue* args);
+ void HandleSelectFilePathMessage(const base::ListValue* args);
// A function to ask the page to show an alert.
void ShowAlert(const std::string& message);
diff --git a/chrome/browser/ui/webui/flags_ui.cc b/chrome/browser/ui/webui/flags_ui.cc
index c21350f..f493e41 100644
--- a/chrome/browser/ui/webui/flags_ui.cc
+++ b/chrome/browser/ui/webui/flags_ui.cc
@@ -118,16 +118,16 @@ class FlagsDOMHandler : public WebUIMessageHandler {
virtual void RegisterMessages() OVERRIDE;
// Callback for the "requestFlagsExperiments" message.
- void HandleRequestFlagsExperiments(const ListValue* args);
+ void HandleRequestFlagsExperiments(const base::ListValue* args);
// Callback for the "enableFlagsExperiment" message.
- void HandleEnableFlagsExperimentMessage(const ListValue* args);
+ void HandleEnableFlagsExperimentMessage(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 the "resetAllFlags" message.
- void HandleResetAllFlags(const ListValue* args);
+ void HandleResetAllFlags(const base::ListValue* args);
private:
scoped_ptr<about_flags::FlagsStorage> flags_storage_;
@@ -161,17 +161,18 @@ void FlagsDOMHandler::Init(about_flags::FlagsStorage* flags_storage,
HandleRequestFlagsExperiments(NULL);
}
-void FlagsDOMHandler::HandleRequestFlagsExperiments(const ListValue* args) {
+void FlagsDOMHandler::HandleRequestFlagsExperiments(
+ const base::ListValue* args) {
flags_experiments_requested_ = true;
// Bail out if the handler hasn't been initialized yet. The request will be
// handled after the initialization.
if (!flags_storage_)
return;
- DictionaryValue results;
+ base::DictionaryValue results;
- scoped_ptr<ListValue> supported_experiments(new ListValue);
- scoped_ptr<ListValue> unsupported_experiments(new ListValue);
+ scoped_ptr<base::ListValue> supported_experiments(new base::ListValue);
+ scoped_ptr<base::ListValue> unsupported_experiments(new base::ListValue);
about_flags::GetFlagsExperimentsData(flags_storage_.get(),
access_,
supported_experiments.get(),
@@ -197,7 +198,7 @@ void FlagsDOMHandler::HandleRequestFlagsExperiments(const ListValue* args) {
}
void FlagsDOMHandler::HandleEnableFlagsExperimentMessage(
- const ListValue* args) {
+ const base::ListValue* args) {
DCHECK(flags_storage_);
DCHECK_EQ(2u, args->GetSize());
if (args->GetSize() != 2)
@@ -215,7 +216,7 @@ void FlagsDOMHandler::HandleEnableFlagsExperimentMessage(
enable_str == "true");
}
-void FlagsDOMHandler::HandleRestartBrowser(const ListValue* args) {
+void FlagsDOMHandler::HandleRestartBrowser(const base::ListValue* args) {
DCHECK(flags_storage_);
#if !defined(OS_CHROMEOS)
chrome::AttemptRestart();
@@ -237,7 +238,7 @@ void FlagsDOMHandler::HandleRestartBrowser(const ListValue* args) {
#endif
}
-void FlagsDOMHandler::HandleResetAllFlags(const ListValue* args) {
+void FlagsDOMHandler::HandleResetAllFlags(const base::ListValue* args) {
DCHECK(flags_storage_);
about_flags::ResetAllFlags(flags_storage_.get());
}
diff --git a/chrome/browser/ui/webui/flash_ui.cc b/chrome/browser/ui/webui/flash_ui.cc
index 4d6333c..7aa142f 100644
--- a/chrome/browser/ui/webui/flash_ui.cc
+++ b/chrome/browser/ui/webui/flash_ui.cc
@@ -96,7 +96,7 @@ class FlashDOMHandler : public WebUIMessageHandler,
virtual void OnGpuInfoUpdate() OVERRIDE;
// Callback for the "requestFlashInfo" message.
- void HandleRequestFlashInfo(const ListValue* args);
+ void HandleRequestFlashInfo(const base::ListValue* args);
// Callback for the Flash plugin information.
void OnGotPlugins(const std::vector<content::WebPluginInfo>& plugins);
@@ -180,22 +180,22 @@ void FlashDOMHandler::OnUploadListAvailable() {
MaybeRespondToPage();
}
-void AddPair(ListValue* list,
+void AddPair(base::ListValue* list,
const base::string16& key,
const base::string16& value) {
- DictionaryValue* results = new DictionaryValue();
+ base::DictionaryValue* results = new base::DictionaryValue();
results->SetString("key", key);
results->SetString("value", value);
list->Append(results);
}
-void AddPair(ListValue* list,
+void AddPair(base::ListValue* list,
const base::string16& key,
const std::string& value) {
AddPair(list, key, ASCIIToUTF16(value));
}
-void FlashDOMHandler::HandleRequestFlashInfo(const ListValue* args) {
+void FlashDOMHandler::HandleRequestFlashInfo(const base::ListValue* args) {
page_has_requested_data_ = true;
MaybeRespondToPage();
}
@@ -238,7 +238,7 @@ void FlashDOMHandler::MaybeRespondToPage() {
// Obtain the Chrome version info.
chrome::VersionInfo version_info;
- ListValue* list = new ListValue();
+ base::ListValue* list = new base::ListValue();
// Chrome version information.
AddPair(list,
@@ -370,7 +370,7 @@ void FlashDOMHandler::MaybeRespondToPage() {
AddPair(list, ASCIIToUTF16("GL_VERSION"), gpu_info.gl_version_string);
AddPair(list, ASCIIToUTF16("GL_EXTENSIONS"), gpu_info.gl_extensions);
- DictionaryValue flashInfo;
+ base::DictionaryValue flashInfo;
flashInfo.Set("flashInfo", list);
web_ui()->CallJavascriptFunction("returnFlashInfo", flashInfo);
}
diff --git a/chrome/browser/ui/webui/help/help_handler.cc b/chrome/browser/ui/webui/help/help_handler.cc
index e1f08e3..57b2a63 100644
--- a/chrome/browser/ui/webui/help/help_handler.cc
+++ b/chrome/browser/ui/webui/help/help_handler.cc
@@ -316,7 +316,7 @@ void HelpHandler::Observe(int type, const content::NotificationSource& source,
}
}
-void HelpHandler::OnPageLoaded(const ListValue* args) {
+void HelpHandler::OnPageLoaded(const base::ListValue* args) {
#if defined(OS_CHROMEOS)
// Version information is loaded from a callback
loader_.GetVersion(
@@ -359,17 +359,17 @@ void HelpHandler::OnPageLoaded(const ListValue* args) {
}
#if defined(OS_MACOSX)
-void HelpHandler::PromoteUpdater(const ListValue* args) {
+void HelpHandler::PromoteUpdater(const base::ListValue* args) {
version_updater_->PromoteUpdater();
}
#endif
-void HelpHandler::RelaunchNow(const ListValue* args) {
+void HelpHandler::RelaunchNow(const base::ListValue* args) {
DCHECK(args->empty());
version_updater_->RelaunchBrowser();
}
-void HelpHandler::OpenFeedbackDialog(const ListValue* args) {
+void HelpHandler::OpenFeedbackDialog(const base::ListValue* args) {
DCHECK(args->empty());
Browser* browser = chrome::FindBrowserWithWebContents(
web_ui()->GetWebContents());
@@ -385,7 +385,7 @@ void HelpHandler::OpenHelpPage(const base::ListValue* args) {
#if defined(OS_CHROMEOS)
-void HelpHandler::SetChannel(const ListValue* args) {
+void HelpHandler::SetChannel(const base::ListValue* args) {
DCHECK(args->GetSize() == 2);
if (!CanChangeChannel()) {
@@ -409,7 +409,7 @@ void HelpHandler::SetChannel(const ListValue* args) {
}
}
-void HelpHandler::RelaunchAndPowerwash(const ListValue* args) {
+void HelpHandler::RelaunchAndPowerwash(const base::ListValue* args) {
DCHECK(args->empty());
if (IsEnterpriseManaged())
diff --git a/chrome/browser/ui/webui/history_ui.cc b/chrome/browser/ui/webui/history_ui.cc
index 47a6dd0..b9e3a85 100644
--- a/chrome/browser/ui/webui/history_ui.cc
+++ b/chrome/browser/ui/webui/history_ui.cc
@@ -287,7 +287,7 @@ BrowsingHistoryHandler::HistoryEntry::~HistoryEntry() {
}
void BrowsingHistoryHandler::HistoryEntry::SetUrlAndTitle(
- DictionaryValue* result) const {
+ base::DictionaryValue* result) const {
result->SetString("url", url.spec());
bool using_url_as_the_title = false;
@@ -310,11 +310,11 @@ void BrowsingHistoryHandler::HistoryEntry::SetUrlAndTitle(
result->SetString("title", title_to_set);
}
-scoped_ptr<DictionaryValue> BrowsingHistoryHandler::HistoryEntry::ToValue(
+scoped_ptr<base::DictionaryValue> BrowsingHistoryHandler::HistoryEntry::ToValue(
BookmarkModel* bookmark_model,
ManagedUserService* managed_user_service,
const ProfileSyncService* sync_service) const {
- scoped_ptr<DictionaryValue> result(new DictionaryValue());
+ scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue());
SetUrlAndTitle(result.get());
base::string16 domain = net::IDNToUnicode(url.host(), accept_languages);
@@ -327,7 +327,7 @@ scoped_ptr<DictionaryValue> BrowsingHistoryHandler::HistoryEntry::ToValue(
result->SetDouble("time", time.ToJsTime());
// Pass the timestamps in a list.
- scoped_ptr<ListValue> timestamps(new ListValue);
+ scoped_ptr<base::ListValue> timestamps(new base::ListValue);
for (std::set<int64>::const_iterator it = all_timestamps.begin();
it != all_timestamps.end(); ++it) {
timestamps->AppendDouble(base::Time::FromInternalValue(*it).ToJsTime());
@@ -417,9 +417,10 @@ void BrowsingHistoryHandler::RegisterMessages() {
base::Unretained(this)));
}
-bool BrowsingHistoryHandler::ExtractIntegerValueAtIndex(const ListValue* value,
- int index,
- int* out_int) {
+bool BrowsingHistoryHandler::ExtractIntegerValueAtIndex(
+ const base::ListValue* value,
+ int index,
+ int* out_int) {
double double_value;
if (value->GetDouble(index, &double_value)) {
*out_int = static_cast<int>(double_value);
@@ -479,7 +480,7 @@ void BrowsingHistoryHandler::QueryHistory(
}
}
-void BrowsingHistoryHandler::HandleQueryHistory(const ListValue* args) {
+void BrowsingHistoryHandler::HandleQueryHistory(const base::ListValue* args) {
history::QueryOptions options;
// Parse the arguments from JavaScript. There are five required arguments:
@@ -526,7 +527,7 @@ void BrowsingHistoryHandler::HandleQueryHistory(const ListValue* args) {
QueryHistory(search_text, options);
}
-void BrowsingHistoryHandler::HandleRemoveVisits(const ListValue* args) {
+void BrowsingHistoryHandler::HandleRemoveVisits(const base::ListValue* args) {
Profile* profile = Profile::FromWebUI(web_ui());
if (delete_task_tracker_.HasTrackedTasks() ||
!profile->GetPrefs()->GetBoolean(prefs::kAllowDeletingBrowserHistory)) {
@@ -544,10 +545,11 @@ void BrowsingHistoryHandler::HandleRemoveVisits(const ListValue* args) {
expire_list.reserve(args->GetSize());
DCHECK(urls_to_be_deleted_.empty());
- for (ListValue::const_iterator it = args->begin(); it != args->end(); ++it) {
- DictionaryValue* deletion = NULL;
+ for (base::ListValue::const_iterator it = args->begin();
+ it != args->end(); ++it) {
+ base::DictionaryValue* deletion = NULL;
base::string16 url;
- ListValue* timestamps = NULL;
+ base::ListValue* timestamps = NULL;
// Each argument is a dictionary with properties "url" and "timestamps".
if (!((*it)->GetAsDictionary(&deletion) &&
@@ -567,7 +569,7 @@ void BrowsingHistoryHandler::HandleRemoveVisits(const ListValue* args) {
double timestamp;
history::ExpireHistoryArgs* expire_args = NULL;
- for (ListValue::const_iterator ts_iterator = timestamps->begin();
+ for (base::ListValue::const_iterator ts_iterator = timestamps->begin();
ts_iterator != timestamps->end(); ++ts_iterator) {
if (!(*ts_iterator)->GetAsDouble(&timestamp)) {
NOTREACHED() << "Unable to extract visit timestamp.";
@@ -630,7 +632,8 @@ void BrowsingHistoryHandler::HandleRemoveVisits(const ListValue* args) {
#endif
}
-void BrowsingHistoryHandler::HandleClearBrowsingData(const ListValue* args) {
+void BrowsingHistoryHandler::HandleClearBrowsingData(
+ const base::ListValue* args) {
#if defined(OS_ANDROID)
Profile* profile = Profile::FromWebUI(web_ui());
const TabModel* tab_model =
@@ -646,7 +649,7 @@ void BrowsingHistoryHandler::HandleClearBrowsingData(const ListValue* args) {
#endif
}
-void BrowsingHistoryHandler::HandleRemoveBookmark(const ListValue* args) {
+void BrowsingHistoryHandler::HandleRemoveBookmark(const base::ListValue* args) {
base::string16 url = ExtractStringValue(args);
Profile* profile = Profile::FromWebUI(web_ui());
BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile);
@@ -731,7 +734,7 @@ void BrowsingHistoryHandler::ReturnResultsToFrontEnd() {
}
// Convert the result vector into a ListValue.
- ListValue results_value;
+ base::ListValue results_value;
for (std::vector<BrowsingHistoryHandler::HistoryEntry>::iterator it =
query_results_.begin(); it != query_results_.end(); ++it) {
scoped_ptr<base::Value> value(
@@ -795,7 +798,7 @@ void BrowsingHistoryHandler::WebHistoryQueryComplete(
const history::QueryOptions& options,
base::TimeTicks start_time,
history::WebHistoryService::Request* request,
- const DictionaryValue* results_value) {
+ const base::DictionaryValue* results_value) {
base::TimeDelta delta = base::TimeTicks::Now() - start_time;
UMA_HISTOGRAM_TIMES("WebHistory.ResponseTime", delta);
const std::string accept_languages = GetAcceptLanguages();
@@ -812,14 +815,14 @@ void BrowsingHistoryHandler::WebHistoryQueryComplete(
NUM_WEB_HISTORY_QUERY_BUCKETS);
DCHECK_EQ(0U, web_history_query_results_.size());
- const ListValue* events = NULL;
+ const base::ListValue* events = NULL;
if (results_value && results_value->GetList("event", &events)) {
web_history_query_results_.reserve(events->GetSize());
for (unsigned int i = 0; i < events->GetSize(); ++i) {
- const DictionaryValue* event = NULL;
- const DictionaryValue* result = NULL;
- const ListValue* results = NULL;
- const ListValue* ids = NULL;
+ const base::DictionaryValue* event = NULL;
+ const base::DictionaryValue* result = NULL;
+ const base::ListValue* results = NULL;
+ const base::ListValue* ids = NULL;
base::string16 url;
base::string16 title;
base::Time visit_time;
@@ -839,7 +842,7 @@ void BrowsingHistoryHandler::WebHistoryQueryComplete(
// Extract the timestamps of all the visits to this URL.
// They are referred to as "IDs" by the server.
for (int j = 0; j < static_cast<int>(ids->GetSize()); ++j) {
- const DictionaryValue* id = NULL;
+ const base::DictionaryValue* id = NULL;
std::string timestamp_string;
int64 timestamp_usec;
diff --git a/chrome/browser/ui/webui/history_ui.h b/chrome/browser/ui/webui/history_ui.h
index e6f5f57..df2431a 100644
--- a/chrome/browser/ui/webui/history_ui.h
+++ b/chrome/browser/ui/webui/history_ui.h
@@ -47,10 +47,10 @@ class BrowsingHistoryHandler : public content::WebUIMessageHandler,
virtual ~HistoryEntry();
// Formats this entry's URL and title and adds them to |result|.
- void SetUrlAndTitle(DictionaryValue* result) const;
+ void SetUrlAndTitle(base::DictionaryValue* result) const;
// Converts the entry to a DictionaryValue to be owned by the caller.
- scoped_ptr<DictionaryValue> ToValue(
+ scoped_ptr<base::DictionaryValue> ToValue(
BookmarkModel* bookmark_model,
ManagedUserService* managed_user_service,
const ProfileSyncService* sync_service) const;
diff --git a/chrome/browser/ui/webui/identity_internals_ui.cc b/chrome/browser/ui/webui/identity_internals_ui.cc
index 9494295..d4c716a 100644
--- a/chrome/browser/ui/webui/identity_internals_ui.cc
+++ b/chrome/browser/ui/webui/identity_internals_ui.cc
@@ -63,7 +63,7 @@ class IdentityInternalsUIMessageHandler : public content::WebUIMessageHandler {
// Gets a list of scopes specified in |token_cache_key| and returns a pointer
// to a ListValue containing the scopes. The caller gets ownership of the
// returned object.
- ListValue* GetScopes(
+ base::ListValue* GetScopes(
const extensions::ExtensionTokenKey& token_cache_key);
// Gets a localized status of the access token in |token_cache_value|.
@@ -79,19 +79,19 @@ class IdentityInternalsUIMessageHandler : public content::WebUIMessageHandler {
// DictionaryValue object with corresponding information in a localized and
// readable form and returns a pointer to created object. Caller gets the
// ownership of the returned object.
- DictionaryValue* GetInfoForToken(
+ base::DictionaryValue* GetInfoForToken(
const extensions::ExtensionTokenKey& token_cache_key,
const extensions::IdentityTokenCacheValue& token_cache_value);
// Gets all of the tokens stored in IdentityAPI token cache and returns them
// to the caller using Javascript callback function
// |identity_internals.returnTokens()|.
- void GetInfoForAllTokens(const ListValue* args);
+ void GetInfoForAllTokens(const base::ListValue* args);
// Initiates revoking of the token, based on the extension ID and token
// passed as entries in the |args| list. Updates the caller of completion
// using Javascript callback function |identity_internals.tokenRevokeDone()|.
- void RevokeToken(const ListValue* args);
+ void RevokeToken(const base::ListValue* args);
// A vector of token revokers that are currently revoking tokens.
ScopedVector<IdentityInternalsTokenRevoker> token_revokers_;
@@ -145,7 +145,7 @@ void IdentityInternalsUIMessageHandler::OnTokenRevokerDone(
token_revoker->extension_id(), token_revoker->access_token());
// Update view about the token being removed.
- ListValue result;
+ base::ListValue result;
result.AppendString(token_revoker->access_token());
web_ui()->CallJavascriptFunction("identity_internals.tokenRevokeDone",
result);
@@ -168,9 +168,9 @@ const std::string IdentityInternalsUIMessageHandler::GetExtensionName(
return extension->name();
}
-ListValue* IdentityInternalsUIMessageHandler::GetScopes(
+base::ListValue* IdentityInternalsUIMessageHandler::GetScopes(
const extensions::ExtensionTokenKey& token_cache_key) {
- ListValue* scopes_value = new ListValue();
+ base::ListValue* scopes_value = new base::ListValue();
for (std::set<std::string>::const_iterator
iter = token_cache_key.scopes.begin();
iter != token_cache_key.scopes.end(); ++iter) {
@@ -201,10 +201,10 @@ const std::string IdentityInternalsUIMessageHandler::GetExpirationTime(
token_cache_value.expiration_time()));
}
-DictionaryValue* IdentityInternalsUIMessageHandler::GetInfoForToken(
+base::DictionaryValue* IdentityInternalsUIMessageHandler::GetInfoForToken(
const extensions::ExtensionTokenKey& token_cache_key,
const extensions::IdentityTokenCacheValue& token_cache_value) {
- DictionaryValue* token_data = new DictionaryValue();
+ base::DictionaryValue* token_data = new base::DictionaryValue();
token_data->SetString(kExtensionId, token_cache_key.extension_id);
token_data->SetString(kExtensionName, GetExtensionName(token_cache_key));
token_data->Set(kScopes, GetScopes(token_cache_key));
@@ -216,8 +216,8 @@ DictionaryValue* IdentityInternalsUIMessageHandler::GetInfoForToken(
}
void IdentityInternalsUIMessageHandler::GetInfoForAllTokens(
- const ListValue* args) {
- ListValue results;
+ const base::ListValue* args) {
+ base::ListValue results;
extensions::IdentityAPI::CachedTokens tokens =
extensions::IdentityAPI::GetFactoryInstance()->GetForProfile(
Profile::FromWebUI(web_ui()))->GetAllCachedTokens();
@@ -238,7 +238,8 @@ void IdentityInternalsUIMessageHandler::RegisterMessages() {
base::Unretained(this)));
}
-void IdentityInternalsUIMessageHandler::RevokeToken(const ListValue* args) {
+void IdentityInternalsUIMessageHandler::RevokeToken(
+ const base::ListValue* args) {
std::string extension_id;
std::string access_token;
args->GetString(kRevokeTokenExtensionOffset, &extension_id);
diff --git a/chrome/browser/ui/webui/inspect_ui.cc b/chrome/browser/ui/webui/inspect_ui.cc
index 60d0d6b..93b53ce 100644
--- a/chrome/browser/ui/webui/inspect_ui.cc
+++ b/chrome/browser/ui/webui/inspect_ui.cc
@@ -55,15 +55,15 @@ class InspectMessageHandler : public WebUIMessageHandler {
// WebUIMessageHandler implementation.
virtual void RegisterMessages() OVERRIDE;
- void HandleInitUICommand(const ListValue* args);
- void HandleInspectCommand(const ListValue* args);
- void HandleActivateCommand(const ListValue* args);
- void HandleCloseCommand(const ListValue* args);
- void HandleReloadCommand(const ListValue* args);
- void HandleOpenCommand(const ListValue* args);
+ void HandleInitUICommand(const base::ListValue* args);
+ void HandleInspectCommand(const base::ListValue* args);
+ void HandleActivateCommand(const base::ListValue* args);
+ void HandleCloseCommand(const base::ListValue* args);
+ void HandleReloadCommand(const base::ListValue* args);
+ void HandleOpenCommand(const base::ListValue* args);
void HandleBooleanPrefChanged(const char* pref_name,
- const ListValue* args);
- void HandlePortForwardingConfigCommand(const ListValue* args);
+ const base::ListValue* args);
+ void HandlePortForwardingConfigCommand(const base::ListValue* args);
InspectUI* inspect_ui_;
@@ -102,11 +102,11 @@ void InspectMessageHandler::RegisterMessages() {
base::Unretained(this)));
}
-void InspectMessageHandler::HandleInitUICommand(const ListValue*) {
+void InspectMessageHandler::HandleInitUICommand(const base::ListValue*) {
inspect_ui_->InitUI();
}
-static bool ParseStringArgs(const ListValue* args,
+static bool ParseStringArgs(const base::ListValue* args,
std::string* arg0,
std::string* arg1,
std::string* arg2 = 0) {
@@ -116,35 +116,35 @@ static bool ParseStringArgs(const ListValue* args,
(!arg2 || (arg_size > 2 && args->GetString(2, arg2)));
}
-void InspectMessageHandler::HandleInspectCommand(const ListValue* args) {
+void InspectMessageHandler::HandleInspectCommand(const base::ListValue* args) {
std::string source;
std::string id;
if (ParseStringArgs(args, &source, &id))
inspect_ui_->Inspect(source, id);
}
-void InspectMessageHandler::HandleActivateCommand(const ListValue* args) {
+void InspectMessageHandler::HandleActivateCommand(const base::ListValue* args) {
std::string source;
std::string id;
if (ParseStringArgs(args, &source, &id))
inspect_ui_->Activate(source, id);
}
-void InspectMessageHandler::HandleCloseCommand(const ListValue* args) {
+void InspectMessageHandler::HandleCloseCommand(const base::ListValue* args) {
std::string source;
std::string id;
if (ParseStringArgs(args, &source, &id))
inspect_ui_->Close(source, id);
}
-void InspectMessageHandler::HandleReloadCommand(const ListValue* args) {
+void InspectMessageHandler::HandleReloadCommand(const base::ListValue* args) {
std::string source;
std::string id;
if (ParseStringArgs(args, &source, &id))
inspect_ui_->Reload(source, id);
}
-void InspectMessageHandler::HandleOpenCommand(const ListValue* args) {
+void InspectMessageHandler::HandleOpenCommand(const base::ListValue* args) {
std::string source_id;
std::string browser_id;
std::string url;
@@ -154,7 +154,7 @@ void InspectMessageHandler::HandleOpenCommand(const ListValue* args) {
void InspectMessageHandler::HandleBooleanPrefChanged(
const char* pref_name,
- const ListValue* args) {
+ const base::ListValue* args) {
Profile* profile = Profile::FromWebUI(web_ui());
if (!profile)
return;
@@ -165,12 +165,12 @@ void InspectMessageHandler::HandleBooleanPrefChanged(
}
void InspectMessageHandler::HandlePortForwardingConfigCommand(
- const ListValue* args) {
+ const base::ListValue* args) {
Profile* profile = Profile::FromWebUI(web_ui());
if (!profile)
return;
- const DictionaryValue* dict_src;
+ const base::DictionaryValue* dict_src;
if (args->GetSize() == 1 && args->GetDictionary(0, &dict_src))
profile->GetPrefs()->Set(prefs::kDevToolsPortForwardingConfig, *dict_src);
}
@@ -304,7 +304,8 @@ content::WebUIDataSource* InspectUI::CreateInspectUIHTMLSource() {
}
void InspectUI::UpdateDiscoverUsbDevicesEnabled() {
- const Value* value = GetPrefValue(prefs::kDevToolsDiscoverUsbDevicesEnabled);
+ const base::Value* value =
+ GetPrefValue(prefs::kDevToolsDiscoverUsbDevicesEnabled);
web_ui()->CallJavascriptFunction("updateDiscoverUsbDevicesEnabled", *value);
// Configure adb bridge.
diff --git a/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc b/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc
index cddc71b..6ceebda 100644
--- a/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc
+++ b/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc
@@ -293,7 +293,7 @@ void LocalDiscoveryUIHandler::OnPrivetRegisterError(
const std::string& action,
PrivetRegisterOperation::FailureReason reason,
int printer_http_code,
- const DictionaryValue* json) {
+ const base::DictionaryValue* json) {
std::string error;
if (reason == PrivetRegisterOperation::FAILURE_JSON_ERROR &&
@@ -556,7 +556,8 @@ void LocalDiscoveryUIHandler::OnCloudPrintPrefsChanged() {
SetupCloudPrintConnectorSection();
}
-void LocalDiscoveryUIHandler::ShowCloudPrintSetupDialog(const ListValue* args) {
+void LocalDiscoveryUIHandler::ShowCloudPrintSetupDialog(
+ const base::ListValue* args) {
content::RecordAction(
content::UserMetricsAction("Options_EnableCloudPrintProxy"));
// Open the connector enable page in the current tab.
@@ -569,7 +570,7 @@ void LocalDiscoveryUIHandler::ShowCloudPrintSetupDialog(const ListValue* args) {
}
void LocalDiscoveryUIHandler::HandleDisableCloudPrintConnector(
- const ListValue* args) {
+ const base::ListValue* args) {
content::RecordAction(
content::UserMetricsAction("Options_DisableCloudPrintProxy"));
CloudPrintProxyServiceFactory::GetForProfile(Profile::FromWebUI(web_ui()))->
@@ -608,7 +609,7 @@ void LocalDiscoveryUIHandler::SetupCloudPrintConnectorSection() {
l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT),
UTF8ToUTF16(email));
}
- StringValue label(label_str);
+ base::StringValue label(label_str);
web_ui()->CallJavascriptFunction(
"local_discovery.setupCloudPrintConnectorSection", disabled, label,
diff --git a/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h b/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h
index e6e1eb8..176c814 100644
--- a/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h
+++ b/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h
@@ -59,7 +59,7 @@ class LocalDiscoveryUIHandler : public content::WebUIMessageHandler,
const std::string& action,
PrivetRegisterOperation::FailureReason reason,
int printer_http_code,
- const DictionaryValue* json) OVERRIDE;
+ const base::DictionaryValue* json) OVERRIDE;
virtual void OnPrivetRegisterDone(
PrivetRegisterOperation* operation,
@@ -154,8 +154,8 @@ class LocalDiscoveryUIHandler : public content::WebUIMessageHandler,
#if defined(CLOUD_PRINT_CONNECTOR_UI_AVAILABLE)
void StartCloudPrintConnector();
void OnCloudPrintPrefsChanged();
- void ShowCloudPrintSetupDialog(const ListValue* args);
- void HandleDisableCloudPrintConnector(const ListValue* args);
+ void ShowCloudPrintSetupDialog(const base::ListValue* args);
+ void HandleDisableCloudPrintConnector(const base::ListValue* args);
void SetupCloudPrintConnectorSection();
void RemoveCloudPrintConnectorSection();
void RefreshCloudPrintStatusFromService();
diff --git a/chrome/browser/ui/webui/media/webrtc_logs_ui.cc b/chrome/browser/ui/webui/media/webrtc_logs_ui.cc
index ce676eb..fdd528c 100644
--- a/chrome/browser/ui/webui/media/webrtc_logs_ui.cc
+++ b/chrome/browser/ui/webui/media/webrtc_logs_ui.cc
@@ -81,7 +81,7 @@ class WebRtcLogsDOMHandler : public WebUIMessageHandler,
private:
// Asynchronously fetches the list of upload WebRTC logs. Called from JS.
- void HandleRequestWebRtcLogs(const ListValue* args);
+ void HandleRequestWebRtcLogs(const base::ListValue* args);
// Sends the recently uploaded logs list JS.
void UpdateUI();
@@ -116,7 +116,8 @@ void WebRtcLogsDOMHandler::RegisterMessages() {
base::Unretained(this)));
}
-void WebRtcLogsDOMHandler::HandleRequestWebRtcLogs(const ListValue* args) {
+void WebRtcLogsDOMHandler::HandleRequestWebRtcLogs(
+ const base::ListValue* args) {
if (list_available_)
UpdateUI();
else
@@ -133,10 +134,10 @@ void WebRtcLogsDOMHandler::UpdateUI() {
std::vector<WebRtcLogUploadList::UploadInfo> uploads;
upload_list_->GetUploads(50, &uploads);
- ListValue upload_list;
+ base::ListValue upload_list;
for (std::vector<WebRtcLogUploadList::UploadInfo>::iterator i =
uploads.begin(); i != uploads.end(); ++i) {
- DictionaryValue* upload = new DictionaryValue();
+ base::DictionaryValue* upload = new base::DictionaryValue();
upload->SetString("id", i->id);
upload->SetString("time", base::TimeFormatFriendlyDateAndTime(i->time));
upload_list.Append(upload);
diff --git a/chrome/browser/ui/webui/memory_internals/memory_internals_proxy.cc b/chrome/browser/ui/webui/memory_internals/memory_internals_proxy.cc
index 4c465ee..2c49eba 100644
--- a/chrome/browser/ui/webui/memory_internals/memory_internals_proxy.cc
+++ b/chrome/browser/ui/webui/memory_internals/memory_internals_proxy.cc
@@ -236,13 +236,13 @@ void MemoryInternalsProxy::RequestRendererDetails() {
}
void MemoryInternalsProxy::OnProcessAvailable(const ProcessData& browser) {
- base::ListValue* process_info = new ListValue();
- base::ListValue* extension_info = new ListValue();
+ base::ListValue* process_info = new base::ListValue();
+ base::ListValue* extension_info = new base::ListValue();
information_->Set("processes", process_info);
information_->Set("extensions", extension_info);
for (PMIIterator iter = browser.processes.begin();
iter != browser.processes.end(); ++iter) {
- base::DictionaryValue* process = new DictionaryValue();
+ base::DictionaryValue* process = new base::DictionaryValue();
if (iter->renderer_type == ProcessMemoryInformation::RENDERER_EXTENSION)
extension_info->Append(process);
else
@@ -255,7 +255,7 @@ void MemoryInternalsProxy::OnProcessAvailable(const ProcessData& browser) {
iter->process_type, iter->renderer_type));
process->SetInteger("memory_private", iter->working_set.priv);
- base::ListValue* titles = new ListValue();
+ base::ListValue* titles = new base::ListValue();
process->Set("titles", titles);
for (size_t i = 0; i < iter->titles.size(); ++i)
titles->AppendString(iter->titles[i]);
diff --git a/chrome/browser/ui/webui/metrics_handler.cc b/chrome/browser/ui/webui/metrics_handler.cc
index af5402c..fc99e24 100644
--- a/chrome/browser/ui/webui/metrics_handler.cc
+++ b/chrome/browser/ui/webui/metrics_handler.cc
@@ -43,12 +43,12 @@ void MetricsHandler::RegisterMessages() {
base::Bind(&MetricsHandler::HandleLogMouseover, base::Unretained(this)));
}
-void MetricsHandler::HandleRecordAction(const ListValue* args) {
+void MetricsHandler::HandleRecordAction(const base::ListValue* args) {
std::string string_action = UTF16ToUTF8(ExtractStringValue(args));
content::RecordComputedAction(string_action);
}
-void MetricsHandler::HandleRecordInHistogram(const ListValue* args) {
+void MetricsHandler::HandleRecordInHistogram(const base::ListValue* args) {
std::string histogram_name;
double value;
double boundary_value;
@@ -82,7 +82,7 @@ void MetricsHandler::HandleRecordInHistogram(const ListValue* args) {
counter->Add(int_value);
}
-void MetricsHandler::HandleLogEventTime(const ListValue* args) {
+void MetricsHandler::HandleLogEventTime(const base::ListValue* args) {
std::string event_name = UTF16ToUTF8(ExtractStringValue(args));
WebContents* tab = web_ui()->GetWebContents();
@@ -115,7 +115,7 @@ void MetricsHandler::HandleLogEventTime(const ListValue* args) {
content::Details<MetricEventDurationDetails>(&details));
}
-void MetricsHandler::HandleLogMouseover(const ListValue* args) {
+void MetricsHandler::HandleLogMouseover(const base::ListValue* args) {
NTPUserDataLogger::GetOrCreateFromWebContents(
web_ui()->GetWebContents())->LogEvent(NTP_MOUSEOVER);
}
diff --git a/chrome/browser/ui/webui/nacl_ui.cc b/chrome/browser/ui/webui/nacl_ui.cc
index 7408325..9d8668c 100644
--- a/chrome/browser/ui/webui/nacl_ui.cc
+++ b/chrome/browser/ui/webui/nacl_ui.cc
@@ -81,7 +81,7 @@ class NaClDomHandler : public WebUIMessageHandler {
private:
// Callback for the "requestNaClInfo" message.
- void HandleRequestNaClInfo(const ListValue* args);
+ void HandleRequestNaClInfo(const base::ListValue* args);
// Callback for the NaCl plugin information.
void OnGotPlugins(const std::vector<content::WebPluginInfo>& plugins);
@@ -96,23 +96,23 @@ class NaClDomHandler : public WebUIMessageHandler {
// Helper for MaybeRespondToPage -- called after enough information
// is gathered.
- void PopulatePageInformation(DictionaryValue* naclInfo);
+ void PopulatePageInformation(base::DictionaryValue* naclInfo);
// Returns whether the specified plugin is enabled.
bool isPluginEnabled(size_t plugin_index);
// Adds information regarding the operating system and chrome version to list.
- void AddOperatingSystemInfo(ListValue* list);
+ void AddOperatingSystemInfo(base::ListValue* list);
// Adds the list of plugins for NaCl to list.
- void AddPluginList(ListValue* list);
+ void AddPluginList(base::ListValue* list);
// Adds the information relevant to PNaCl (e.g., enablement, paths, version)
// to the list.
- void AddPnaclInfo(ListValue* list);
+ void AddPnaclInfo(base::ListValue* list);
// Adds the information relevant to NaCl to list.
- void AddNaClInfo(ListValue* list);
+ void AddNaClInfo(base::ListValue* list);
// Whether the page has requested data.
bool page_has_requested_data_;
@@ -154,17 +154,17 @@ void NaClDomHandler::RegisterMessages() {
// Helper functions for collecting a list of key-value pairs that will
// be displayed.
-void AddPair(ListValue* list,
+void AddPair(base::ListValue* list,
const base::string16& key,
const base::string16& value) {
- DictionaryValue* results = new DictionaryValue();
+ base::DictionaryValue* results = new base::DictionaryValue();
results->SetString("key", key);
results->SetString("value", value);
list->Append(results);
}
// Generate an empty data-pair which acts as a line break.
-void AddLineBreak(ListValue* list) {
+void AddLineBreak(base::ListValue* list) {
AddPair(list, ASCIIToUTF16(""), ASCIIToUTF16(""));
}
@@ -178,7 +178,7 @@ bool NaClDomHandler::isPluginEnabled(size_t plugin_index) {
plugin_prefs->IsPluginEnabled(info_array[plugin_index]));
}
-void NaClDomHandler::AddOperatingSystemInfo(ListValue* list) {
+void NaClDomHandler::AddOperatingSystemInfo(base::ListValue* list) {
// Obtain the Chrome version info.
chrome::VersionInfo version_info;
AddPair(list,
@@ -214,7 +214,7 @@ void NaClDomHandler::AddOperatingSystemInfo(ListValue* list) {
AddLineBreak(list);
}
-void NaClDomHandler::AddPluginList(ListValue* list) {
+void NaClDomHandler::AddPluginList(base::ListValue* list) {
// Obtain the version of the NaCl plugin.
std::vector<content::WebPluginInfo> info_array;
PluginService::GetInstance()->GetPluginInfoArray(
@@ -247,7 +247,7 @@ void NaClDomHandler::AddPluginList(ListValue* list) {
AddLineBreak(list);
}
-void NaClDomHandler::AddPnaclInfo(ListValue* list) {
+void NaClDomHandler::AddPnaclInfo(base::ListValue* list) {
// Display whether PNaCl is enabled.
base::string16 pnacl_enabled_string = ASCIIToUTF16("Enabled");
if (!isPluginEnabled(0)) {
@@ -278,7 +278,7 @@ void NaClDomHandler::AddPnaclInfo(ListValue* list) {
AddLineBreak(list);
}
-void NaClDomHandler::AddNaClInfo(ListValue* list) {
+void NaClDomHandler::AddNaClInfo(base::ListValue* list) {
base::string16 nacl_enabled_string = ASCIIToUTF16("Disabled");
if (isPluginEnabled(0) &&
CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableNaCl)) {
@@ -290,7 +290,7 @@ void NaClDomHandler::AddNaClInfo(ListValue* list) {
AddLineBreak(list);
}
-void NaClDomHandler::HandleRequestNaClInfo(const ListValue* args) {
+void NaClDomHandler::HandleRequestNaClInfo(const base::ListValue* args) {
page_has_requested_data_ = true;
// Force re-validation of PNaCl's path in the next call to
// MaybeRespondToPage(), in case PNaCl went from not-installed
@@ -305,10 +305,10 @@ void NaClDomHandler::OnGotPlugins(
MaybeRespondToPage();
}
-void NaClDomHandler::PopulatePageInformation(DictionaryValue* naclInfo) {
+void NaClDomHandler::PopulatePageInformation(base::DictionaryValue* naclInfo) {
DCHECK(pnacl_path_validated_);
// Store Key-Value pairs of about-information.
- scoped_ptr<ListValue> list(new ListValue());
+ scoped_ptr<base::ListValue> list(new base::ListValue());
// Display the operating system and chrome version information.
AddOperatingSystemInfo(list.get());
// Display the list of plugins serving NaCl.
@@ -372,7 +372,7 @@ void NaClDomHandler::MaybeRespondToPage() {
return;
}
- DictionaryValue naclInfo;
+ base::DictionaryValue naclInfo;
PopulatePageInformation(&naclInfo);
web_ui()->CallJavascriptFunction("nacl.returnNaClInfo", naclInfo);
}
diff --git a/chrome/browser/ui/webui/net_export_ui.cc b/chrome/browser/ui/webui/net_export_ui.cc
index 865492c..391fbeb 100644
--- a/chrome/browser/ui/webui/net_export_ui.cc
+++ b/chrome/browser/ui/webui/net_export_ui.cc
@@ -59,10 +59,10 @@ class NetExportMessageHandler
virtual void RegisterMessages() OVERRIDE;
// Messages.
- void OnGetExportNetLogInfo(const ListValue* list);
- void OnStartNetLog(const ListValue* list);
- void OnStopNetLog(const ListValue* list);
- void OnSendNetLog(const ListValue* list);
+ void OnGetExportNetLogInfo(const base::ListValue* list);
+ void OnStartNetLog(const base::ListValue* list);
+ void OnStopNetLog(const base::ListValue* list);
+ void OnSendNetLog(const base::ListValue* list);
private:
// Calls NetLogTempFile's ProcessCommand with DO_START and DO_STOP commands.
@@ -84,7 +84,7 @@ class NetExportMessageHandler
// Call NetExportView.onExportNetLogInfoChanged JavsScript function in the
// renderer, passing in |arg|. Takes ownership of |arg|.
- void OnExportNetLogInfoChanged(Value* arg);
+ void OnExportNetLogInfoChanged(base::Value* arg);
// Cache of g_browser_process->net_log()->net_log_temp_file().
NetLogTempFile* net_log_temp_file_;
@@ -130,7 +130,8 @@ void NetExportMessageHandler::RegisterMessages() {
base::Unretained(this)));
}
-void NetExportMessageHandler::OnGetExportNetLogInfo(const ListValue* list) {
+void NetExportMessageHandler::OnGetExportNetLogInfo(
+ const base::ListValue* list) {
BrowserThread::PostTask(
BrowserThread::FILE_USER_BLOCKING,
FROM_HERE,
@@ -139,19 +140,19 @@ void NetExportMessageHandler::OnGetExportNetLogInfo(const ListValue* list) {
net_log_temp_file_));
}
-void NetExportMessageHandler::OnStartNetLog(const ListValue* list) {
+void NetExportMessageHandler::OnStartNetLog(const base::ListValue* list) {
ProcessNetLogCommand(weak_ptr_factory_.GetWeakPtr(),
net_log_temp_file_,
NetLogTempFile::DO_START);
}
-void NetExportMessageHandler::OnStopNetLog(const ListValue* list) {
+void NetExportMessageHandler::OnStopNetLog(const base::ListValue* list) {
ProcessNetLogCommand(weak_ptr_factory_.GetWeakPtr(),
net_log_temp_file_,
NetLogTempFile::DO_STOP);
}
-void NetExportMessageHandler::OnSendNetLog(const ListValue* list) {
+void NetExportMessageHandler::OnSendNetLog(const base::ListValue* list) {
content::BrowserThread::PostTaskAndReplyWithResult(
content::BrowserThread::FILE_USER_BLOCKING,
FROM_HERE,
@@ -195,7 +196,7 @@ void NetExportMessageHandler::SendExportNetLogInfo(
base::WeakPtr<NetExportMessageHandler> net_export_message_handler,
NetLogTempFile* net_log_temp_file) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING));
- Value* value = net_log_temp_file->GetState();
+ base::Value* value = net_log_temp_file->GetState();
if (!BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&NetExportMessageHandler::OnExportNetLogInfoChanged,
@@ -225,8 +226,8 @@ void NetExportMessageHandler::SendEmail(const base::FilePath& file_to_send) {
#endif
}
-void NetExportMessageHandler::OnExportNetLogInfoChanged(Value* arg) {
- scoped_ptr<Value> value(arg);
+void NetExportMessageHandler::OnExportNetLogInfoChanged(base::Value* arg) {
+ scoped_ptr<base::Value> value(arg);
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
web_ui()->CallJavascriptFunction(
"NetExportView.getInstance().onExportNetLogInfoChanged", *arg);
diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
index c1048d9..f8de745 100644
--- a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
+++ b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
@@ -150,8 +150,8 @@ bool Base64StringToHashes(const std::string& hashes_str,
// Returns a Value representing the state of a pre-existing URLRequest when
// net-internals was opened.
-Value* GetRequestStateAsValue(const net::URLRequest* request,
- net::NetLog::LogLevel log_level) {
+base::Value* GetRequestStateAsValue(const net::URLRequest* request,
+ net::NetLog::LogLevel log_level) {
return request->GetStateAsValue();
}
@@ -183,8 +183,8 @@ net::HttpNetworkSession* GetHttpNetworkSession(
return context->http_transaction_factory()->GetSession();
}
-Value* ExperimentToValue(const ConnectionTester::Experiment& experiment) {
- DictionaryValue* dict = new DictionaryValue();
+base::Value* ExperimentToValue(const ConnectionTester::Experiment& experiment) {
+ base::DictionaryValue* dict = new base::DictionaryValue();
if (experiment.url.is_valid())
dict->SetString("url", experiment.url.spec());
@@ -371,22 +371,22 @@ class NetInternalsMessageHandler
// Calls g_browser.receive in the renderer, passing in |command| and |arg|.
// Takes ownership of |arg|. If the renderer is displaying a log file, the
// message will be ignored.
- void SendJavascriptCommand(const std::string& command, Value* arg);
+ void SendJavascriptCommand(const std::string& command, base::Value* arg);
// Javascript message handlers.
- void OnRendererReady(const ListValue* list);
- void OnClearBrowserCache(const ListValue* list);
- void OnGetPrerenderInfo(const ListValue* list);
- void OnGetHistoricNetworkStats(const ListValue* list);
- void OnGetExtensionInfo(const ListValue* list);
+ void OnRendererReady(const base::ListValue* list);
+ void OnClearBrowserCache(const base::ListValue* list);
+ void OnGetPrerenderInfo(const base::ListValue* list);
+ void OnGetHistoricNetworkStats(const base::ListValue* list);
+ void OnGetExtensionInfo(const base::ListValue* list);
#if defined(OS_CHROMEOS)
- void OnRefreshSystemLogs(const ListValue* list);
- void OnGetSystemLog(const ListValue* list);
- void OnImportONCFile(const ListValue* list);
- void OnStoreDebugLogs(const ListValue* list);
+ void OnRefreshSystemLogs(const base::ListValue* list);
+ void OnGetSystemLog(const base::ListValue* list);
+ void OnImportONCFile(const base::ListValue* list);
+ void OnStoreDebugLogs(const base::ListValue* list);
void OnStoreDebugLogsCompleted(const base::FilePath& log_path,
bool succeeded);
- void OnSetNetworkDebugMode(const ListValue* list);
+ void OnSetNetworkDebugMode(const base::ListValue* list);
void OnSetNetworkDebugModeCompleted(const std::string& subsystem,
bool succeeded);
#endif
@@ -418,7 +418,7 @@ class NetInternalsMessageHandler
// Request data is specified by args:
// $1 : key of the log we are interested in.
// $2 : string used to identify request.
- void RequestSystemLog(const ListValue* args);
+ void RequestSystemLog(const base::ListValue* args);
// Requests logs from libcros, but only if we don't have a copy.
void LoadSystemLogs();
// Processes callback from libcros containing system logs. Postponed
@@ -475,7 +475,7 @@ class NetInternalsMessageHandler::IOThreadImpl
public ConnectionTester::Delegate {
public:
// Type for methods that can be used as MessageHandler callbacks.
- typedef void (IOThreadImpl::*MessageHandler)(const ListValue*);
+ typedef void (IOThreadImpl::*MessageHandler)(const base::ListValue*);
// Creates a proxy for |handler| that will live on the IO thread.
// |handler| is a weak pointer, since it is possible for the
@@ -494,7 +494,7 @@ class NetInternalsMessageHandler::IOThreadImpl
// Helper method to enable a callback that will be executed on the IO thread.
static void CallbackHelper(MessageHandler method,
scoped_refptr<IOThreadImpl> io_thread,
- const ListValue* list);
+ const base::ListValue* list);
// Called once the WebUI has been deleted (i.e. renderer went away), on the
// IO thread.
@@ -508,33 +508,33 @@ class NetInternalsMessageHandler::IOThreadImpl
// Javascript message handlers:
//--------------------------------
- void OnRendererReady(const ListValue* list);
-
- void OnGetProxySettings(const ListValue* list);
- void OnReloadProxySettings(const ListValue* list);
- void OnGetBadProxies(const ListValue* list);
- void OnClearBadProxies(const ListValue* list);
- void OnGetHostResolverInfo(const ListValue* list);
- void OnClearHostResolverCache(const ListValue* list);
- void OnEnableIPv6(const ListValue* list);
- void OnStartConnectionTests(const ListValue* list);
- void OnHSTSQuery(const ListValue* list);
- void OnHSTSAdd(const ListValue* list);
- void OnHSTSDelete(const ListValue* list);
- void OnGetHttpCacheInfo(const ListValue* list);
- void OnGetSocketPoolInfo(const ListValue* list);
- void OnGetSessionNetworkStats(const ListValue* list);
- void OnCloseIdleSockets(const ListValue* list);
- void OnFlushSocketPools(const ListValue* list);
- void OnGetSpdySessionInfo(const ListValue* list);
- void OnGetSpdyStatus(const ListValue* list);
- void OnGetSpdyAlternateProtocolMappings(const ListValue* list);
- void OnGetQuicInfo(const ListValue* list);
+ void OnRendererReady(const base::ListValue* list);
+
+ void OnGetProxySettings(const base::ListValue* list);
+ void OnReloadProxySettings(const base::ListValue* list);
+ void OnGetBadProxies(const base::ListValue* list);
+ void OnClearBadProxies(const base::ListValue* list);
+ void OnGetHostResolverInfo(const base::ListValue* list);
+ void OnClearHostResolverCache(const base::ListValue* list);
+ void OnEnableIPv6(const base::ListValue* list);
+ void OnStartConnectionTests(const base::ListValue* list);
+ void OnHSTSQuery(const base::ListValue* list);
+ void OnHSTSAdd(const base::ListValue* list);
+ void OnHSTSDelete(const base::ListValue* list);
+ void OnGetHttpCacheInfo(const base::ListValue* list);
+ void OnGetSocketPoolInfo(const base::ListValue* list);
+ void OnGetSessionNetworkStats(const base::ListValue* list);
+ void OnCloseIdleSockets(const base::ListValue* list);
+ void OnFlushSocketPools(const base::ListValue* list);
+ void OnGetSpdySessionInfo(const base::ListValue* list);
+ void OnGetSpdyStatus(const base::ListValue* list);
+ void OnGetSpdyAlternateProtocolMappings(const base::ListValue* list);
+ void OnGetQuicInfo(const base::ListValue* list);
#if defined(OS_WIN)
- void OnGetServiceProviders(const ListValue* list);
+ void OnGetServiceProviders(const base::ListValue* list);
#endif
- void OnGetHttpPipeliningStatus(const ListValue* list);
- void OnSetLogLevel(const ListValue* list);
+ void OnGetHttpPipeliningStatus(const base::ListValue* list);
+ void OnSetLogLevel(const base::ListValue* list);
// ChromeNetLog::ThreadSafeObserver implementation:
virtual void OnAddEntry(const net::NetLog::Entry& entry) OVERRIDE;
@@ -552,7 +552,7 @@ class NetInternalsMessageHandler::IOThreadImpl
// and |arg|. Takes ownership of |arg|. If the renderer is displaying a log
// file, the message will be ignored. Note that this can be called from any
// thread.
- void SendJavascriptCommand(const std::string& command, Value* arg);
+ void SendJavascriptCommand(const std::string& command, base::Value* arg);
private:
friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>;
@@ -566,7 +566,7 @@ class NetInternalsMessageHandler::IOThreadImpl
// Adds |entry| to the queue of pending log entries to be sent to the page via
// Javascript. Must be called on the IO Thread. Also creates a delayed task
// that will call PostPendingEntries, if there isn't one already.
- void AddEntryToQueue(Value* entry);
+ void AddEntryToQueue(base::Value* entry);
// Sends all pending entries to the page via Javascript, and clears the list
// of pending entries. Sending multiple entries at once results in a
@@ -605,7 +605,7 @@ class NetInternalsMessageHandler::IOThreadImpl
// Log entries that have yet to be passed along to Javascript page. Non-NULL
// when and only when there is a pending delayed task to call
// PostPendingEntries. Read and written to exclusively on the IO Thread.
- scoped_ptr<ListValue> pending_entries_;
+ scoped_ptr<base::ListValue> pending_entries_;
// Used for getting current status of URLRequests when net-internals is
// opened. |main_context_getter_| is automatically added on construction.
@@ -795,9 +795,9 @@ void NetInternalsMessageHandler::RegisterMessages() {
void NetInternalsMessageHandler::SendJavascriptCommand(
const std::string& command,
- Value* arg) {
- scoped_ptr<Value> command_value(new StringValue(command));
- scoped_ptr<Value> value(arg);
+ base::Value* arg) {
+ scoped_ptr<base::Value> command_value(new base::StringValue(command));
+ scoped_ptr<base::Value> value(arg);
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (value.get()) {
web_ui()->CallJavascriptFunction("g_browser.receive",
@@ -809,11 +809,12 @@ void NetInternalsMessageHandler::SendJavascriptCommand(
}
}
-void NetInternalsMessageHandler::OnRendererReady(const ListValue* list) {
+void NetInternalsMessageHandler::OnRendererReady(const base::ListValue* list) {
IOThreadImpl::CallbackHelper(&IOThreadImpl::OnRendererReady, proxy_, list);
}
-void NetInternalsMessageHandler::OnClearBrowserCache(const ListValue* list) {
+void NetInternalsMessageHandler::OnClearBrowserCache(
+ const base::ListValue* list) {
BrowsingDataRemover* remover = BrowsingDataRemover::CreateForUnboundedRange(
Profile::FromWebUI(web_ui()));
remover->Remove(BrowsingDataRemover::REMOVE_CACHE,
@@ -821,13 +822,14 @@ void NetInternalsMessageHandler::OnClearBrowserCache(const ListValue* list) {
// BrowsingDataRemover deletes itself.
}
-void NetInternalsMessageHandler::OnGetPrerenderInfo(const ListValue* list) {
+void NetInternalsMessageHandler::OnGetPrerenderInfo(
+ const base::ListValue* list) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DictionaryValue* value = NULL;
+ base::DictionaryValue* value = NULL;
prerender::PrerenderManager* prerender_manager = prerender_manager_.get();
if (!prerender_manager) {
- value = new DictionaryValue();
+ value = new base::DictionaryValue();
value->SetBoolean("enabled", false);
value->SetBoolean("omnibox_enabled", false);
} else {
@@ -837,16 +839,17 @@ void NetInternalsMessageHandler::OnGetPrerenderInfo(const ListValue* list) {
}
void NetInternalsMessageHandler::OnGetHistoricNetworkStats(
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- Value* historic_network_info =
+ base::Value* historic_network_info =
ChromeNetworkDelegate::HistoricNetworkStatsInfoToValue();
SendJavascriptCommand("receivedHistoricNetworkStats", historic_network_info);
}
-void NetInternalsMessageHandler::OnGetExtensionInfo(const ListValue* list) {
+void NetInternalsMessageHandler::OnGetExtensionInfo(
+ const base::ListValue* list) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- ListValue* extension_list = new ListValue();
+ base::ListValue* extension_list = new base::ListValue();
Profile* profile = Profile::FromWebUI(web_ui());
extensions::ExtensionSystem* extension_system =
extensions::ExtensionSystem::Get(profile);
@@ -857,7 +860,7 @@ void NetInternalsMessageHandler::OnGetExtensionInfo(const ListValue* list) {
extension_service->GenerateInstalledExtensionsSet());
for (extensions::ExtensionSet::const_iterator it = extensions->begin();
it != extensions->end(); ++it) {
- DictionaryValue* extension_info = new DictionaryValue();
+ base::DictionaryValue* extension_info = new base::DictionaryValue();
bool enabled = extension_service->IsExtensionEnabled((*it)->id());
extensions::GetExtensionBasicInfo(it->get(), enabled, extension_info);
extension_list->Append(extension_info);
@@ -899,7 +902,7 @@ void NetInternalsMessageHandler::SystemLogsGetter::DeleteSystemLogs() {
}
void NetInternalsMessageHandler::SystemLogsGetter::RequestSystemLog(
- const ListValue* args) {
+ const base::ListValue* args) {
if (!logs_requested_) {
DCHECK(!logs_received_);
LoadSystemLogs();
@@ -944,7 +947,7 @@ void NetInternalsMessageHandler::SystemLogsGetter::OnSystemLogsLoaded(
void NetInternalsMessageHandler::SystemLogsGetter::SendLogs(
const SystemLogRequest& request) {
- DictionaryValue* result = new DictionaryValue();
+ base::DictionaryValue* result = new base::DictionaryValue();
chromeos::system::LogDictionaryType::iterator log_it =
logs_->find(request.log_key);
if (log_it != logs_->end()) {
@@ -993,13 +996,14 @@ void NetInternalsMessageHandler::IOThreadImpl::AddRequestContextGetter(
void NetInternalsMessageHandler::IOThreadImpl::CallbackHelper(
MessageHandler method,
scoped_refptr<IOThreadImpl> io_thread,
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// We need to make a copy of the value in order to pass it over to the IO
// thread. |list_copy| will be deleted when the task is destroyed. The called
// |method| cannot take ownership of |list_copy|.
- ListValue* list_copy = (list && list->GetSize()) ? list->DeepCopy() : NULL;
+ base::ListValue* list_copy =
+ (list && list->GetSize()) ? list->DeepCopy() : NULL;
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
@@ -1022,7 +1026,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnWebUIDeleted() {
}
void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady(
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
// If we have any pending entries, go ahead and get rid of them, so they won't
@@ -1043,11 +1047,11 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady(
}
void NetInternalsMessageHandler::IOThreadImpl::OnGetProxySettings(
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(!list);
net::ProxyService* proxy_service = GetMainContext()->proxy_service();
- DictionaryValue* dict = new DictionaryValue();
+ base::DictionaryValue* dict = new base::DictionaryValue();
if (proxy_service->fetched_config().is_valid())
dict->Set("original", proxy_service->fetched_config().ToValue());
if (proxy_service->config().is_valid())
@@ -1057,7 +1061,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetProxySettings(
}
void NetInternalsMessageHandler::IOThreadImpl::OnReloadProxySettings(
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(!list);
GetMainContext()->proxy_service()->ForceReloadProxyConfig();
@@ -1066,20 +1070,20 @@ void NetInternalsMessageHandler::IOThreadImpl::OnReloadProxySettings(
}
void NetInternalsMessageHandler::IOThreadImpl::OnGetBadProxies(
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(!list);
const net::ProxyRetryInfoMap& bad_proxies_map =
GetMainContext()->proxy_service()->proxy_retry_info();
- ListValue* dict_list = new ListValue();
+ base::ListValue* dict_list = new base::ListValue();
for (net::ProxyRetryInfoMap::const_iterator it = bad_proxies_map.begin();
it != bad_proxies_map.end(); ++it) {
const std::string& proxy_uri = it->first;
const net::ProxyRetryInfo& retry_info = it->second;
- DictionaryValue* dict = new DictionaryValue();
+ base::DictionaryValue* dict = new base::DictionaryValue();
dict->SetString("proxy_uri", proxy_uri);
dict->SetString("bad_until",
net::NetLog::TickCountToString(retry_info.bad_until));
@@ -1091,7 +1095,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetBadProxies(
}
void NetInternalsMessageHandler::IOThreadImpl::OnClearBadProxies(
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(!list);
GetMainContext()->proxy_service()->ClearBadProxiesCache();
@@ -1100,7 +1104,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnClearBadProxies(
}
void NetInternalsMessageHandler::IOThreadImpl::OnGetHostResolverInfo(
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(!list);
net::URLRequestContext* context = GetMainContext();
net::HostCache* cache = GetHostResolverCache(context);
@@ -1110,7 +1114,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetHostResolverInfo(
return;
}
- DictionaryValue* dict = new DictionaryValue();
+ base::DictionaryValue* dict = new base::DictionaryValue();
base::Value* dns_config = context->host_resolver()->GetDnsConfigAsValue();
if (dns_config)
@@ -1120,20 +1124,20 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetHostResolverInfo(
"default_address_family",
static_cast<int>(context->host_resolver()->GetDefaultAddressFamily()));
- DictionaryValue* cache_info_dict = new DictionaryValue();
+ base::DictionaryValue* cache_info_dict = new base::DictionaryValue();
cache_info_dict->SetInteger(
"capacity",
static_cast<int>(cache->max_entries()));
- ListValue* entry_list = new ListValue();
+ base::ListValue* entry_list = new base::ListValue();
net::HostCache::EntryMap::Iterator it(cache->entries());
for (; it.HasNext(); it.Advance()) {
const net::HostCache::Key& key = it.key();
const net::HostCache::Entry& entry = it.value();
- DictionaryValue* entry_dict = new DictionaryValue();
+ base::DictionaryValue* entry_dict = new base::DictionaryValue();
entry_dict->SetString("hostname", key.hostname);
entry_dict->SetInteger("address_family",
@@ -1145,7 +1149,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetHostResolverInfo(
entry_dict->SetInteger("error", entry.error);
} else {
// Append all of the resolved addresses.
- ListValue* address_list = new ListValue();
+ base::ListValue* address_list = new base::ListValue();
for (size_t i = 0; i < entry.addrlist.size(); ++i) {
address_list->AppendString(entry.addrlist[i].ToStringWithoutPort());
}
@@ -1162,7 +1166,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetHostResolverInfo(
}
void NetInternalsMessageHandler::IOThreadImpl::OnClearHostResolverCache(
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(!list);
net::HostCache* cache = GetHostResolverCache(GetMainContext());
@@ -1174,7 +1178,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnClearHostResolverCache(
}
void NetInternalsMessageHandler::IOThreadImpl::OnEnableIPv6(
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(!list);
net::HostResolver* host_resolver = GetMainContext()->host_resolver();
@@ -1185,7 +1189,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnEnableIPv6(
}
void NetInternalsMessageHandler::IOThreadImpl::OnStartConnectionTests(
- const ListValue* list) {
+ const base::ListValue* list) {
// |value| should be: [<URL to test>].
base::string16 url_str;
CHECK(list->GetString(0, &url_str));
@@ -1202,11 +1206,11 @@ void NetInternalsMessageHandler::IOThreadImpl::OnStartConnectionTests(
}
void NetInternalsMessageHandler::IOThreadImpl::OnHSTSQuery(
- const ListValue* list) {
+ const base::ListValue* list) {
// |list| should be: [<domain to query>].
std::string domain;
CHECK(list->GetString(0, &domain));
- DictionaryValue* result = new DictionaryValue();
+ base::DictionaryValue* result = new base::DictionaryValue();
if (!IsStringASCII(domain)) {
result->SetString("error", "non-ASCII domain name");
@@ -1244,7 +1248,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnHSTSQuery(
}
void NetInternalsMessageHandler::IOThreadImpl::OnHSTSAdd(
- const ListValue* list) {
+ const base::ListValue* list) {
// |list| should be: [<domain to query>, <STS include subdomains>, <PKP
// include subdomains>, <key pins>].
std::string domain;
@@ -1279,7 +1283,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnHSTSAdd(
}
void NetInternalsMessageHandler::IOThreadImpl::OnHSTSDelete(
- const ListValue* list) {
+ const base::ListValue* list) {
// |list| should be: [<domain to query>].
std::string domain;
CHECK(list->GetString(0, &domain));
@@ -1296,10 +1300,10 @@ void NetInternalsMessageHandler::IOThreadImpl::OnHSTSDelete(
}
void NetInternalsMessageHandler::IOThreadImpl::OnGetHttpCacheInfo(
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(!list);
- DictionaryValue* info_dict = new DictionaryValue();
- DictionaryValue* stats_dict = new DictionaryValue();
+ base::DictionaryValue* info_dict = new base::DictionaryValue();
+ base::DictionaryValue* stats_dict = new base::DictionaryValue();
disk_cache::Backend* disk_cache = GetDiskCacheBackend(GetMainContext());
@@ -1319,12 +1323,12 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetHttpCacheInfo(
}
void NetInternalsMessageHandler::IOThreadImpl::OnGetSocketPoolInfo(
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(!list);
net::HttpNetworkSession* http_network_session =
GetHttpNetworkSession(GetMainContext());
- Value* socket_pool_info = NULL;
+ base::Value* socket_pool_info = NULL;
if (http_network_session)
socket_pool_info = http_network_session->SocketPoolInfoToValue();
@@ -1332,12 +1336,12 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetSocketPoolInfo(
}
void NetInternalsMessageHandler::IOThreadImpl::OnGetSessionNetworkStats(
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(!list);
net::HttpNetworkSession* http_network_session =
GetHttpNetworkSession(main_context_getter_->GetURLRequestContext());
- Value* network_info = NULL;
+ base::Value* network_info = NULL;
if (http_network_session) {
ChromeNetworkDelegate* net_delegate =
static_cast<ChromeNetworkDelegate*>(
@@ -1350,7 +1354,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetSessionNetworkStats(
}
void NetInternalsMessageHandler::IOThreadImpl::OnFlushSocketPools(
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(!list);
net::HttpNetworkSession* http_network_session =
GetHttpNetworkSession(GetMainContext());
@@ -1360,7 +1364,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnFlushSocketPools(
}
void NetInternalsMessageHandler::IOThreadImpl::OnCloseIdleSockets(
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(!list);
net::HttpNetworkSession* http_network_session =
GetHttpNetworkSession(GetMainContext());
@@ -1370,32 +1374,32 @@ void NetInternalsMessageHandler::IOThreadImpl::OnCloseIdleSockets(
}
void NetInternalsMessageHandler::IOThreadImpl::OnGetSpdySessionInfo(
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(!list);
net::HttpNetworkSession* http_network_session =
GetHttpNetworkSession(GetMainContext());
- Value* spdy_info = http_network_session ?
+ base::Value* spdy_info = http_network_session ?
http_network_session->SpdySessionPoolInfoToValue() : NULL;
SendJavascriptCommand("receivedSpdySessionInfo", spdy_info);
}
void NetInternalsMessageHandler::IOThreadImpl::OnGetSpdyStatus(
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(!list);
- DictionaryValue* status_dict = new DictionaryValue();
+ base::DictionaryValue* status_dict = new base::DictionaryValue();
status_dict->Set("spdy_enabled",
- Value::CreateBooleanValue(
+ base::Value::CreateBooleanValue(
net::HttpStreamFactory::spdy_enabled()));
status_dict->Set("use_alternate_protocols",
- Value::CreateBooleanValue(
+ base::Value::CreateBooleanValue(
net::HttpStreamFactory::use_alternate_protocols()));
status_dict->Set("force_spdy_over_ssl",
- Value::CreateBooleanValue(
+ base::Value::CreateBooleanValue(
net::HttpStreamFactory::force_spdy_over_ssl()));
status_dict->Set("force_spdy_always",
- Value::CreateBooleanValue(
+ base::Value::CreateBooleanValue(
net::HttpStreamFactory::force_spdy_always()));
// The next_protos may not be specified for certain configurations of SPDY.
@@ -1410,9 +1414,9 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetSpdyStatus(
void
NetInternalsMessageHandler::IOThreadImpl::OnGetSpdyAlternateProtocolMappings(
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(!list);
- ListValue* dict_list = new ListValue();
+ base::ListValue* dict_list = new base::ListValue();
const net::HttpServerProperties& http_server_properties =
*GetMainContext()->http_server_properties();
@@ -1422,7 +1426,7 @@ NetInternalsMessageHandler::IOThreadImpl::OnGetSpdyAlternateProtocolMappings(
for (net::AlternateProtocolMap::const_iterator it = map.begin();
it != map.end(); ++it) {
- DictionaryValue* dict = new DictionaryValue();
+ base::DictionaryValue* dict = new base::DictionaryValue();
dict->SetString("host_port_pair", it->first.ToString());
dict->SetString("alternate_protocol", it->second.ToString());
dict_list->Append(dict);
@@ -1432,28 +1436,28 @@ NetInternalsMessageHandler::IOThreadImpl::OnGetSpdyAlternateProtocolMappings(
}
void NetInternalsMessageHandler::IOThreadImpl::OnGetQuicInfo(
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(!list);
net::HttpNetworkSession* http_network_session =
GetHttpNetworkSession(GetMainContext());
- Value* quic_info = http_network_session ?
+ base::Value* quic_info = http_network_session ?
http_network_session->QuicInfoToValue() : NULL;
SendJavascriptCommand("receivedQuicInfo", quic_info);
}
#if defined(OS_WIN)
void NetInternalsMessageHandler::IOThreadImpl::OnGetServiceProviders(
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(!list);
- DictionaryValue* service_providers = new DictionaryValue();
+ base::DictionaryValue* service_providers = new base::DictionaryValue();
WinsockLayeredServiceProviderList layered_providers;
GetWinsockLayeredServiceProviders(&layered_providers);
- ListValue* layered_provider_list = new ListValue();
+ base::ListValue* layered_provider_list = new base::ListValue();
for (size_t i = 0; i < layered_providers.size(); ++i) {
- DictionaryValue* service_dict = new DictionaryValue();
+ base::DictionaryValue* service_dict = new base::DictionaryValue();
service_dict->SetString("name", layered_providers[i].name);
service_dict->SetInteger("version", layered_providers[i].version);
service_dict->SetInteger("chain_length", layered_providers[i].chain_length);
@@ -1468,9 +1472,9 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetServiceProviders(
WinsockNamespaceProviderList namespace_providers;
GetWinsockNamespaceProviders(&namespace_providers);
- ListValue* namespace_list = new ListValue;
+ base::ListValue* namespace_list = new base::ListValue;
for (size_t i = 0; i < namespace_providers.size(); ++i) {
- DictionaryValue* namespace_dict = new DictionaryValue();
+ base::DictionaryValue* namespace_dict = new base::DictionaryValue();
namespace_dict->SetString("name", namespace_providers[i].name);
namespace_dict->SetBoolean("active", namespace_providers[i].active);
namespace_dict->SetInteger("version", namespace_providers[i].version);
@@ -1485,19 +1489,22 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetServiceProviders(
#endif
#if defined(OS_CHROMEOS)
-void NetInternalsMessageHandler::OnRefreshSystemLogs(const ListValue* list) {
+void NetInternalsMessageHandler::OnRefreshSystemLogs(
+ const base::ListValue* list) {
DCHECK(!list);
DCHECK(syslogs_getter_.get());
syslogs_getter_->DeleteSystemLogs();
syslogs_getter_->LoadSystemLogs();
}
-void NetInternalsMessageHandler::OnGetSystemLog(const ListValue* list) {
+void NetInternalsMessageHandler::OnGetSystemLog(
+ const base::ListValue* list) {
DCHECK(syslogs_getter_.get());
syslogs_getter_->RequestSystemLog(list);
}
-void NetInternalsMessageHandler::OnImportONCFile(const ListValue* list) {
+void NetInternalsMessageHandler::OnImportONCFile(
+ const base::ListValue* list) {
std::string onc_blob;
std::string passcode;
if (list->GetSize() != 2 ||
@@ -1536,14 +1543,14 @@ void NetInternalsMessageHandler::OnImportONCFile(const ListValue* list) {
}
LOG_IF(ERROR, !error.empty()) << error;
- SendJavascriptCommand("receivedONCFileParse", new StringValue(error));
+ SendJavascriptCommand("receivedONCFileParse", new base::StringValue(error));
}
-void NetInternalsMessageHandler::OnStoreDebugLogs(const ListValue* list) {
+void NetInternalsMessageHandler::OnStoreDebugLogs(const base::ListValue* list) {
DCHECK(list);
SendJavascriptCommand("receivedStoreDebugLogs",
- new StringValue("Creating log file..."));
+ new base::StringValue("Creating log file..."));
const DownloadPrefs* const prefs =
DownloadPrefs::FromBrowserContext(Profile::FromWebUI(web_ui()));
StoreDebugLogs(prefs->DownloadPath(),
@@ -1558,10 +1565,12 @@ void NetInternalsMessageHandler::OnStoreDebugLogsCompleted(
status = "Created log file: " + log_path.BaseName().AsUTF8Unsafe();
else
status = "Failed to create log file";
- SendJavascriptCommand("receivedStoreDebugLogs", new StringValue(status));
+ SendJavascriptCommand("receivedStoreDebugLogs",
+ new base::StringValue(status));
}
-void NetInternalsMessageHandler::OnSetNetworkDebugMode(const ListValue* list) {
+void NetInternalsMessageHandler::OnSetNetworkDebugMode(
+ const base::ListValue* list) {
std::string subsystem;
if (list->GetSize() != 1 || !list->GetString(0, &subsystem))
NOTREACHED();
@@ -1582,20 +1591,21 @@ void NetInternalsMessageHandler::OnSetNetworkDebugModeCompleted(
status = "Debug mode is changed to " + subsystem;
else
status = "Failed to change debug mode to " + subsystem;
- SendJavascriptCommand("receivedSetNetworkDebugMode", new StringValue(status));
+ SendJavascriptCommand("receivedSetNetworkDebugMode",
+ new base::StringValue(status));
}
#endif // defined(OS_CHROMEOS)
void NetInternalsMessageHandler::IOThreadImpl::OnGetHttpPipeliningStatus(
- const ListValue* list) {
+ const base::ListValue* list) {
DCHECK(!list);
- DictionaryValue* status_dict = new DictionaryValue();
+ base::DictionaryValue* status_dict = new base::DictionaryValue();
- Value* pipelined_connection_info = NULL;
+ base::Value* pipelined_connection_info = NULL;
net::HttpNetworkSession* http_network_session =
GetHttpNetworkSession(GetMainContext());
if (http_network_session) {
- status_dict->Set("pipelining_enabled", Value::CreateBooleanValue(
+ status_dict->Set("pipelining_enabled", base::Value::CreateBooleanValue(
http_network_session->params().http_pipelining_enabled));
pipelined_connection_info =
@@ -1610,11 +1620,11 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetHttpPipeliningStatus(
const net::PipelineCapabilityMap pipeline_capability_map =
http_server_properties.GetPipelineCapabilityMap();
- ListValue* known_hosts_list = new ListValue();
+ base::ListValue* known_hosts_list = new base::ListValue();
net::PipelineCapabilityMap::const_iterator it;
for (it = pipeline_capability_map.begin();
it != pipeline_capability_map.end(); ++it) {
- DictionaryValue* host_dict = new DictionaryValue();
+ base::DictionaryValue* host_dict = new base::DictionaryValue();
host_dict->SetString("host", it->first.ToString());
std::string capability;
switch (it->second) {
@@ -1644,7 +1654,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetHttpPipeliningStatus(
}
void NetInternalsMessageHandler::IOThreadImpl::OnSetLogLevel(
- const ListValue* list) {
+ const base::ListValue* list) {
int log_level;
std::string log_level_string;
if (!list->GetString(0, &log_level_string) ||
@@ -1683,7 +1693,7 @@ void
NetInternalsMessageHandler::IOThreadImpl::OnCompletedConnectionTestExperiment(
const ConnectionTester::Experiment& experiment,
int result) {
- DictionaryValue* dict = new DictionaryValue();
+ base::DictionaryValue* dict = new base::DictionaryValue();
dict->Set("experiment", ExperimentToValue(experiment));
dict->SetInteger("result", result);
@@ -1703,7 +1713,7 @@ NetInternalsMessageHandler::IOThreadImpl::OnCompletedConnectionTestSuite() {
// Note that this can be called from ANY THREAD.
void NetInternalsMessageHandler::IOThreadImpl::SendJavascriptCommand(
const std::string& command,
- Value* arg) {
+ base::Value* arg) {
if (BrowserThread::CurrentlyOn(BrowserThread::UI)) {
if (handler_.get() && !was_webui_deleted_) {
// We check |handler_| in case it was deleted on the UI thread earlier
@@ -1723,10 +1733,11 @@ void NetInternalsMessageHandler::IOThreadImpl::SendJavascriptCommand(
}
}
-void NetInternalsMessageHandler::IOThreadImpl::AddEntryToQueue(Value* entry) {
+void NetInternalsMessageHandler::IOThreadImpl::AddEntryToQueue(
+ base::Value* entry) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
if (!pending_entries_.get()) {
- pending_entries_.reset(new ListValue());
+ pending_entries_.reset(new base::ListValue());
BrowserThread::PostDelayedTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&IOThreadImpl::PostPendingEntries, this),
@@ -1803,14 +1814,14 @@ void NetInternalsMessageHandler::IOThreadImpl::PrePopulateEventList() {
////////////////////////////////////////////////////////////////////////////////
// static
-Value* NetInternalsUI::GetConstants() {
- DictionaryValue* constants_dict = net::NetLogLogger::GetConstants();
+base::Value* NetInternalsUI::GetConstants() {
+ base::DictionaryValue* constants_dict = net::NetLogLogger::GetConstants();
DCHECK(constants_dict);
// Add a dictionary with the version of the client and its command line
// arguments.
{
- DictionaryValue* dict = new DictionaryValue();
+ base::DictionaryValue* dict = new base::DictionaryValue();
chrome::VersionInfo version_info;
diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc
index bbe53f0..0f0f893 100644
--- a/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc
@@ -160,7 +160,7 @@ class NetInternalsTest::MessageHandler : public content::WebUIMessageHandler {
// Creates a simple log with a NetLogLogger, and returns it to the
// Javascript callback.
- void GetNetLogLoggerLog(const ListValue* list_value);
+ void GetNetLogLoggerLog(const base::ListValue* list_value);
Browser* browser() { return net_internals_test_->browser(); }
@@ -212,22 +212,22 @@ void NetInternalsTest::MessageHandler::RegisterMessages() {
}
void NetInternalsTest::MessageHandler::RunJavascriptCallback(
- Value* value) {
+ base::Value* value) {
web_ui()->CallJavascriptFunction("NetInternalsTest.callback", *value);
}
void NetInternalsTest::MessageHandler::GetTestServerURL(
- const ListValue* list_value) {
+ const base::ListValue* list_value) {
ASSERT_TRUE(net_internals_test_->StartTestServer());
std::string path;
ASSERT_TRUE(list_value->GetString(0, &path));
GURL url = net_internals_test_->test_server()->GetURL(path);
- scoped_ptr<Value> url_value(Value::CreateStringValue(url.spec()));
+ scoped_ptr<base::Value> url_value(base::Value::CreateStringValue(url.spec()));
RunJavascriptCallback(url_value.get());
}
void NetInternalsTest::MessageHandler::AddCacheEntry(
- const ListValue* list_value) {
+ const base::ListValue* list_value) {
std::string hostname;
std::string ip_literal;
double net_error;
@@ -249,7 +249,7 @@ void NetInternalsTest::MessageHandler::AddCacheEntry(
}
void NetInternalsTest::MessageHandler::LoadPage(
- const ListValue* list_value) {
+ const base::ListValue* list_value) {
std::string url;
ASSERT_TRUE(list_value->GetString(0, &url));
LOG(WARNING) << "url: [" << url << "]";
@@ -261,7 +261,7 @@ void NetInternalsTest::MessageHandler::LoadPage(
}
void NetInternalsTest::MessageHandler::PrerenderPage(
- const ListValue* list_value) {
+ const base::ListValue* list_value) {
std::string prerender_url;
ASSERT_TRUE(list_value->GetString(0, &prerender_url));
GURL loader_url =
@@ -274,24 +274,24 @@ void NetInternalsTest::MessageHandler::PrerenderPage(
}
void NetInternalsTest::MessageHandler::NavigateToPrerender(
- const ListValue* list_value) {
+ const base::ListValue* list_value) {
content::RenderViewHost* host =
browser()->tab_strip_model()->GetWebContentsAt(1)->GetRenderViewHost();
host->ExecuteJavascriptInWebFrame(base::string16(), ASCIIToUTF16("Click()"));
}
void NetInternalsTest::MessageHandler::CreateIncognitoBrowser(
- const ListValue* list_value) {
+ const base::ListValue* list_value) {
ASSERT_FALSE(incognito_browser_);
incognito_browser_ = net_internals_test_->CreateIncognitoBrowser();
// Tell the test harness that creation is complete.
- StringValue command_value("onIncognitoBrowserCreatedForTest");
+ base::StringValue command_value("onIncognitoBrowserCreatedForTest");
web_ui()->CallJavascriptFunction("g_browser.receive", command_value);
}
void NetInternalsTest::MessageHandler::CloseIncognitoBrowser(
- const ListValue* list_value) {
+ const base::ListValue* list_value) {
ASSERT_TRUE(incognito_browser_);
incognito_browser_->tab_strip_model()->CloseAllTabs();
// Closing all a Browser's tabs will ultimately result in its destruction,
@@ -300,7 +300,7 @@ void NetInternalsTest::MessageHandler::CloseIncognitoBrowser(
}
void NetInternalsTest::MessageHandler::EnableHttpPipelining(
- const ListValue* list_value) {
+ const base::ListValue* list_value) {
bool enable;
ASSERT_TRUE(list_value->GetBoolean(0, &enable));
BrowserThread::PostTask(
@@ -311,7 +311,7 @@ void NetInternalsTest::MessageHandler::EnableHttpPipelining(
}
void NetInternalsTest::MessageHandler::AddDummyHttpPipelineFeedback(
- const ListValue* list_value) {
+ const base::ListValue* list_value) {
std::string hostname;
double port;
std::string raw_capability;
@@ -336,7 +336,7 @@ void NetInternalsTest::MessageHandler::AddDummyHttpPipelineFeedback(
}
void NetInternalsTest::MessageHandler::GetNetLogLoggerLog(
- const ListValue* list_value) {
+ const base::ListValue* list_value) {
base::ScopedTempDir temp_directory;
ASSERT_TRUE(temp_directory.CreateUniqueTempDir());
base::FilePath temp_file;
@@ -362,7 +362,8 @@ void NetInternalsTest::MessageHandler::GetNetLogLoggerLog(
ASSERT_TRUE(base::ReadFileToString(temp_file, &log_contents));
ASSERT_GT(log_contents.length(), 0u);
- scoped_ptr<Value> log_contents_value(new base::StringValue(log_contents));
+ scoped_ptr<base::Value> log_contents_value(
+ new base::StringValue(log_contents));
RunJavascriptCallback(log_contents_value.get());
}
diff --git a/chrome/browser/ui/webui/ntp/android/bookmarks_handler.cc b/chrome/browser/ui/webui/ntp/android/bookmarks_handler.cc
index 4884eb3..83fe291 100644
--- a/chrome/browser/ui/webui/ntp/android/bookmarks_handler.cc
+++ b/chrome/browser/ui/webui/ntp/android/bookmarks_handler.cc
@@ -142,7 +142,7 @@ void BookmarksHandler::RegisterMessages() {
base::Unretained(this)));
}
-void BookmarksHandler::HandleGetBookmarks(const ListValue* args) {
+void BookmarksHandler::HandleGetBookmarks(const base::ListValue* args) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
bookmark_data_requested_ = true;
@@ -156,7 +156,7 @@ void BookmarksHandler::HandleGetBookmarks(const ListValue* args) {
QueryInitialBookmarks();
}
-void BookmarksHandler::HandleDeleteBookmark(const ListValue* args) {
+void BookmarksHandler::HandleDeleteBookmark(const base::ListValue* args) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!AreModelsLoaded())
return;
@@ -183,7 +183,7 @@ void BookmarksHandler::HandleDeleteBookmark(const ListValue* args) {
bookmark_model_->Remove(parent_node, parent_node->GetIndexOf(node));
}
-void BookmarksHandler::HandleEditBookmark(const ListValue* args) {
+void BookmarksHandler::HandleEditBookmark(const base::ListValue* args) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!AreModelsLoaded())
return;
@@ -225,7 +225,7 @@ bool BookmarksHandler::AreModelsLoaded() const {
return partner_bookmarks_shim_ && partner_bookmarks_shim_->IsLoaded();
}
-void BookmarksHandler::NotifyModelChanged(const DictionaryValue& status) {
+void BookmarksHandler::NotifyModelChanged(const base::DictionaryValue& status) {
DCHECK(AreModelsLoaded());
if (bookmark_data_requested_ && !extensive_changes_)
@@ -243,13 +243,14 @@ std::string BookmarksHandler::GetBookmarkIdForNtp(const BookmarkNode* node) {
return prefix + Int64ToString(node->id());
}
-void BookmarksHandler::SetParentInBookmarksResult(const BookmarkNode* parent,
- DictionaryValue* result) {
+void BookmarksHandler::SetParentInBookmarksResult(
+ const BookmarkNode* parent,
+ base::DictionaryValue* result) {
result->SetString(kParentIdParam, GetBookmarkIdForNtp(parent));
}
void BookmarksHandler::PopulateBookmark(const BookmarkNode* node,
- ListValue* result) {
+ base::ListValue* result) {
if (!result)
return;
@@ -257,7 +258,7 @@ void BookmarksHandler::PopulateBookmark(const BookmarkNode* node,
if (!IsReachable(node))
return;
- DictionaryValue* filler_value = new DictionaryValue();
+ base::DictionaryValue* filler_value = new base::DictionaryValue();
filler_value->SetString("title", GetTitle(node));
filler_value->SetBoolean("editable", IsEditable(node));
if (node->is_url()) {
@@ -273,12 +274,12 @@ void BookmarksHandler::PopulateBookmark(const BookmarkNode* node,
void BookmarksHandler::PopulateBookmarksInFolder(
const BookmarkNode* folder,
- DictionaryValue* result) {
+ base::DictionaryValue* result) {
DCHECK(AreModelsLoaded());
if (!IsReachable(folder))
return;
- ListValue* bookmarks = new ListValue();
+ base::ListValue* bookmarks = new base::ListValue();
// If this is the Mobile bookmarks folder then add the "Managed bookmarks"
// folder first, so that it's the first entry.
@@ -300,11 +301,11 @@ void BookmarksHandler::PopulateBookmarksInFolder(
bookmarks);
}
- ListValue* folder_hierarchy = new ListValue();
+ base::ListValue* folder_hierarchy = new base::ListValue();
const BookmarkNode* parent = GetParentOf(folder);
while (parent != NULL) {
- DictionaryValue* hierarchy_entry = new DictionaryValue();
+ base::DictionaryValue* hierarchy_entry = new base::DictionaryValue();
if (IsRoot(parent))
hierarchy_entry->SetBoolean("root", true);
@@ -324,7 +325,7 @@ void BookmarksHandler::PopulateBookmarksInFolder(
void BookmarksHandler::QueryBookmarkFolder(const BookmarkNode* node) {
DCHECK(AreModelsLoaded());
if (node->is_folder() && IsReachable(node)) {
- DictionaryValue result;
+ base::DictionaryValue result;
PopulateBookmarksInFolder(node, &result);
SendResult(result);
} else {
@@ -336,12 +337,12 @@ void BookmarksHandler::QueryBookmarkFolder(const BookmarkNode* node) {
void BookmarksHandler::QueryInitialBookmarks() {
DCHECK(AreModelsLoaded());
- DictionaryValue result;
+ base::DictionaryValue result;
PopulateBookmarksInFolder(bookmark_model_->mobile_node(), &result);
SendResult(result);
}
-void BookmarksHandler::SendResult(const DictionaryValue& result) {
+void BookmarksHandler::SendResult(const base::DictionaryValue& result) {
web_ui()->CallJavascriptFunction("ntp.bookmarks", result);
}
@@ -386,7 +387,7 @@ void BookmarksHandler::BookmarkNodeRemoved(BookmarkModel* model,
if (!AreModelsLoaded())
return;
- DictionaryValue result;
+ base::DictionaryValue result;
SetParentInBookmarksResult(parent, &result);
result.SetString(kNodeIdParam, Int64ToString(node->id()));
NotifyModelChanged(result);
@@ -405,7 +406,7 @@ void BookmarksHandler::BookmarkNodeAdded(
if (!AreModelsLoaded())
return;
- DictionaryValue result;
+ base::DictionaryValue result;
SetParentInBookmarksResult(parent, &result);
NotifyModelChanged(result);
}
@@ -416,7 +417,7 @@ void BookmarksHandler::BookmarkNodeChanged(BookmarkModel* model,
return;
DCHECK(!partner_bookmarks_shim_->IsPartnerBookmark(node));
- DictionaryValue result;
+ base::DictionaryValue result;
SetParentInBookmarksResult(node->parent(), &result);
result.SetString(kNodeIdParam, Int64ToString(node->id()));
NotifyModelChanged(result);
@@ -431,7 +432,7 @@ void BookmarksHandler::BookmarkModelChanged() {
}
void BookmarksHandler::HandleCreateHomeScreenBookmarkShortcut(
- const ListValue* args) {
+ const base::ListValue* args) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!AreModelsLoaded())
return;
diff --git a/chrome/browser/ui/webui/ntp/android/bookmarks_handler.h b/chrome/browser/ui/webui/ntp/android/bookmarks_handler.h
index d43018d..3094548 100644
--- a/chrome/browser/ui/webui/ntp/android/bookmarks_handler.h
+++ b/chrome/browser/ui/webui/ntp/android/bookmarks_handler.h
@@ -58,11 +58,11 @@ class BookmarksHandler : public content::WebUIMessageHandler,
virtual void RegisterMessages() OVERRIDE;
// Callback for the "getBookmarks" message.
- void HandleGetBookmarks(const ListValue* args);
+ void HandleGetBookmarks(const base::ListValue* args);
// Callback for the "deleteBookmark" message.
- void HandleDeleteBookmark(const ListValue* args);
+ void HandleDeleteBookmark(const base::ListValue* args);
// Callback for the "editBookmark" message.
- void HandleEditBookmark(const ListValue* args);
+ void HandleEditBookmark(const base::ListValue* args);
// Callback for the "createHomeScreenBookmarkShortcut" message. Used when
// creating a shortcut on the home screen that should open the bookmark
// specified in |args|.
@@ -114,7 +114,7 @@ class BookmarksHandler : public content::WebUIMessageHandler,
bool AreModelsLoaded() const;
// Notify the UI that a change occurred to the bookmark model.
- void NotifyModelChanged(const DictionaryValue& status);
+ void NotifyModelChanged(const base::DictionaryValue& status);
// Generates the string encoded ID to be used by the NTP.
std::string GetBookmarkIdForNtp(const BookmarkNode* node);
@@ -122,16 +122,16 @@ class BookmarksHandler : public content::WebUIMessageHandler,
// Sets the necessary parent information in the response object to be sent
// to the UI renderer.
void SetParentInBookmarksResult(const BookmarkNode* parent,
- DictionaryValue* result);
+ base::DictionaryValue* result);
// Convert the given bookmark |node| into a dictionary format to be returned
// to JavaScript.
- void PopulateBookmark(const BookmarkNode* node, ListValue* result);
+ void PopulateBookmark(const BookmarkNode* node, base::ListValue* result);
// Given a bookmark folder node, |folder|, populate the |result| with the
// structured JavaScript-formatted data regarding the folder.
void PopulateBookmarksInFolder(const BookmarkNode* folder,
- DictionaryValue* result);
+ base::DictionaryValue* result);
// Sends all bookmarks and sub folders in the given folder back to the NTP.
void QueryBookmarkFolder(const BookmarkNode* node);
@@ -141,7 +141,7 @@ class BookmarksHandler : public content::WebUIMessageHandler,
void QueryInitialBookmarks();
// Sends the result back to Javascript
- void SendResult(const DictionaryValue& result);
+ void SendResult(const base::DictionaryValue& result);
// Called once the favicon is loaded during creation of the bookmark shortcuts
// and is available for use.
diff --git a/chrome/browser/ui/webui/ntp/android/context_menu_handler.cc b/chrome/browser/ui/webui/ntp/android/context_menu_handler.cc
index 328be22..8a25150 100644
--- a/chrome/browser/ui/webui/ntp/android/context_menu_handler.cc
+++ b/chrome/browser/ui/webui/ntp/android/context_menu_handler.cc
@@ -46,8 +46,8 @@ void ContextMenuHandler::OnItemSelected(int item_id) {
}
void ContextMenuHandler::GetIncognitoDisabled(
- const ListValue* args) {
- DictionaryValue value;
+ const base::ListValue* args) {
+ base::DictionaryValue value;
const PrefService* pref = Profile::FromBrowserContext(
web_ui()->GetWebContents()->GetBrowserContext())->GetPrefs();
@@ -62,7 +62,7 @@ void ContextMenuHandler::GetIncognitoDisabled(
}
void ContextMenuHandler::HandleShowContextMenu(
- const ListValue* menu_list_values) {
+ const base::ListValue* menu_list_values) {
if (menu_list_values->empty()) {
LOG(WARNING) << "Ignoring request for empty context menu.";
return;
@@ -74,9 +74,9 @@ void ContextMenuHandler::HandleShowContextMenu(
// title.
content::ContextMenuParams menu;
for (size_t i = 0; i < menu_list_values->GetSize(); ++i) {
- ListValue* item_list_value = NULL;
+ base::ListValue* item_list_value = NULL;
bool valid_value = menu_list_values->GetList(
- i, const_cast<const ListValue**>(&item_list_value));
+ i, const_cast<const base::ListValue**>(&item_list_value));
if (!valid_value) {
LOG(ERROR) << "Invalid context menu request: menu item info " << i <<
" is not a list.";
@@ -85,7 +85,7 @@ void ContextMenuHandler::HandleShowContextMenu(
int id;
if (!ExtractIntegerValue(item_list_value, &id)) {
- Value* value = NULL;
+ base::Value* value = NULL;
item_list_value->Get(0, &value);
LOG(ERROR) << "Invalid context menu request: menu item " << i <<
" expected int value for first parameter (got " <<
@@ -96,7 +96,7 @@ void ContextMenuHandler::HandleShowContextMenu(
content::MenuItem menu_item;
menu_item.action = id;
if (!item_list_value->GetString(1, &(menu_item.label))) {
- Value* value = NULL;
+ base::Value* value = NULL;
item_list_value->Get(1, &value);
LOG(ERROR) << "Invalid context menu request: menu item " << i <<
" expected string value for second parameter (got " <<
@@ -116,15 +116,15 @@ void ContextMenuHandler::HandleShowContextMenu(
}
}
-void ContextMenuHandler::HandleOpenInNewTab(const ListValue* args) {
+void ContextMenuHandler::HandleOpenInNewTab(const base::ListValue* args) {
OpenUrl(args, NEW_FOREGROUND_TAB);
}
-void ContextMenuHandler::HandleOpenInIncognitoTab(const ListValue* args) {
+void ContextMenuHandler::HandleOpenInIncognitoTab(const base::ListValue* args) {
OpenUrl(args, OFF_THE_RECORD);
}
-void ContextMenuHandler::OpenUrl(const ListValue* args,
+void ContextMenuHandler::OpenUrl(const base::ListValue* args,
WindowOpenDisposition disposition) {
base::string16 url = ExtractStringValue(args);
if (!url.empty()) {
diff --git a/chrome/browser/ui/webui/ntp/android/new_tab_page_ready_handler.cc b/chrome/browser/ui/webui/ntp/android/new_tab_page_ready_handler.cc
index 90d902c..01fd6b8 100644
--- a/chrome/browser/ui/webui/ntp/android/new_tab_page_ready_handler.cc
+++ b/chrome/browser/ui/webui/ntp/android/new_tab_page_ready_handler.cc
@@ -29,12 +29,12 @@ void NewTabPageReadyHandler::RegisterMessages() {
}
void NewTabPageReadyHandler::HandleNewTabPageTitleLoaded(
- const ListValue* args) {
+ const base::ListValue* args) {
web_ui()->OverrideTitle(base::string16());
}
void NewTabPageReadyHandler::HandleNewTabPageReady(
- const ListValue* args) {
+ const base::ListValue* args) {
TabAndroid* tab = TabAndroid::FromWebContents(web_ui()->GetWebContents());
if (!tab)
return;
@@ -42,7 +42,7 @@ void NewTabPageReadyHandler::HandleNewTabPageReady(
}
void NewTabPageReadyHandler::HandleNewTabPageUnexpectedNavigation(
- const ListValue* args) {
+ const base::ListValue* args) {
// NTP reached an unexpected state trying to send finish loading notification
// a second time. The notification should be sent only when page is
// completely done loading. This could otherwise create a race condition in
diff --git a/chrome/browser/ui/webui/ntp/android/ntp_resource_cache_android.cc b/chrome/browser/ui/webui/ntp/android/ntp_resource_cache_android.cc
index 0b09b2d..e028dd8 100644
--- a/chrome/browser/ui/webui/ntp/android/ntp_resource_cache_android.cc
+++ b/chrome/browser/ui/webui/ntp/android/ntp_resource_cache_android.cc
@@ -81,7 +81,7 @@ void NTPResourceCache::CreateNewTabHTML() {
// (in GetLocalizedValues) and should have more legible names.
// Show the profile name in the title and most visited labels if the current
// profile is not the default.
- DictionaryValue localized_strings;
+ base::DictionaryValue localized_strings;
localized_strings.SetBoolean("hasattribution", false);
localized_strings.SetString("title",
l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE));
diff --git a/chrome/browser/ui/webui/ntp/android/promo_handler.cc b/chrome/browser/ui/webui/ntp/android/promo_handler.cc
index fc43d70..58d7e89 100644
--- a/chrome/browser/ui/webui/ntp/android/promo_handler.cc
+++ b/chrome/browser/ui/webui/ntp/android/promo_handler.cc
@@ -215,7 +215,7 @@ void PromoHandler::HandleRecordImpression(const base::ListValue* args) {
}
void PromoHandler::InjectPromoDecorations() {
- DictionaryValue result;
+ base::DictionaryValue result;
if (FetchPromotion(&result))
web_ui()->CallJavascriptFunction("ntp.setPromotions", result);
else
@@ -240,7 +240,7 @@ void PromoHandler::RecordPromotionImpression(const std::string& id) {
NOTREACHED() << "Unknown promotion impression: " << id;
}
-bool PromoHandler::FetchPromotion(DictionaryValue* result) {
+bool PromoHandler::FetchPromotion(base::DictionaryValue* result) {
DCHECK(result != NULL);
if (!CanShowNotificationPromo())
return false;
@@ -319,7 +319,7 @@ void PromoHandler::CheckDesktopSessions() {
// Let's see if there are no desktop sessions.
std::vector<const browser_sync::SyncedSession*> sessions;
- ListValue session_list;
+ base::ListValue session_list;
if (!open_tabs->GetAllForeignSessions(&sessions))
return;
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
index 06599e8..de50b25 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -86,7 +86,7 @@ void RecordAppLauncherPromoHistogram(
// This is used to avoid a DCHECK due to an unhandled WebUI callback. The
// JavaScript used to switch between pages sends "pageSelected" which is used
// in the context of the NTP for recording metrics we don't need here.
-void NoOpCallback(const ListValue* args) {}
+void NoOpCallback(const base::ListValue* args) {}
} // namespace
@@ -110,7 +110,7 @@ AppLauncherHandler::~AppLauncherHandler() {}
void AppLauncherHandler::CreateAppInfo(
const Extension* extension,
ExtensionService* service,
- DictionaryValue* value) {
+ base::DictionaryValue* value) {
value->Clear();
// The Extension class 'helpfully' wraps bidi control characters that
@@ -263,14 +263,15 @@ void AppLauncherHandler::Observe(int type,
if (!ShouldDisplayInNewTabPage(extension, prefs))
return;
- scoped_ptr<DictionaryValue> app_info(GetAppInfo(extension));
+ scoped_ptr<base::DictionaryValue> app_info(GetAppInfo(extension));
if (app_info.get()) {
visible_apps_.insert(extension->id());
ExtensionPrefs* prefs = extension_service_->extension_prefs();
- scoped_ptr<base::FundamentalValue> highlight(Value::CreateBooleanValue(
- prefs->IsFromBookmark(extension->id()) &&
- attempted_bookmark_app_install_));
+ scoped_ptr<base::FundamentalValue> highlight(
+ base::Value::CreateBooleanValue(
+ prefs->IsFromBookmark(extension->id()) &&
+ attempted_bookmark_app_install_));
attempted_bookmark_app_install_ = false;
web_ui()->CallJavascriptFunction(
"ntp.appAdded", *app_info, *highlight);
@@ -302,15 +303,15 @@ void AppLauncherHandler::Observe(int type,
if (!ShouldDisplayInNewTabPage(extension, prefs))
return;
- scoped_ptr<DictionaryValue> app_info(GetAppInfo(extension));
+ scoped_ptr<base::DictionaryValue> app_info(GetAppInfo(extension));
if (app_info.get()) {
if (uninstalled)
visible_apps_.erase(extension->id());
scoped_ptr<base::FundamentalValue> uninstall_value(
- Value::CreateBooleanValue(uninstalled));
+ base::Value::CreateBooleanValue(uninstalled));
scoped_ptr<base::FundamentalValue> from_page(
- Value::CreateBooleanValue(!extension_id_prompting_.empty()));
+ base::Value::CreateBooleanValue(!extension_id_prompting_.empty()));
web_ui()->CallJavascriptFunction(
"ntp.appRemoved", *app_info, *uninstall_value, *from_page);
}
@@ -327,7 +328,7 @@ void AppLauncherHandler::Observe(int type,
return;
}
- DictionaryValue app_info;
+ base::DictionaryValue app_info;
CreateAppInfo(extension,
extension_service_,
&app_info);
@@ -354,18 +355,18 @@ void AppLauncherHandler::Observe(int type,
}
}
-void AppLauncherHandler::FillAppDictionary(DictionaryValue* dictionary) {
+void AppLauncherHandler::FillAppDictionary(base::DictionaryValue* dictionary) {
// CreateAppInfo and ClearOrdinals can change the extension prefs.
base::AutoReset<bool> auto_reset(&ignore_changes_, true);
- ListValue* list = new ListValue();
+ base::ListValue* list = new base::ListValue();
PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs();
for (std::set<std::string>::iterator it = visible_apps_.begin();
it != visible_apps_.end(); ++it) {
const Extension* extension = extension_service_->GetInstalledExtension(*it);
if (extension && ShouldDisplayInNewTabPage(extension, prefs)) {
- DictionaryValue* app_info = GetAppInfo(extension);
+ base::DictionaryValue* app_info = GetAppInfo(extension);
list->Append(app_info);
}
}
@@ -386,22 +387,24 @@ void AppLauncherHandler::FillAppDictionary(DictionaryValue* dictionary) {
dictionary->SetBoolean("disableCreateAppShortcut", true);
#endif
- const ListValue* app_page_names = prefs->GetList(prefs::kNtpAppPageNames);
+ const base::ListValue* app_page_names =
+ prefs->GetList(prefs::kNtpAppPageNames);
if (!app_page_names || !app_page_names->GetSize()) {
ListPrefUpdate update(prefs, prefs::kNtpAppPageNames);
- ListValue* list = update.Get();
+ base::ListValue* list = update.Get();
list->Set(0, new base::StringValue(
l10n_util::GetStringUTF16(IDS_APP_DEFAULT_PAGE_NAME)));
dictionary->Set("appPageNames",
- static_cast<ListValue*>(list->DeepCopy()));
+ static_cast<base::ListValue*>(list->DeepCopy()));
} else {
dictionary->Set("appPageNames",
- static_cast<ListValue*>(app_page_names->DeepCopy()));
+ static_cast<base::ListValue*>(app_page_names->DeepCopy()));
}
}
-DictionaryValue* AppLauncherHandler::GetAppInfo(const Extension* extension) {
- DictionaryValue* app_info = new DictionaryValue();
+base::DictionaryValue* AppLauncherHandler::GetAppInfo(
+ const Extension* extension) {
+ base::DictionaryValue* app_info = new base::DictionaryValue();
// CreateAppInfo can change the extension prefs.
base::AutoReset<bool> auto_reset(&ignore_changes_, true);
CreateAppInfo(extension,
@@ -410,8 +413,8 @@ DictionaryValue* AppLauncherHandler::GetAppInfo(const Extension* extension) {
return app_info;
}
-void AppLauncherHandler::HandleGetApps(const ListValue* args) {
- DictionaryValue dictionary;
+void AppLauncherHandler::HandleGetApps(const base::ListValue* args) {
+ base::DictionaryValue dictionary;
// Tell the client whether to show the promo for this view. We don't do this
// in the case of PREF_CHANGED because:
@@ -479,7 +482,7 @@ void AppLauncherHandler::HandleGetApps(const ListValue* args) {
has_loaded_apps_ = true;
}
-void AppLauncherHandler::HandleLaunchApp(const ListValue* args) {
+void AppLauncherHandler::HandleLaunchApp(const base::ListValue* args) {
std::string extension_id;
CHECK(args->GetString(0, &extension_id));
double source = -1.0;
@@ -547,7 +550,7 @@ void AppLauncherHandler::HandleLaunchApp(const ListValue* args) {
}
}
-void AppLauncherHandler::HandleSetLaunchType(const ListValue* args) {
+void AppLauncherHandler::HandleSetLaunchType(const base::ListValue* args) {
std::string extension_id;
double launch_type;
CHECK(args->GetString(0, &extension_id));
@@ -568,7 +571,7 @@ void AppLauncherHandler::HandleSetLaunchType(const ListValue* args) {
static_cast<int>(launch_type)));
}
-void AppLauncherHandler::HandleUninstallApp(const ListValue* args) {
+void AppLauncherHandler::HandleUninstallApp(const base::ListValue* args) {
std::string extension_id;
CHECK(args->GetString(0, &extension_id));
@@ -597,7 +600,7 @@ void AppLauncherHandler::HandleUninstallApp(const ListValue* args) {
}
}
-void AppLauncherHandler::HandleCreateAppShortcut(const ListValue* args) {
+void AppLauncherHandler::HandleCreateAppShortcut(const base::ListValue* args) {
std::string extension_id;
CHECK(args->GetString(0, &extension_id));
@@ -613,11 +616,11 @@ void AppLauncherHandler::HandleCreateAppShortcut(const ListValue* args) {
base::Closure());
}
-void AppLauncherHandler::HandleReorderApps(const ListValue* args) {
+void AppLauncherHandler::HandleReorderApps(const base::ListValue* args) {
CHECK(args->GetSize() == 2);
std::string dragged_app_id;
- const ListValue* app_order;
+ const base::ListValue* app_order;
CHECK(args->GetString(0, &dragged_app_id));
CHECK(args->GetList(1, &app_order));
@@ -642,7 +645,7 @@ void AppLauncherHandler::HandleReorderApps(const ListValue* args) {
successor_to_moved_ext);
}
-void AppLauncherHandler::HandleSetPageIndex(const ListValue* args) {
+void AppLauncherHandler::HandleSetPageIndex(const base::ListValue* args) {
AppSorting* app_sorting =
extension_service_->extension_prefs()->app_sorting();
@@ -658,7 +661,7 @@ void AppLauncherHandler::HandleSetPageIndex(const ListValue* args) {
app_sorting->SetPageOrdinal(extension_id, page_ordinal);
}
-void AppLauncherHandler::HandleSaveAppPageName(const ListValue* args) {
+void AppLauncherHandler::HandleSaveAppPageName(const base::ListValue* args) {
base::string16 name;
CHECK(args->GetString(0, &name));
@@ -668,11 +671,11 @@ void AppLauncherHandler::HandleSaveAppPageName(const ListValue* args) {
base::AutoReset<bool> auto_reset(&ignore_changes_, true);
PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs();
ListPrefUpdate update(prefs, prefs::kNtpAppPageNames);
- ListValue* list = update.Get();
+ base::ListValue* list = update.Get();
list->Set(static_cast<size_t>(page_index), new base::StringValue(name));
}
-void AppLauncherHandler::HandleGenerateAppForLink(const ListValue* args) {
+void AppLauncherHandler::HandleGenerateAppForLink(const base::ListValue* args) {
std::string url;
CHECK(args->GetString(0, &url));
GURL launch_url(url);
@@ -753,13 +756,13 @@ void AppLauncherHandler::SetAppToBeHighlighted() {
if (highlight_app_id_.empty())
return;
- StringValue app_id(highlight_app_id_);
+ base::StringValue app_id(highlight_app_id_);
web_ui()->CallJavascriptFunction("ntp.setAppToBeHighlighted", app_id);
highlight_app_id_.clear();
}
void AppLauncherHandler::OnExtensionPreferenceChanged() {
- DictionaryValue dictionary;
+ base::DictionaryValue dictionary;
FillAppDictionary(&dictionary);
web_ui()->CallJavascriptFunction("ntp.appsPrefChangeCallback", dictionary);
}
@@ -814,7 +817,7 @@ void AppLauncherHandler::ExtensionEnableFlowFinished() {
// If we don't launch the app asynchronously, then the app's disabled
// icon disappears but isn't replaced by the enabled icon, making a poor
// visual experience.
- StringValue app_id(extension_id_prompting_);
+ base::StringValue app_id(extension_id_prompting_);
web_ui()->CallJavascriptFunction("ntp.launchAppAfterEnable", app_id);
extension_enable_flow_.reset();
diff --git a/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc b/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc
index 4aeb6b7..184a31d 100644
--- a/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc
+++ b/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc
@@ -26,8 +26,8 @@
namespace {
-StringValue* SkColorToCss(SkColor color) {
- return new StringValue(base::StringPrintf("rgb(%d, %d, %d)",
+base::StringValue* SkColorToCss(SkColor color) {
+ return new base::StringValue(base::StringPrintf("rgb(%d, %d, %d)",
SkColorGetR(color),
SkColorGetG(color),
SkColorGetB(color)));
@@ -79,7 +79,8 @@ void FaviconWebUIHandler::RegisterMessages() {
base::Unretained(this)));
}
-void FaviconWebUIHandler::HandleGetFaviconDominantColor(const ListValue* args) {
+void FaviconWebUIHandler::HandleGetFaviconDominantColor(
+ const base::ListValue* args) {
std::string path;
CHECK(args->GetString(0, &path));
std::string prefix = "chrome://favicon/size/";
@@ -100,8 +101,8 @@ void FaviconWebUIHandler::HandleGetFaviconDominantColor(const ListValue* args) {
for (size_t i = 0; i < arraysize(history::kPrepopulatedPages); i++) {
if (url.spec() ==
l10n_util::GetStringUTF8(history::kPrepopulatedPages[i].url_id)) {
- StringValue dom_id_value(dom_id);
- scoped_ptr<StringValue> color(
+ base::StringValue dom_id_value(dom_id);
+ scoped_ptr<base::StringValue> color(
SkColorToCss(history::kPrepopulatedPages[i].color));
web_ui()->CallJavascriptFunction("ntp.setFaviconDominantColor",
dom_id_value, *color);
@@ -125,21 +126,21 @@ void FaviconWebUIHandler::HandleGetFaviconDominantColor(const ListValue* args) {
void FaviconWebUIHandler::OnFaviconDataAvailable(
int id,
const chrome::FaviconBitmapResult& bitmap_result) {
- scoped_ptr<StringValue> color_value;
+ scoped_ptr<base::StringValue> color_value;
if (bitmap_result.is_valid())
color_value.reset(GetDominantColorCssString(bitmap_result.bitmap_data));
else
- color_value.reset(new StringValue("#919191"));
+ color_value.reset(new base::StringValue("#919191"));
- StringValue dom_id(dom_id_map_[id]);
+ base::StringValue dom_id(dom_id_map_[id]);
web_ui()->CallJavascriptFunction("ntp.setFaviconDominantColor",
dom_id, *color_value);
dom_id_map_.erase(id);
}
void FaviconWebUIHandler::HandleGetAppIconDominantColor(
- const ListValue* args) {
+ const base::ListValue* args) {
std::string extension_id;
CHECK(args->GetString(0, &extension_id));
@@ -160,8 +161,9 @@ void FaviconWebUIHandler::NotifyAppIconReady(const std::string& extension_id) {
return;
scoped_refptr<base::RefCountedStaticMemory> bits_mem(
new base::RefCountedStaticMemory(&bits.front(), bits.size()));
- scoped_ptr<StringValue> color_value(GetDominantColorCssString(bits_mem));
- StringValue id(extension_id);
+ scoped_ptr<base::StringValue> color_value(
+ GetDominantColorCssString(bits_mem));
+ base::StringValue id(extension_id);
web_ui()->CallJavascriptFunction(
"ntp.setFaviconDominantColor", id, *color_value);
}
diff --git a/chrome/browser/ui/webui/ntp/foreign_session_handler.cc b/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
index 71adcc0..dc2d314 100644
--- a/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
+++ b/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
@@ -122,7 +122,7 @@ void ForeignSessionHandler::OpenForeignSessionWindows(
// static
bool ForeignSessionHandler::SessionTabToValue(
const SessionTab& tab,
- DictionaryValue* dictionary) {
+ base::DictionaryValue* dictionary) {
if (tab.navigations.empty())
return false;
@@ -192,7 +192,7 @@ void ForeignSessionHandler::Observe(
int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- ListValue list_value;
+ base::ListValue list_value;
switch (type) {
case chrome::NOTIFICATION_FOREIGN_SESSION_DISABLED:
@@ -226,11 +226,12 @@ base::string16 ForeignSessionHandler::FormatSessionTime(
now < time ? base::TimeDelta() : now - time);
}
-void ForeignSessionHandler::HandleGetForeignSessions(const ListValue* args) {
+void ForeignSessionHandler::HandleGetForeignSessions(
+ const base::ListValue* args) {
OpenTabsUIDelegate* open_tabs = GetOpenTabsUIDelegate(web_ui());
std::vector<const SyncedSession*> sessions;
- ListValue session_list;
+ base::ListValue session_list;
if (open_tabs && open_tabs->GetAllForeignSessions(&sessions)) {
// Sort sessions from most recent to least recent.
std::sort(sessions.begin(), sessions.end(), SortSessionsByRecency);
@@ -240,8 +241,8 @@ void ForeignSessionHandler::HandleGetForeignSessions(const ListValue* args) {
// and only add back sessions that are still current.
DictionaryPrefUpdate pref_update(Profile::FromWebUI(web_ui())->GetPrefs(),
prefs::kNtpCollapsedForeignSessions);
- DictionaryValue* current_collapsed_sessions = pref_update.Get();
- scoped_ptr<DictionaryValue> collapsed_sessions(
+ base::DictionaryValue* current_collapsed_sessions = pref_update.Get();
+ scoped_ptr<base::DictionaryValue> collapsed_sessions(
current_collapsed_sessions->DeepCopy());
current_collapsed_sessions->Clear();
@@ -249,7 +250,8 @@ void ForeignSessionHandler::HandleGetForeignSessions(const ListValue* args) {
for (size_t i = 0; i < sessions.size() && i < kMaxSessionsToShow; ++i) {
const SyncedSession* session = sessions[i];
const std::string& session_tag = session->session_tag;
- scoped_ptr<DictionaryValue> session_data(new DictionaryValue());
+ scoped_ptr<base::DictionaryValue> session_data(
+ new base::DictionaryValue());
session_data->SetString("tag", session_tag);
session_data->SetString("name", session->session_name);
session_data->SetString("deviceType", session->DeviceTypeAsString());
@@ -261,11 +263,12 @@ void ForeignSessionHandler::HandleGetForeignSessions(const ListValue* args) {
if (is_collapsed)
current_collapsed_sessions->SetBoolean(session_tag, true);
- scoped_ptr<ListValue> window_list(new ListValue());
+ scoped_ptr<base::ListValue> window_list(new base::ListValue());
for (SyncedSession::SyncedWindowMap::const_iterator it =
session->windows.begin(); it != session->windows.end(); ++it) {
SessionWindow* window = it->second;
- scoped_ptr<DictionaryValue> window_data(new DictionaryValue());
+ scoped_ptr<base::DictionaryValue> window_data(
+ new base::DictionaryValue());
if (SessionWindowToValue(*window, window_data.get()))
window_list->Append(window_data.release());
}
@@ -280,7 +283,8 @@ void ForeignSessionHandler::HandleGetForeignSessions(const ListValue* args) {
tab_sync_enabled);
}
-void ForeignSessionHandler::HandleOpenForeignSession(const ListValue* args) {
+void ForeignSessionHandler::HandleOpenForeignSession(
+ const base::ListValue* args) {
size_t num_args = args->GetSize();
// Expect either 1 or 8 args. For restoring an entire session, only
// one argument is required -- the session tag. To restore a tab,
@@ -327,7 +331,8 @@ void ForeignSessionHandler::HandleOpenForeignSession(const ListValue* args) {
}
}
-void ForeignSessionHandler::HandleDeleteForeignSession(const ListValue* args) {
+void ForeignSessionHandler::HandleDeleteForeignSession(
+ const base::ListValue* args) {
if (args->GetSize() != 1U) {
LOG(ERROR) << "Wrong number of args to deleteForeignSession";
return;
@@ -346,7 +351,7 @@ void ForeignSessionHandler::HandleDeleteForeignSession(const ListValue* args) {
}
void ForeignSessionHandler::HandleSetForeignSessionCollapsed(
- const ListValue* args) {
+ const base::ListValue* args) {
if (args->GetSize() != 2U) {
LOG(ERROR) << "Wrong number of args to setForeignSessionCollapsed";
return;
@@ -377,16 +382,16 @@ void ForeignSessionHandler::HandleSetForeignSessionCollapsed(
bool ForeignSessionHandler::SessionWindowToValue(
const SessionWindow& window,
- DictionaryValue* dictionary) {
+ base::DictionaryValue* dictionary) {
if (window.tabs.empty()) {
NOTREACHED();
return false;
}
- scoped_ptr<ListValue> tab_values(new ListValue());
+ scoped_ptr<base::ListValue> tab_values(new base::ListValue());
// Calculate the last |modification_time| for all entries within a window.
base::Time modification_time = window.timestamp;
for (size_t i = 0; i < window.tabs.size(); ++i) {
- scoped_ptr<DictionaryValue> tab_value(new DictionaryValue());
+ scoped_ptr<base::DictionaryValue> tab_value(new base::DictionaryValue());
if (SessionTabToValue(*window.tabs[i], tab_value.get())) {
modification_time = std::max(modification_time,
window.tabs[i]->timestamp);
diff --git a/chrome/browser/ui/webui/ntp/foreign_session_handler.h b/chrome/browser/ui/webui/ntp/foreign_session_handler.h
index 477061a..ff89e7a 100644
--- a/chrome/browser/ui/webui/ntp/foreign_session_handler.h
+++ b/chrome/browser/ui/webui/ntp/foreign_session_handler.h
@@ -47,7 +47,7 @@ class ForeignSessionHandler : public content::WebUIMessageHandler,
// Helper method to create JSON compatible objects from Session objects.
static bool SessionTabToValue(const SessionTab& tab,
- DictionaryValue* dictionary);
+ base::DictionaryValue* dictionary);
// Returns a pointer to the current session model associator or NULL.
static OpenTabsUIDelegate* GetOpenTabsUIDelegate(content::WebUI* web_ui);
@@ -70,24 +70,24 @@ class ForeignSessionHandler : public content::WebUIMessageHandler,
// Determines which session is to be opened, and then calls
// OpenForeignSession, to begin the process of opening a new browser window.
// This is a javascript callback handler.
- void HandleOpenForeignSession(const ListValue* args);
+ void HandleOpenForeignSession(const base::ListValue* args);
// Determines whether foreign sessions should be obtained from the sync model.
// This is a javascript callback handler, and it is also called when the sync
// model has changed and the new tab page needs to reflect the changes.
- void HandleGetForeignSessions(const ListValue* args);
+ void HandleGetForeignSessions(const base::ListValue* args);
// Delete a foreign session. This will remove it from the list of foreign
// sessions on all devices. It will reappear if the session is re-activated
// on the original device.
// This is a javascript callback handler.
- void HandleDeleteForeignSession(const ListValue* args);
+ void HandleDeleteForeignSession(const base::ListValue* args);
- void HandleSetForeignSessionCollapsed(const ListValue* args);
+ void HandleSetForeignSessionCollapsed(const base::ListValue* args);
// Helper method to create JSON compatible objects from Session objects.
bool SessionWindowToValue(const SessionWindow& window,
- DictionaryValue* dictionary);
+ base::DictionaryValue* dictionary);
// The Registrar used to register ForeignSessionHandler for notifications.
content::NotificationRegistrar registrar_;
diff --git a/chrome/browser/ui/webui/ntp/most_visited_handler.cc b/chrome/browser/ui/webui/ntp/most_visited_handler.cc
index b09f162..b549e87 100644
--- a/chrome/browser/ui/webui/ntp/most_visited_handler.cc
+++ b/chrome/browser/ui/webui/ntp/most_visited_handler.cc
@@ -132,7 +132,7 @@ void MostVisitedHandler::RegisterMessages() {
base::Unretained(this)));
}
-void MostVisitedHandler::HandleGetMostVisited(const ListValue* args) {
+void MostVisitedHandler::HandleGetMostVisited(const base::ListValue* args) {
if (!got_first_most_visited_request_) {
// If our initial data is already here, return it.
SendPagesValue();
@@ -145,7 +145,7 @@ void MostVisitedHandler::HandleGetMostVisited(const ListValue* args) {
void MostVisitedHandler::SendPagesValue() {
if (pages_value_) {
Profile* profile = Profile::FromWebUI(web_ui());
- const DictionaryValue* url_blacklist =
+ const base::DictionaryValue* url_blacklist =
profile->GetPrefs()->GetDictionary(prefs::kNtpMostVisitedURLsBlacklist);
bool has_blacklisted_urls = !url_blacklist->empty();
history::TopSites* ts = profile->GetTopSites();
@@ -172,15 +172,16 @@ void MostVisitedHandler::StartQueryForMostVisited() {
}
}
-void MostVisitedHandler::HandleBlacklistUrl(const ListValue* args) {
+void MostVisitedHandler::HandleBlacklistUrl(const base::ListValue* args) {
std::string url = UTF16ToUTF8(ExtractStringValue(args));
BlacklistUrl(GURL(url));
}
-void MostVisitedHandler::HandleRemoveUrlsFromBlacklist(const ListValue* args) {
+void MostVisitedHandler::HandleRemoveUrlsFromBlacklist(
+ const base::ListValue* args) {
DCHECK(args->GetSize() != 0);
- for (ListValue::const_iterator iter = args->begin();
+ for (base::ListValue::const_iterator iter = args->begin();
iter != args->end(); ++iter) {
std::string url;
bool r = (*iter)->GetAsString(&url);
@@ -195,7 +196,7 @@ void MostVisitedHandler::HandleRemoveUrlsFromBlacklist(const ListValue* args) {
}
}
-void MostVisitedHandler::HandleClearBlacklist(const ListValue* args) {
+void MostVisitedHandler::HandleClearBlacklist(const base::ListValue* args) {
content::RecordAction(UserMetricsAction("MostVisited_BlacklistCleared"));
history::TopSites* ts = Profile::FromWebUI(web_ui())->GetTopSites();
@@ -224,14 +225,14 @@ void MostVisitedHandler::HandleMostVisitedSelected(
void MostVisitedHandler::SetPagesValueFromTopSites(
const history::MostVisitedURLList& data) {
- pages_value_.reset(new ListValue);
+ pages_value_.reset(new base::ListValue);
history::MostVisitedURLList top_sites(data);
history::MostVisitedTilesExperiment::MaybeShuffle(&top_sites);
for (size_t i = 0; i < top_sites.size(); i++) {
const history::MostVisitedURL& url = top_sites[i];
- DictionaryValue* page_value = new DictionaryValue();
+ base::DictionaryValue* page_value = new base::DictionaryValue();
if (url.url.is_empty()) {
page_value->SetBoolean("filler", true);
pages_value_->Append(page_value);
diff --git a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
index b94efad..2a30e17 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
@@ -76,14 +76,16 @@ void NewTabPageHandler::RegisterMessages() {
base::Unretained(this)));
}
-void NewTabPageHandler::HandleNotificationPromoClosed(const ListValue* args) {
+void NewTabPageHandler::HandleNotificationPromoClosed(
+ const base::ListValue* args) {
UMA_HISTOGRAM_ENUMERATION("NewTabPage.Promo.Notification",
PROMO_CLOSED, PROMO_ACTION_MAX);
NotificationPromo::HandleClosed(NotificationPromo::NTP_NOTIFICATION_PROMO);
Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED);
}
-void NewTabPageHandler::HandleNotificationPromoViewed(const ListValue* args) {
+void NewTabPageHandler::HandleNotificationPromoViewed(
+ const base::ListValue* args) {
UMA_HISTOGRAM_ENUMERATION("NewTabPage.Promo.Notification",
PROMO_VIEWED, PROMO_ACTION_MAX);
if (NotificationPromo::HandleViewed(
@@ -93,33 +95,34 @@ void NewTabPageHandler::HandleNotificationPromoViewed(const ListValue* args) {
}
void NewTabPageHandler::HandleNotificationPromoLinkClicked(
- const ListValue* args) {
+ const base::ListValue* args) {
DVLOG(1) << "HandleNotificationPromoLinkClicked";
UMA_HISTOGRAM_ENUMERATION("NewTabPage.Promo.Notification",
PROMO_LINK_CLICKED, PROMO_ACTION_MAX);
}
-void NewTabPageHandler::HandleBubblePromoClosed(const ListValue* args) {
+void NewTabPageHandler::HandleBubblePromoClosed(const base::ListValue* args) {
UMA_HISTOGRAM_ENUMERATION("NewTabPage.Promo.Bubble",
PROMO_CLOSED, PROMO_ACTION_MAX);
NotificationPromo::HandleClosed(NotificationPromo::NTP_BUBBLE_PROMO);
Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED);
}
-void NewTabPageHandler::HandleBubblePromoViewed(const ListValue* args) {
+void NewTabPageHandler::HandleBubblePromoViewed(const base::ListValue* args) {
UMA_HISTOGRAM_ENUMERATION("NewTabPage.Promo.Bubble",
PROMO_VIEWED, PROMO_ACTION_MAX);
if (NotificationPromo::HandleViewed(NotificationPromo::NTP_BUBBLE_PROMO))
Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED);
}
-void NewTabPageHandler::HandleBubblePromoLinkClicked(const ListValue* args) {
+void NewTabPageHandler::HandleBubblePromoLinkClicked(
+ const base::ListValue* args) {
DVLOG(1) << "HandleBubblePromoLinkClicked";
UMA_HISTOGRAM_ENUMERATION("NewTabPage.Promo.Bubble",
PROMO_LINK_CLICKED, PROMO_ACTION_MAX);
}
-void NewTabPageHandler::HandlePageSelected(const ListValue* args) {
+void NewTabPageHandler::HandlePageSelected(const base::ListValue* args) {
page_switch_count_++;
double page_id_double;
@@ -143,7 +146,7 @@ void NewTabPageHandler::HandlePageSelected(const ListValue* args) {
shown_page_type, kHistogramEnumerationMax);
}
-void NewTabPageHandler::HandleLogTimeToClick(const ListValue* args) {
+void NewTabPageHandler::HandleLogTimeToClick(const base::ListValue* args) {
std::string histogram_name;
double duration;
if (!args->GetString(0, &histogram_name) || !args->GetDouble(1, &duration)) {
@@ -180,7 +183,7 @@ void NewTabPageHandler::RegisterProfilePrefs(
// static
void NewTabPageHandler::GetLocalizedValues(Profile* profile,
- DictionaryValue* values) {
+ base::DictionaryValue* values) {
values->SetInteger("most_visited_page_id", MOST_VISITED_PAGE_ID);
values->SetInteger("apps_page_id", APPS_PAGE_ID);
values->SetInteger("suggestions_page_id", SUGGESTIONS_PAGE_ID);
diff --git a/chrome/browser/ui/webui/ntp/new_tab_page_handler.h b/chrome/browser/ui/webui/ntp/new_tab_page_handler.h
index dbca446..83c416f 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_page_handler.h
+++ b/chrome/browser/ui/webui/ntp/new_tab_page_handler.h
@@ -28,7 +28,8 @@ class NewTabPageHandler : public content::WebUIMessageHandler,
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
// Registers values (strings etc.) for the page.
- static void GetLocalizedValues(Profile* profile, DictionaryValue* values);
+ static void GetLocalizedValues(Profile* profile,
+ base::DictionaryValue* values);
private:
virtual ~NewTabPageHandler();
@@ -37,25 +38,25 @@ class NewTabPageHandler : public content::WebUIMessageHandler,
virtual void RegisterMessages() OVERRIDE;
// Callback for "notificationPromoClosed". No arguments.
- void HandleNotificationPromoClosed(const ListValue* args);
+ void HandleNotificationPromoClosed(const base::ListValue* args);
// Callback for "notificationPromoViewed". No arguments.
- void HandleNotificationPromoViewed(const ListValue* args);
+ void HandleNotificationPromoViewed(const base::ListValue* args);
// Callback for "notificationPromoLinkClicked". No arguments.
- void HandleNotificationPromoLinkClicked(const ListValue* args);
+ void HandleNotificationPromoLinkClicked(const base::ListValue* args);
// Callback for "bubblePromoClosed". No arguments.
- void HandleBubblePromoClosed(const ListValue* args);
+ void HandleBubblePromoClosed(const base::ListValue* args);
// Callback for "bubblePromoViewed". No arguments.
- void HandleBubblePromoViewed(const ListValue* args);
+ void HandleBubblePromoViewed(const base::ListValue* args);
// Callback for "bubblePromoLinkClicked". No arguments.
- void HandleBubblePromoLinkClicked(const ListValue* args);
+ void HandleBubblePromoLinkClicked(const base::ListValue* args);
// Callback for "pageSelected".
- void HandlePageSelected(const ListValue* args);
+ void HandlePageSelected(const base::ListValue* args);
// Callback for "logTimeToClick".
void HandleLogTimeToClick(const base::ListValue* args);
diff --git a/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc b/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc
index 53dad5c..8f52426 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc
@@ -77,7 +77,7 @@ void NewTabPageSyncHandler::RegisterMessages() {
base::Unretained(this)));
}
-void NewTabPageSyncHandler::HandleGetSyncMessage(const ListValue* args) {
+void NewTabPageSyncHandler::HandleGetSyncMessage(const base::ListValue* args) {
waiting_for_initial_page_load_ = false;
BuildAndSendSyncStatus();
}
@@ -123,7 +123,7 @@ void NewTabPageSyncHandler::BuildAndSendSyncStatus() {
UTF16ToUTF8(status_msg), UTF16ToUTF8(link_text));
}
-void NewTabPageSyncHandler::HandleSyncLinkClicked(const ListValue* args) {
+void NewTabPageSyncHandler::HandleSyncLinkClicked(const base::ListValue* args) {
DCHECK(!waiting_for_initial_page_load_);
if (!sync_service_ || !sync_service_->IsSyncEnabled())
return;
@@ -136,7 +136,7 @@ void NewTabPageSyncHandler::HandleSyncLinkClicked(const ListValue* args) {
if (sync_service_->HasSyncSetupCompleted()) {
base::string16 user = UTF8ToUTF16(SigninManagerFactory::GetForProfile(
Profile::FromWebUI(web_ui()))->GetAuthenticatedUsername());
- DictionaryValue value;
+ base::DictionaryValue value;
value.SetString("syncEnabledMessage",
l10n_util::GetStringFUTF16(IDS_SYNC_NTP_SYNCED_TO,
user));
@@ -163,7 +163,7 @@ void NewTabPageSyncHandler::OnSigninAllowedPrefChange() {
void NewTabPageSyncHandler::SendSyncMessageToPage(
MessageType type, std::string msg,
std::string linktext) {
- DictionaryValue value;
+ base::DictionaryValue value;
std::string user;
std::string title;
std::string linkurl;
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
index e9f7a9e..bb58899 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -238,7 +238,7 @@ void NewTabUI::EmitNtpStatistics() {
}
void NewTabUI::OnShowBookmarkBarChanged() {
- StringValue attached(
+ base::StringValue attached(
GetProfile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar) ?
"true" : "false");
web_ui()->CallJavascriptFunction("ntp.setBookmarkBarAttached", attached);
@@ -288,7 +288,7 @@ bool NewTabUI::IsDiscoveryInNTPEnabled() {
}
// static
-void NewTabUI::SetUrlTitleAndDirection(DictionaryValue* dictionary,
+void NewTabUI::SetUrlTitleAndDirection(base::DictionaryValue* dictionary,
const base::string16& title,
const GURL& gurl) {
dictionary->SetString("url", gurl.spec());
diff --git a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
index e715611..0671359 100644
--- a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
@@ -121,11 +121,11 @@ void NTPLoginHandler::Observe(int type,
}
}
-void NTPLoginHandler::HandleInitializeSyncLogin(const ListValue* args) {
+void NTPLoginHandler::HandleInitializeSyncLogin(const base::ListValue* args) {
UpdateLogin();
}
-void NTPLoginHandler::HandleShowSyncLoginUI(const ListValue* args) {
+void NTPLoginHandler::HandleShowSyncLoginUI(const base::ListValue* args) {
Profile* profile = Profile::FromWebUI(web_ui());
std::string username = profile->GetPrefs()->GetString(
prefs::kGoogleServicesUsername);
@@ -180,7 +180,7 @@ void NTPLoginHandler::RecordInHistogram(int type) {
}
}
-void NTPLoginHandler::HandleLoginMessageSeen(const ListValue* args) {
+void NTPLoginHandler::HandleLoginMessageSeen(const base::ListValue* args) {
Profile::FromWebUI(web_ui())->GetPrefs()->SetBoolean(
prefs::kSignInPromoShowNTPBubble, false);
NewTabUI* ntp_ui = NewTabUI::FromWebUIController(web_ui()->GetController());
@@ -189,7 +189,7 @@ void NTPLoginHandler::HandleLoginMessageSeen(const ListValue* args) {
ntp_ui->set_showing_sync_bubble(true);
}
-void NTPLoginHandler::HandleShowAdvancedLoginUI(const ListValue* args) {
+void NTPLoginHandler::HandleShowAdvancedLoginUI(const base::ListValue* args) {
Browser* browser =
chrome::FindBrowserWithWebContents(web_ui()->GetWebContents());
if (browser)
@@ -247,9 +247,9 @@ void NTPLoginHandler::UpdateLogin() {
#endif
}
- StringValue header_value(header);
- StringValue sub_header_value(sub_header);
- StringValue icon_url_value(icon_url);
+ base::StringValue header_value(header);
+ base::StringValue sub_header_value(sub_header);
+ base::StringValue icon_url_value(icon_url);
base::FundamentalValue is_user_signed_in(!username.empty());
web_ui()->CallJavascriptFunction("ntp.updateLogin",
header_value, sub_header_value, icon_url_value, is_user_signed_in);
@@ -269,7 +269,7 @@ bool NTPLoginHandler::ShouldShow(Profile* profile) {
// static
void NTPLoginHandler::GetLocalizedValues(Profile* profile,
- DictionaryValue* values) {
+ base::DictionaryValue* values) {
PrefService* prefs = profile->GetPrefs();
bool hide_sync = !prefs->GetBoolean(prefs::kSignInPromoShowNTPBubble);
diff --git a/chrome/browser/ui/webui/ntp/ntp_login_handler.h b/chrome/browser/ui/webui/ntp/ntp_login_handler.h
index aff3311..d6734c2 100644
--- a/chrome/browser/ui/webui/ntp/ntp_login_handler.h
+++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.h
@@ -34,7 +34,8 @@ class NTPLoginHandler : public content::WebUIMessageHandler,
static bool ShouldShow(Profile* profile);
// Registers values (strings etc.) for the page.
- static void GetLocalizedValues(Profile* profile, DictionaryValue* values);
+ static void GetLocalizedValues(Profile* profile,
+ base::DictionaryValue* values);
private:
// User actions while on the NTP when clicking on or viewing the sync promo.
@@ -46,24 +47,24 @@ class NTPLoginHandler : public content::WebUIMessageHandler,
// Called from JS when the NTP is loaded. |args| is the list of arguments
// passed from JS and should be an empty list.
- void HandleInitializeSyncLogin(const ListValue* args);
+ void HandleInitializeSyncLogin(const base::ListValue* args);
// Called from JS when the user clicks the login container. It shows the
// appropriate UI based on the current sync state. |args| is the list of
// arguments passed from JS and should be an empty list.
- void HandleShowSyncLoginUI(const ListValue* args);
+ void HandleShowSyncLoginUI(const base::ListValue* args);
// Records actions in SyncPromo.NTPPromo histogram.
void RecordInHistogram(int type);
// Called from JS when the sync promo NTP bubble has been displayed. |args| is
// the list of arguments passed from JS and should be an empty list.
- void HandleLoginMessageSeen(const ListValue* args);
+ void HandleLoginMessageSeen(const base::ListValue* args);
// Called from JS when the user clicks on the advanced link the sync promo NTP
// bubble. Use use this to navigate to the sync settings page. |args| is the
// list of arguments passed from JS and should be an empty list.
- void HandleShowAdvancedLoginUI(const ListValue* args);
+ void HandleShowAdvancedLoginUI(const base::ListValue* args);
// Internal helper method
void UpdateLogin();