diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 22:34:41 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 22:34:41 +0000 |
commit | aeca23fd8d2a00723b2cb9791054f5ff11034004 (patch) | |
tree | c360d46857a7c634460e99d2e90cec7017126843 /chrome/browser/extensions | |
parent | 5e4c87570711035dd18092ecbfcd47bf4f2d1e6c (diff) | |
download | chromium_src-aeca23fd8d2a00723b2cb9791054f5ff11034004.zip chromium_src-aeca23fd8d2a00723b2cb9791054f5ff11034004.tar.gz chromium_src-aeca23fd8d2a00723b2cb9791054f5ff11034004.tar.bz2 |
Convert most of extensions and some other random stuff to using the base namespace for Values.
R=finnur@chromium.org
Review URL: https://codereview.chromium.org/16915006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207937 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
143 files changed, 803 insertions, 742 deletions
diff --git a/chrome/browser/extensions/activity_log/activity_log.cc b/chrome/browser/extensions/activity_log/activity_log.cc index cecf3fe..278a157e 100644 --- a/chrome/browser/extensions/activity_log/activity_log.cc +++ b/chrome/browser/extensions/activity_log/activity_log.cc @@ -32,9 +32,9 @@ namespace { // Concatenate arguments. -std::string MakeArgList(const ListValue* args) { +std::string MakeArgList(const base::ListValue* args) { std::string call_signature; - ListValue::const_iterator it = args->begin(); + base::ListValue::const_iterator it = args->begin(); for (; it != args->end(); ++it) { std::string arg; JSONStringValueSerializer serializer(&arg); @@ -237,7 +237,7 @@ void ActivityLog::RemoveObserver(ActivityLog::Observer* observer) { void ActivityLog::LogAPIActionInternal(const std::string& extension_id, const std::string& api_call, - ListValue* args, + base::ListValue* args, const std::string& extra, const APIAction::Type type) { std::string verb, manager; @@ -283,7 +283,7 @@ void ActivityLog::LogAPIActionInternal(const std::string& extension_id, // A wrapper around LogAPIActionInternal, but we know it's an API call. void ActivityLog::LogAPIAction(const std::string& extension_id, const std::string& api_call, - ListValue* args, + base::ListValue* args, const std::string& extra) { if (!IsLogEnabled() || ActivityLogAPI::IsExtensionWhitelisted(extension_id)) return; @@ -300,7 +300,7 @@ void ActivityLog::LogAPIAction(const std::string& extension_id, // handle them. Right now they're being handled almost the same. void ActivityLog::LogEventAction(const std::string& extension_id, const std::string& api_call, - ListValue* args, + base::ListValue* args, const std::string& extra) { if (!IsLogEnabled() || ActivityLogAPI::IsExtensionWhitelisted(extension_id)) return; @@ -313,7 +313,7 @@ void ActivityLog::LogEventAction(const std::string& extension_id, void ActivityLog::LogBlockedAction(const std::string& extension_id, const std::string& blocked_call, - ListValue* args, + base::ListValue* args, BlockedAction::Reason reason, const std::string& extra) { if (!IsLogEnabled() || @@ -348,7 +348,7 @@ void ActivityLog::LogDOMAction(const std::string& extension_id, const GURL& url, const string16& url_title, const std::string& api_call, - const ListValue* args, + const base::ListValue* args, DomActionType::Type call_type, const std::string& extra) { if (!IsLogEnabled() || @@ -480,8 +480,8 @@ void ActivityLog::OnScriptsExecuted( ext_scripts_str += *it2; ext_scripts_str += " "; } - scoped_ptr<ListValue> script_names(new ListValue()); - script_names->Set(0, new StringValue(ext_scripts_str)); + scoped_ptr<base::ListValue> script_names(new base::ListValue()); + script_names->Set(0, new base::StringValue(ext_scripts_str)); LogDOMAction(extension->id(), on_url, web_contents->GetTitle(), diff --git a/chrome/browser/extensions/activity_log/activity_log.h b/chrome/browser/extensions/activity_log/activity_log.h index 423de346..fd9b6e2 100644 --- a/chrome/browser/extensions/activity_log/activity_log.h +++ b/chrome/browser/extensions/activity_log/activity_log.h @@ -70,7 +70,7 @@ class ActivityLog : public BrowserContextKeyedService, // (Note: implemented as a wrapper for LogAPIActionInternal.) void LogAPIAction(const std::string& extension_id, const std::string& name, // e.g., tabs.get - ListValue* args, // the argument values e.g. 46 + base::ListValue* args, // the argument values e.g. 46 const std::string& extra); // any extra logging info // Log an event notification delivered to an extension. @@ -78,14 +78,14 @@ class ActivityLog : public BrowserContextKeyedService, // (Note: implemented as a wrapper for LogAPIActionInternal.) void LogEventAction(const std::string& extension_id, const std::string& name, // e.g., tabs.onUpdate - ListValue* args, // arguments to the callback + base::ListValue* args, // arguments to the callback const std::string& extra); // any extra logging info // Log a blocked API call made by an extension. // This will create a BlockedAction for storage in the database. void LogBlockedAction(const std::string& extension_id, const std::string& blocked_call, // e.g., tabs.get - ListValue* args, // argument values + base::ListValue* args, // argument values BlockedAction::Reason reason, // why it's blocked const std::string& extra); // extra logging info @@ -95,7 +95,7 @@ class ActivityLog : public BrowserContextKeyedService, const GURL& url, // target URL const string16& url_title, // title of the URL const std::string& api_call, // api call - const ListValue* args, // arguments + const base::ListValue* args, // arguments DomActionType::Type call_type, // type of the call const std::string& extra); // extra logging info @@ -168,7 +168,7 @@ class ActivityLog : public BrowserContextKeyedService, void LogAPIActionInternal( const std::string& extension_id, const std::string& api_call, - ListValue* args, + base::ListValue* args, const std::string& extra, const APIAction::Type type); diff --git a/chrome/browser/extensions/activity_log/activity_log_unittest.cc b/chrome/browser/extensions/activity_log/activity_log_unittest.cc index 64b7d4d..01bdcd1 100644 --- a/chrome/browser/extensions/activity_log/activity_log_unittest.cc +++ b/chrome/browser/extensions/activity_log/activity_log_unittest.cc @@ -188,7 +188,7 @@ TEST_F(ActivityLogTest, Enabled) { TEST_F(ActivityLogTest, Construct) { ActivityLog* activity_log = ActivityLog::GetInstance(profile_.get()); - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); ASSERT_TRUE(activity_log->IsLogEnabled()); activity_log->LogAPIAction( kExtensionId, std::string("tabs.testMethod"), args.get(), std::string()); @@ -196,7 +196,7 @@ TEST_F(ActivityLogTest, Construct) { TEST_F(ActivityLogTest, LogAndFetchActions) { ActivityLog* activity_log = ActivityLog::GetInstance(profile_.get()); - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); ASSERT_TRUE(activity_log->IsLogEnabled()); // Write some API calls @@ -217,7 +217,7 @@ TEST_F(ActivityLogTest, LogAndFetchActions) { TEST_F(ActivityLogTest, LogAndFetchPathActions) { ActivityLog* activity_log = ActivityLog::GetInstance(profile_.get()); - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); ASSERT_TRUE(activity_log->IsLogEnabled()); activity_log->LogDOMAction(kExtensionId, @@ -238,7 +238,7 @@ TEST_F(ActivityLogTest, LogWithoutArguments) { activity_log->SetArgumentLoggingForTesting(false); ASSERT_TRUE(activity_log->IsLogEnabled()); activity_log->SetDefaultPolicy(ActivityLogPolicy::POLICY_NOARGS); - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Set(0, new base::StringValue("hello")); args->Set(1, new base::StringValue("world")); activity_log->LogAPIAction( @@ -252,7 +252,7 @@ TEST_F(ActivityLogTest, LogWithArguments) { activity_log->SetDefaultPolicy(ActivityLogPolicy::POLICY_FULLSTREAM); ASSERT_TRUE(activity_log->IsLogEnabled()); - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Set(0, new base::StringValue("hello")); args->Set(1, new base::StringValue("world")); activity_log->LogAPIAction(kExtensionId, diff --git a/chrome/browser/extensions/activity_log/api_actions.cc b/chrome/browser/extensions/activity_log/api_actions.cc index c1b4fe7..483d394 100644 --- a/chrome/browser/extensions/activity_log/api_actions.cc +++ b/chrome/browser/extensions/activity_log/api_actions.cc @@ -208,7 +208,7 @@ bool APIAction::Record(sql::Connection* db) { // static void APIAction::LookupTabId(const std::string& api_call, - ListValue* args, + base::ListValue* args, Profile* profile) { if (api_call == "tabs.get" || // api calls, ID as int api_call == "tabs.connect" || @@ -228,7 +228,7 @@ void APIAction::LookupTabId(const std::string& api_call, api_call == "tabs.onRemoved" || api_call == "tabs.onReplaced") { int tab_id; - ListValue* id_list; + base::ListValue* id_list; if (args->GetInteger(0, &tab_id)) { std::string url = GetURLForTabId(tab_id, profile); if (url != std::string()) diff --git a/chrome/browser/extensions/activity_log/api_actions.h b/chrome/browser/extensions/activity_log/api_actions.h index c56ed6a..70a16a7 100644 --- a/chrome/browser/extensions/activity_log/api_actions.h +++ b/chrome/browser/extensions/activity_log/api_actions.h @@ -55,7 +55,7 @@ class APIAction : public Action { // the original int. There is a small chance that the URL translation could // be wrong, if the tab has already been navigated by the time of invocation. static void LookupTabId(const std::string& api_call, - ListValue* args, + base::ListValue* args, Profile* profile); // Print a APIAction as a regular string for debugging purposes. diff --git a/chrome/browser/extensions/activity_log/fullstream_ui_policy.cc b/chrome/browser/extensions/activity_log/fullstream_ui_policy.cc index d7c2211..ddf56c7 100644 --- a/chrome/browser/extensions/activity_log/fullstream_ui_policy.cc +++ b/chrome/browser/extensions/activity_log/fullstream_ui_policy.cc @@ -94,10 +94,10 @@ std::string FullStreamUIPolicy::GetKey(ActivityLogPolicy::KeyType key_ty) const std::string FullStreamUIPolicy::ProcessArguments( ActionType action_type, const std::string& name, - const ListValue* args) const { + const base::ListValue* args) const { std::string processed_args; if (args) { - ListValue::const_iterator it = args->begin(); + base::ListValue::const_iterator it = args->begin(); // TODO(felt,dbabic) Think about replacing the loop with a single // call to SerializeAndOmitBinaryValues. for (; it != args->end(); ++it) { @@ -126,7 +126,7 @@ void FullStreamUIPolicy::ProcessAction( const std::string& extension_id, const std::string& name, const GURL& url_param, - const ListValue* args, + const base::ListValue* args, const DictionaryValue* details) { std::string concatenated_args = ProcessArguments(action_type, name, args); const Time now = Time::Now(); diff --git a/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc b/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc index ebbfd83..2f3de4a 100644 --- a/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc +++ b/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc @@ -98,7 +98,7 @@ TEST_F(FullStreamUIPolicyTest, Construct) { .Set("manifest_version", 2)) .Build(); extension_service_->AddExtension(extension); - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); policy->ProcessAction(ActivityLogPolicy::ACTION_API, extension->id(), std::string("tabs.testMethod"), GURL(), args.get(), NULL); } @@ -113,7 +113,7 @@ TEST_F(FullStreamUIPolicyTest, LogAndFetchActions) { .Set("manifest_version", 2)) .Build(); extension_service_->AddExtension(extension); - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); GURL gurl("http://www.google.com"); // Write some API calls @@ -136,7 +136,7 @@ TEST_F(FullStreamUIPolicyTest, LogWithArguments) { .Set("manifest_version", 2)) .Build(); extension_service_->AddExtension(extension); - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Set(0, new base::StringValue("hello")); args->Set(1, new base::StringValue("world")); policy->ProcessAction(ActivityLogPolicy::ACTION_API, extension->id(), diff --git a/chrome/browser/extensions/activity_log/stream_noargs_ui_policy_unittest.cc b/chrome/browser/extensions/activity_log/stream_noargs_ui_policy_unittest.cc index 39e3235..29f45c3 100644 --- a/chrome/browser/extensions/activity_log/stream_noargs_ui_policy_unittest.cc +++ b/chrome/browser/extensions/activity_log/stream_noargs_ui_policy_unittest.cc @@ -99,7 +99,7 @@ TEST_F(StreamWithoutArgsUIPolicyTest, Construct) { .Set("manifest_version", 2)) .Build(); extension_service_->AddExtension(extension); - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); policy->ProcessAction(ActivityLogPolicy::ACTION_API, extension->id(), std::string("tabs.testMethod"), GURL(), args.get(), NULL); } @@ -115,7 +115,7 @@ TEST_F(StreamWithoutArgsUIPolicyTest, LogAndFetchActions) { .Set("manifest_version", 2)) .Build(); extension_service_->AddExtension(extension); - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); GURL gurl("http://www.google.com"); // Write some API calls @@ -140,7 +140,7 @@ TEST_F(StreamWithoutArgsUIPolicyTest, LogWithoutArguments) { .Set("manifest_version", 2)) .Build(); extension_service_->AddExtension(extension); - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Set(0, new base::StringValue("hello")); args->Set(1, new base::StringValue("world")); policy->ProcessAction(ActivityLogPolicy::ACTION_API, extension->id(), diff --git a/chrome/browser/extensions/api/alarms/alarm_manager.cc b/chrome/browser/extensions/api/alarms/alarm_manager.cc index 9f96d2c..96c81e6 100644 --- a/chrome/browser/extensions/api/alarms/alarm_manager.cc +++ b/chrome/browser/extensions/api/alarms/alarm_manager.cc @@ -41,7 +41,7 @@ class DefaultAlarmDelegate : public AlarmManager::Delegate { virtual void OnAlarm(const std::string& extension_id, const Alarm& alarm) OVERRIDE { - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(alarm.js_alarm->ToValue().release()); scoped_ptr<Event> event(new Event(kOnAlarmEvent, args.Pass())); ExtensionSystem::Get(profile_)->event_router()->DispatchEventToExtension( @@ -75,7 +75,7 @@ std::vector<Alarm> AlarmsFromValue(const base::ListValue* list) { } scoped_ptr<base::ListValue> AlarmsToValue(const std::vector<Alarm>& alarms) { - scoped_ptr<base::ListValue> list(new ListValue()); + scoped_ptr<base::ListValue> list(new base::ListValue()); for (size_t i = 0; i < alarms.size(); ++i) { scoped_ptr<base::DictionaryValue> alarm = alarms[i].js_alarm->ToValue().Pass(); @@ -234,7 +234,7 @@ void AlarmManager::WriteToStorage(const std::string& extension_id) { if (!storage) return; - scoped_ptr<Value> alarms; + scoped_ptr<base::Value> alarms; AlarmMap::iterator list = alarms_.find(extension_id); if (list != alarms_.end()) alarms.reset(AlarmsToValue(list->second).release()); diff --git a/chrome/browser/extensions/api/app_runtime/app_runtime_api.cc b/chrome/browser/extensions/api/app_runtime/app_runtime_api.cc index 52db244..d4af336 100644 --- a/chrome/browser/extensions/api/app_runtime/app_runtime_api.cc +++ b/chrome/browser/extensions/api/app_runtime/app_runtime_api.cc @@ -48,14 +48,14 @@ void DispatchOnLaunchedEventImpl(const std::string& extension_id, // static. void AppEventRouter::DispatchOnLaunchedEvent( Profile* profile, const Extension* extension) { - scoped_ptr<ListValue> arguments(new ListValue()); + scoped_ptr<base::ListValue> arguments(new base::ListValue()); DispatchOnLaunchedEventImpl(extension->id(), arguments.Pass(), profile); } // static. void AppEventRouter::DispatchOnRestartedEvent(Profile* profile, const Extension* extension) { - scoped_ptr<ListValue> arguments(new ListValue()); + scoped_ptr<base::ListValue> arguments(new base::ListValue()); scoped_ptr<Event> event(new Event(kOnRestarted, arguments.Pass())); event->restrict_to_profile = profile; extensions::ExtensionSystem::Get(profile)->event_router()-> @@ -67,15 +67,15 @@ void AppEventRouter::DispatchOnLaunchedEventWithFileEntry( Profile* profile, const Extension* extension, const std::string& handler_id, const std::string& mime_type, const extensions::app_file_handler_util::GrantedFileEntry& file_entry) { - scoped_ptr<ListValue> args(new ListValue()); - DictionaryValue* launch_data = new DictionaryValue(); + scoped_ptr<base::ListValue> args(new base::ListValue()); + base::DictionaryValue* launch_data = new base::DictionaryValue(); launch_data->SetString("id", handler_id); - DictionaryValue* launch_item = new DictionaryValue; + base::DictionaryValue* launch_item = new base::DictionaryValue; launch_item->SetString("fileSystemId", file_entry.filesystem_id); launch_item->SetString("baseName", file_entry.registered_name); launch_item->SetString("mimeType", mime_type); launch_item->SetString("entryId", file_entry.id); - ListValue* items = new ListValue; + base::ListValue* items = new base::ListValue; items->Append(launch_item); launch_data->Set("items", items); args->Append(launch_data); diff --git a/chrome/browser/extensions/api/app_window/app_window_api.cc b/chrome/browser/extensions/api/app_window/app_window_api.cc index 5655f047..74a004f 100644 --- a/chrome/browser/extensions/api/app_window/app_window_api.cc +++ b/chrome/browser/extensions/api/app_window/app_window_api.cc @@ -89,7 +89,7 @@ void SetCreateResultFromShellWindow(ShellWindow* window, result->SetBoolean("fullscreen", window->GetBaseWindow()->IsFullscreen()); result->SetBoolean("minimized", window->GetBaseWindow()->IsMinimized()); result->SetBoolean("maximized", window->GetBaseWindow()->IsMaximized()); - DictionaryValue* boundsValue = new DictionaryValue(); + base::DictionaryValue* boundsValue = new base::DictionaryValue(); gfx::Rect bounds = window->GetClientBounds(); boundsValue->SetInteger("left", bounds.x()); boundsValue->SetInteger("top", bounds.y()); diff --git a/chrome/browser/extensions/api/audio/audio_api.cc b/chrome/browser/extensions/api/audio/audio_api.cc index 0c717b1..b6c37fb 100644 --- a/chrome/browser/extensions/api/audio/audio_api.cc +++ b/chrome/browser/extensions/api/audio/audio_api.cc @@ -38,8 +38,9 @@ AudioService* AudioAPI::GetService() const { void AudioAPI::OnDeviceChanged() { if (profile_ && ExtensionSystem::Get(profile_)->event_router()) { - scoped_ptr<Event> event(new Event(event_names::kOnAudioDeviceChanged, - scoped_ptr<ListValue>(new ListValue()))); + scoped_ptr<Event> event(new Event( + event_names::kOnAudioDeviceChanged, + scoped_ptr<base::ListValue>(new base::ListValue()))); ExtensionSystem::Get(profile_)->event_router()->BroadcastEvent( event.Pass()); } diff --git a/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc b/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc index e6bb9cd..86fc7ea 100644 --- a/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc +++ b/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc @@ -53,7 +53,7 @@ bool AutotestPrivateShutdownFunction::RunImpl() { bool AutotestPrivateLoginStatusFunction::RunImpl() { DVLOG(1) << "AutotestPrivateLoginStatusFunction"; - DictionaryValue* result(new DictionaryValue); + base::DictionaryValue* result(new base::DictionaryValue); #if defined(OS_CHROMEOS) const chromeos::UserManager* user_manager = chromeos::UserManager::Get(); const bool is_screen_locked = diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_api.cc b/chrome/browser/extensions/api/bluetooth/bluetooth_api.cc index 11c91f5..dd717b7 100644 --- a/chrome/browser/extensions/api/bluetooth/bluetooth_api.cc +++ b/chrome/browser/extensions/api/bluetooth/bluetooth_api.cc @@ -229,7 +229,7 @@ bool BluetoothGetProfilesFunction::DoWork( BluetoothDevice::ServiceList service_list = device->GetServices(); - ListValue* profiles = new ListValue; + base::ListValue* profiles = new base::ListValue; for (BluetoothDevice::ServiceList::const_iterator iter = service_list.begin(); iter != service_list.end(); ++iter) { @@ -348,7 +348,7 @@ bool BluetoothGetServicesFunction::DoWork( return false; } - ListValue* services = new ListValue; + base::ListValue* services = new base::ListValue; SetResult(services); device->GetServiceRecords( @@ -469,10 +469,10 @@ BluetoothWriteFunction::~BluetoothWriteFunction() {} bool BluetoothWriteFunction::Prepare() { // TODO(bryeung): update to new-style parameter passing when ArrayBuffer // support is added - DictionaryValue* options; + base::DictionaryValue* options; EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &options)); - DictionaryValue* socket; + base::DictionaryValue* socket; EXTENSION_FUNCTION_VALIDATE(options->GetDictionary("socket", &socket)); int socket_id; @@ -506,8 +506,8 @@ void BluetoothWriteFunction::Work() { success_ = socket_->Send(drainable_io_buffer.get()); if (success_) { if (drainable_io_buffer->BytesConsumed() > 0) - SetResult( - Value::CreateIntegerValue(drainable_io_buffer->BytesConsumed())); + SetResult(base::Value::CreateIntegerValue( + drainable_io_buffer->BytesConsumed())); else results_.reset(); } else { @@ -532,7 +532,7 @@ bool BluetoothSetOutOfBandPairingDataFunction::DoWork( scoped_refptr<BluetoothAdapter> adapter) { // TODO(bryeung): update to new-style parameter passing when ArrayBuffer // support is added - DictionaryValue* options; + base::DictionaryValue* options; EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &options)); std::string address; EXTENSION_FUNCTION_VALIDATE(options->GetString("deviceAddress", &address)); @@ -545,7 +545,7 @@ bool BluetoothSetOutOfBandPairingDataFunction::DoWork( } if (options->HasKey("data")) { - DictionaryValue* data_in; + base::DictionaryValue* data_in; EXTENSION_FUNCTION_VALIDATE(options->GetDictionary("data", &data_in)); device::BluetoothOutOfBandPairingData data_out; @@ -593,7 +593,7 @@ void BluetoothGetLocalOutOfBandPairingDataFunction::ReadCallback( // TODO(bryeung): convert to bluetooth::OutOfBandPairingData // when ArrayBuffer support within objects is completed. - DictionaryValue* result = new DictionaryValue(); + base::DictionaryValue* result = new base::DictionaryValue(); result->Set("hash", hash); result->Set("randomizer", randomizer); diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc b/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc index 5915b54..5147a7b 100644 --- a/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc +++ b/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc @@ -162,7 +162,7 @@ void ExtensionBluetoothEventRouter::SetSendDiscoveryEvents(bool should_send) { void ExtensionBluetoothEventRouter::DispatchDeviceEvent( const char* event_name, const extensions::api::bluetooth::Device& device) { - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(device.ToValue().release()); scoped_ptr<Event> event(new Event(event_name, args.Pass())); ExtensionSystem::Get(profile_)->event_router()->BroadcastEvent(event.Pass()); @@ -182,7 +182,7 @@ void ExtensionBluetoothEventRouter::DispatchConnectionEvent( result_socket.profile.uuid = uuid; result_socket.id = socket_id; - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(result_socket.ToValue().release()); scoped_ptr<Event> event(new Event( extensions::event_names::kBluetoothOnConnection, args.Pass())); @@ -271,7 +271,7 @@ void ExtensionBluetoothEventRouter::DispatchAdapterStateEvent() { api::bluetooth::AdapterState state; PopulateAdapterState(*adapter_.get(), &state); - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(state.ToValue().release()); scoped_ptr<Event> event(new Event( extensions::event_names::kBluetoothOnAdapterStateChanged, diff --git a/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.cc b/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.cc index c7f06e7..67d0cf1 100644 --- a/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.cc +++ b/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.cc @@ -88,8 +88,8 @@ bool GetNodesFromVector(BookmarkModel* model, // Recursively adds a node to a list. This is by used |BookmarkNodeDataToJSON| // when the data comes from the current profile. In this case we have a // BookmarkNode since we got the data from the current profile. -void AddNodeToList(ListValue* list, const BookmarkNode& node) { - DictionaryValue* dict = new DictionaryValue(); +void AddNodeToList(base::ListValue* list, const BookmarkNode& node) { + base::DictionaryValue* dict = new base::DictionaryValue(); // Add id and parentId so we can associate the data with existing nodes on the // client side. @@ -104,7 +104,7 @@ void AddNodeToList(ListValue* list, const BookmarkNode& node) { dict->SetString(bookmark_keys::kTitleKey, node.GetTitle()); - ListValue* children = new ListValue(); + base::ListValue* children = new base::ListValue(); for (int i = 0; i < node.child_count(); ++i) AddNodeToList(children, *node.GetChild(i)); dict->Set(bookmark_keys::kChildrenKey, children); @@ -115,16 +115,16 @@ void AddNodeToList(ListValue* list, const BookmarkNode& node) { // Recursively adds an element to a list. This is used by // |BookmarkNodeDataToJSON| when the data comes from a different profile. When // the data comes from a different profile we do not have any IDs or parent IDs. -void AddElementToList(ListValue* list, +void AddElementToList(base::ListValue* list, const BookmarkNodeData::Element& element) { - DictionaryValue* dict = new DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); if (element.is_url) dict->SetString(bookmark_keys::kUrlKey, element.url.spec()); dict->SetString(bookmark_keys::kTitleKey, element.title); - ListValue* children = new ListValue(); + base::ListValue* children = new base::ListValue(); for (size_t i = 0; i < element.children.size(); ++i) AddElementToList(children, element.children[i]); dict->Set(bookmark_keys::kChildrenKey, children); @@ -134,12 +134,12 @@ void AddElementToList(ListValue* list, // Builds the JSON structure based on the BookmarksDragData. void BookmarkNodeDataToJSON(Profile* profile, const BookmarkNodeData& data, - ListValue* args) { + base::ListValue* args) { bool same_profile = data.IsFromProfile(profile); - DictionaryValue* value = new DictionaryValue(); + base::DictionaryValue* value = new base::DictionaryValue(); value->SetBoolean(manager_keys::kSameProfileKey, same_profile); - ListValue* list = new ListValue(); + base::ListValue* list = new base::ListValue(); if (same_profile) { std::vector<const BookmarkNode*> nodes = data.GetNodes(profile); for (size_t i = 0; i < nodes.size(); ++i) @@ -176,7 +176,7 @@ BookmarkManagerPrivateEventRouter::~BookmarkManagerPrivateEventRouter() { void BookmarkManagerPrivateEventRouter::DispatchEvent( const char* event_name, - scoped_ptr<ListValue> args) { + scoped_ptr<base::ListValue> args) { if (!ExtensionSystem::Get(profile_)->event_router()) return; @@ -190,7 +190,7 @@ void BookmarkManagerPrivateEventRouter::DispatchDragEvent( if (data.size() == 0) return; - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); BookmarkNodeDataToJSON(profile_, data, args.get()); DispatchEvent(event_name, args.Pass()); } @@ -323,7 +323,7 @@ bool BookmarkManagerPrivateSortChildrenFunction::RunImpl() { } bool BookmarkManagerPrivateGetStringsFunction::RunImpl() { - DictionaryValue* localized_strings = new DictionaryValue(); + base::DictionaryValue* localized_strings = new base::DictionaryValue(); localized_strings->SetString("title", l10n_util::GetStringUTF16(IDS_BOOKMARK_MANAGER_TITLE)); @@ -501,7 +501,7 @@ bool BookmarkManagerPrivateGetSubtreeFunction::RunImpl() { return false; } - scoped_ptr<ListValue> json(new ListValue()); + scoped_ptr<base::ListValue> json(new base::ListValue()); if (params->folders_only) bookmark_api_helpers::AddNodeFoldersOnly(node, json.get(), true); else diff --git a/chrome/browser/extensions/api/bookmarks/bookmark_api_helpers.cc b/chrome/browser/extensions/api/bookmarks/bookmark_api_helpers.cc index fc3a988..4b6a252 100644 --- a/chrome/browser/extensions/api/bookmarks/bookmark_api_helpers.cc +++ b/chrome/browser/extensions/api/bookmarks/bookmark_api_helpers.cc @@ -132,7 +132,8 @@ base::DictionaryValue* GetNodeDictionary(const BookmarkNode* node, for (int i = 0; i < node->child_count(); ++i) { const BookmarkNode* child = node->GetChild(i); if (child->IsVisible() && (!only_folders || child->is_folder())) { - DictionaryValue* dict = GetNodeDictionary(child, true, only_folders); + base::DictionaryValue* dict = + GetNodeDictionary(child, true, only_folders); children->Append(dict); } } diff --git a/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc b/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc index 0336c98..0662eee 100644 --- a/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc +++ b/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc @@ -148,7 +148,7 @@ BookmarkEventRouter::~BookmarkEventRouter() { void BookmarkEventRouter::DispatchEvent( const char* event_name, - scoped_ptr<ListValue> event_args) { + scoped_ptr<base::ListValue> event_args) { if (extensions::ExtensionSystem::Get(profile_)->event_router()) { extensions::ExtensionSystem::Get(profile_)->event_router()->BroadcastEvent( make_scoped_ptr(new extensions::Event(event_name, event_args.Pass()))); @@ -169,10 +169,10 @@ void BookmarkEventRouter::BookmarkNodeMoved(BookmarkModel* model, int old_index, const BookmarkNode* new_parent, int new_index) { - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); const BookmarkNode* node = new_parent->GetChild(new_index); - args->Append(new StringValue(base::Int64ToString(node->id()))); - DictionaryValue* object_args = new DictionaryValue(); + args->Append(new base::StringValue(base::Int64ToString(node->id()))); + base::DictionaryValue* object_args = new base::DictionaryValue(); object_args->SetString(keys::kParentIdKey, base::Int64ToString(new_parent->id())); object_args->SetInteger(keys::kIndexKey, new_index); @@ -187,9 +187,9 @@ void BookmarkEventRouter::BookmarkNodeMoved(BookmarkModel* model, void BookmarkEventRouter::BookmarkNodeAdded(BookmarkModel* model, const BookmarkNode* parent, int index) { - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); const BookmarkNode* node = parent->GetChild(index); - args->Append(new StringValue(base::Int64ToString(node->id()))); + args->Append(new base::StringValue(base::Int64ToString(node->id()))); scoped_ptr<BookmarkTreeNode> tree_node( bookmark_api_helpers::GetBookmarkTreeNode(node, false, false)); args->Append(tree_node->ToValue().release()); @@ -201,9 +201,9 @@ void BookmarkEventRouter::BookmarkNodeRemoved(BookmarkModel* model, const BookmarkNode* parent, int index, const BookmarkNode* node) { - scoped_ptr<ListValue> args(new ListValue()); - args->Append(new StringValue(base::Int64ToString(node->id()))); - DictionaryValue* object_args = new DictionaryValue(); + scoped_ptr<base::ListValue> args(new base::ListValue()); + args->Append(new base::StringValue(base::Int64ToString(node->id()))); + base::DictionaryValue* object_args = new base::DictionaryValue(); object_args->SetString(keys::kParentIdKey, base::Int64ToString(parent->id())); object_args->SetInteger(keys::kIndexKey, index); @@ -221,15 +221,15 @@ void BookmarkEventRouter::BookmarkAllNodesRemoved(BookmarkModel* model) { void BookmarkEventRouter::BookmarkNodeChanged(BookmarkModel* model, const BookmarkNode* node) { - scoped_ptr<ListValue> args(new ListValue()); - args->Append(new StringValue(base::Int64ToString(node->id()))); + scoped_ptr<base::ListValue> args(new base::ListValue()); + args->Append(new base::StringValue(base::Int64ToString(node->id()))); // TODO(erikkay) The only three things that BookmarkModel sends this // notification for are title, url and favicon. Since we're currently // ignoring favicon and since the notification doesn't say which one anyway, // for now we only include title and url. The ideal thing would be to change // BookmarkModel to indicate what changed. - DictionaryValue* object_args = new DictionaryValue(); + base::DictionaryValue* object_args = new base::DictionaryValue(); object_args->SetString(keys::kTitleKey, node->GetTitle()); if (node->is_url()) object_args->SetString(keys::kUrlKey, node->url().spec()); @@ -246,16 +246,17 @@ void BookmarkEventRouter::BookmarkNodeFaviconChanged(BookmarkModel* model, void BookmarkEventRouter::BookmarkNodeChildrenReordered( BookmarkModel* model, const BookmarkNode* node) { - scoped_ptr<ListValue> args(new ListValue()); - args->Append(new StringValue(base::Int64ToString(node->id()))); + scoped_ptr<base::ListValue> args(new base::ListValue()); + args->Append(new base::StringValue(base::Int64ToString(node->id()))); int childCount = node->child_count(); - ListValue* children = new ListValue(); + base::ListValue* children = new base::ListValue(); for (int i = 0; i < childCount; ++i) { const BookmarkNode* child = node->GetChild(i); - Value* child_id = new StringValue(base::Int64ToString(child->id())); + base::Value* child_id = + new base::StringValue(base::Int64ToString(child->id())); children->Append(child_id); } - DictionaryValue* reorder_info = new DictionaryValue(); + base::DictionaryValue* reorder_info = new base::DictionaryValue(); reorder_info->Set(keys::kChildIdsKey, children); args->Append(reorder_info); @@ -264,12 +265,12 @@ void BookmarkEventRouter::BookmarkNodeChildrenReordered( void BookmarkEventRouter::ExtensiveBookmarkChangesBeginning( BookmarkModel* model) { - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); DispatchEvent(keys::kOnBookmarkImportBegan, args.Pass()); } void BookmarkEventRouter::ExtensiveBookmarkChangesEnded(BookmarkModel* model) { - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); DispatchEvent(keys::kOnBookmarkImportEnded, args.Pass()); } @@ -457,7 +458,7 @@ bool BookmarksSearchFunction::RunImpl() { } // static -bool BookmarksRemoveFunction::ExtractIds(const ListValue* args, +bool BookmarksRemoveFunction::ExtractIds(const base::ListValue* args, std::list<int64>* ids, bool* invalid_id) { std::string id_string; @@ -568,7 +569,7 @@ bool BookmarksCreateFunction::RunImpl() { } // static -bool BookmarksMoveFunction::ExtractIds(const ListValue* args, +bool BookmarksMoveFunction::ExtractIds(const base::ListValue* args, std::list<int64>* ids, bool* invalid_id) { // For now, Move accepts ID parameters in the same way as an Update. @@ -642,7 +643,7 @@ bool BookmarksMoveFunction::RunImpl() { } // static -bool BookmarksUpdateFunction::ExtractIds(const ListValue* args, +bool BookmarksUpdateFunction::ExtractIds(const base::ListValue* args, std::list<int64>* ids, bool* invalid_id) { // For now, Update accepts ID parameters in the same way as an Remove. @@ -728,9 +729,9 @@ class CreateBookmarkBucketMapper : public BookmarkBucketMapper<std::string> { explicit CreateBookmarkBucketMapper(Profile* profile) : profile_(profile) {} // TODO(tim): This should share code with BookmarksCreateFunction::RunImpl, // but I can't figure out a good way to do that with all the macros. - virtual void GetBucketsForArgs(const ListValue* args, + virtual void GetBucketsForArgs(const base::ListValue* args, BucketList* buckets) OVERRIDE { - const DictionaryValue* json; + const base::DictionaryValue* json; if (!args->GetDictionary(0, &json)) return; @@ -767,7 +768,7 @@ class CreateBookmarkBucketMapper : public BookmarkBucketMapper<std::string> { class RemoveBookmarksBucketMapper : public BookmarkBucketMapper<std::string> { public: explicit RemoveBookmarksBucketMapper(Profile* profile) : profile_(profile) {} - virtual void GetBucketsForArgs(const ListValue* args, + virtual void GetBucketsForArgs(const base::ListValue* args, BucketList* buckets) OVERRIDE { typedef std::list<int64> IdList; IdList ids; @@ -802,7 +803,8 @@ template <class FunctionType> class BookmarkIdMapper : public BookmarkBucketMapper<int64> { public: typedef std::list<int64> IdList; - virtual void GetBucketsForArgs(const ListValue* args, BucketList* buckets) { + virtual void GetBucketsForArgs(const base::ListValue* args, + BucketList* buckets) { IdList ids; bool invalid_id = false; if (!FunctionType::ExtractIds(args, &ids, &invalid_id) || invalid_id) diff --git a/chrome/browser/extensions/api/browsing_data/browsing_data_api.cc b/chrome/browser/extensions/api/browsing_data/browsing_data_api.cc index 0471aed..d8a5378 100644 --- a/chrome/browser/extensions/api/browsing_data/browsing_data_api.cc +++ b/chrome/browser/extensions/api/browsing_data/browsing_data_api.cc @@ -121,7 +121,7 @@ bool BrowsingDataSettingsFunction::RunImpl() { // REMOVE_SITE_DATA in browsing_data_remover.h, the former for the unprotected // web, the latter for protected web data. There is no UI control for // extension data. - scoped_ptr<DictionaryValue> origin_types(new DictionaryValue); + scoped_ptr<base::DictionaryValue> origin_types(new base::DictionaryValue); origin_types->SetBoolean( extension_browsing_data_api_constants::kUnprotectedWebKey, prefs->GetBoolean(prefs::kDeleteCookies)); @@ -141,14 +141,14 @@ bool BrowsingDataSettingsFunction::RunImpl() { since = time.ToJsTime(); } - scoped_ptr<DictionaryValue> options(new DictionaryValue); + scoped_ptr<base::DictionaryValue> options(new base::DictionaryValue); options->Set(extension_browsing_data_api_constants::kOriginTypesKey, origin_types.release()); options->SetDouble(extension_browsing_data_api_constants::kSinceKey, since); // Fill dataToRemove and dataRemovalPermitted. - scoped_ptr<DictionaryValue> selected(new DictionaryValue); - scoped_ptr<DictionaryValue> permitted(new DictionaryValue); + scoped_ptr<base::DictionaryValue> selected(new base::DictionaryValue); + scoped_ptr<base::DictionaryValue> permitted(new base::DictionaryValue); bool delete_site_data = prefs->GetBoolean(prefs::kDeleteCookies) || prefs->GetBoolean(prefs::kDeleteHostedAppsData); @@ -195,7 +195,7 @@ bool BrowsingDataSettingsFunction::RunImpl() { extension_browsing_data_api_constants::kPasswordsKey, prefs->GetBoolean(prefs::kDeletePasswords)); - scoped_ptr<DictionaryValue> result(new DictionaryValue); + scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue); result->Set(extension_browsing_data_api_constants::kOptionsKey, options.release()); result->Set(extension_browsing_data_api_constants::kDataToRemoveKey, @@ -206,10 +206,11 @@ bool BrowsingDataSettingsFunction::RunImpl() { return true; } -void BrowsingDataSettingsFunction::SetDetails(DictionaryValue* selected_dict, - DictionaryValue* permitted_dict, - const char* data_type, - bool is_selected) { +void BrowsingDataSettingsFunction::SetDetails( + base::DictionaryValue* selected_dict, + base::DictionaryValue* permitted_dict, + const char* data_type, + bool is_selected) { bool is_permitted = IsRemovalPermitted(MaskForKey(data_type), profile()->GetPrefs()); selected_dict->SetBoolean(data_type, is_selected && is_permitted); @@ -228,7 +229,7 @@ bool BrowsingDataRemoveFunction::RunImpl() { DCHECK(profile()); // Grab the initial |options| parameter, and parse out the arguments. - DictionaryValue* options; + base::DictionaryValue* options; EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &options)); DCHECK(options); @@ -311,7 +312,7 @@ int BrowsingDataRemoveFunction::ParseOriginSetMask( // UNPROTECTED_WEB if the developer doesn't specify anything. int mask = BrowsingDataHelper::UNPROTECTED_WEB; - const DictionaryValue* d = NULL; + const base::DictionaryValue* d = NULL; if (options.HasKey(extension_browsing_data_api_constants::kOriginTypesKey)) { EXTENSION_FUNCTION_VALIDATE(options.GetDictionary( extension_browsing_data_api_constants::kOriginTypesKey, &d)); @@ -358,7 +359,7 @@ int RemoveBrowsingDataFunction::GetRemovalMask() { int removal_mask = 0; - for (DictionaryValue::Iterator i(*data_to_remove); + for (base::DictionaryValue::Iterator i(*data_to_remove); !i.IsAtEnd(); i.Advance()) { bool selected = false; diff --git a/chrome/browser/extensions/api/browsing_data/browsing_data_api.h b/chrome/browser/extensions/api/browsing_data/browsing_data_api.h index cefc547..f0a4f79 100644 --- a/chrome/browser/extensions/api/browsing_data/browsing_data_api.h +++ b/chrome/browser/extensions/api/browsing_data/browsing_data_api.h @@ -67,8 +67,8 @@ class BrowsingDataSettingsFunction : public SyncExtensionFunction { // indicating whether the data type is both selected and permitted to be // removed; and a value in the |permitted_dict| with the |data_type| as a // key, indicating only whether the data type is permitted to be removed. - void SetDetails(DictionaryValue* selected_dict, - DictionaryValue* permitted_dict, + void SetDetails(base::DictionaryValue* selected_dict, + base::DictionaryValue* permitted_dict, const char* data_type, bool is_selected); }; diff --git a/chrome/browser/extensions/api/browsing_data/browsing_data_test.cc b/chrome/browser/extensions/api/browsing_data/browsing_data_test.cc index bdfd918..376a3f1 100644 --- a/chrome/browser/extensions/api/browsing_data/browsing_data_test.cc +++ b/chrome/browser/extensions/api/browsing_data/browsing_data_test.cc @@ -77,7 +77,8 @@ class ExtensionBrowsingDataTest : public InProcessBrowserTest, details).ptr())); } - int GetAsMask(const DictionaryValue* dict, std::string path, int mask_value) { + int GetAsMask(const base::DictionaryValue* dict, std::string path, + int mask_value) { bool result; EXPECT_TRUE(dict->GetBoolean(path, &result)) << "for " << path; return result ? mask_value : 0; diff --git a/chrome/browser/extensions/api/commands/command_service.cc b/chrome/browser/extensions/api/commands/command_service.cc index a14a38b..d5d75f3 100644 --- a/chrome/browser/extensions/api/commands/command_service.cc +++ b/chrome/browser/extensions/api/commands/command_service.cc @@ -43,7 +43,7 @@ std::string GetPlatformKeybindingKeyForAccelerator( void SetInitialBindingsHaveBeenAssigned( ExtensionPrefs* prefs, const std::string& extension_id) { prefs->UpdateExtensionPref(extension_id, kInitialBindingsHaveBeenAssigned, - Value::CreateBooleanValue(true)); + base::Value::CreateBooleanValue(true)); } bool InitialBindingsHaveBeenAssigned( @@ -165,14 +165,14 @@ bool CommandService::AddKeybindingPref( DictionaryPrefUpdate updater(profile_->GetPrefs(), prefs::kExtensionCommands); - DictionaryValue* bindings = updater.Get(); + base::DictionaryValue* bindings = updater.Get(); std::string key = GetPlatformKeybindingKeyForAccelerator(accelerator); if (!allow_overrides && bindings->HasKey(key)) return false; // Already taken. - DictionaryValue* keybinding = new DictionaryValue(); + base::DictionaryValue* keybinding = new base::DictionaryValue(); keybinding->SetString(kExtension, extension_id); keybinding->SetString(kCommandName, command_name); @@ -222,10 +222,11 @@ void CommandService::UpdateKeybindingPrefs(const std::string& extension_id, ui::Accelerator CommandService::FindShortcutForCommand( const std::string& extension_id, const std::string& command) { - const DictionaryValue* bindings = + const base::DictionaryValue* bindings = profile_->GetPrefs()->GetDictionary(prefs::kExtensionCommands); - for (DictionaryValue::Iterator it(*bindings); !it.IsAtEnd(); it.Advance()) { - const DictionaryValue* item = NULL; + for (base::DictionaryValue::Iterator it(*bindings); !it.IsAtEnd(); + it.Advance()) { + const base::DictionaryValue* item = NULL; it.value().GetAsDictionary(&item); std::string extension; @@ -312,12 +313,13 @@ void CommandService::RemoveKeybindingPrefs(const std::string& extension_id, const std::string& command_name) { DictionaryPrefUpdate updater(profile_->GetPrefs(), prefs::kExtensionCommands); - DictionaryValue* bindings = updater.Get(); + base::DictionaryValue* bindings = updater.Get(); typedef std::vector<std::string> KeysToRemove; KeysToRemove keys_to_remove; - for (DictionaryValue::Iterator it(*bindings); !it.IsAtEnd(); it.Advance()) { - const DictionaryValue* item = NULL; + for (base::DictionaryValue::Iterator it(*bindings); !it.IsAtEnd(); + it.Advance()) { + const base::DictionaryValue* item = NULL; it.value().GetAsDictionary(&item); std::string extension; diff --git a/chrome/browser/extensions/api/commands/command_service_new.cc b/chrome/browser/extensions/api/commands/command_service_new.cc index 98cbe6d..4143d6a 100644 --- a/chrome/browser/extensions/api/commands/command_service_new.cc +++ b/chrome/browser/extensions/api/commands/command_service_new.cc @@ -141,14 +141,14 @@ bool CommandService::AddKeybindingPref( DictionaryPrefUpdate updater(profile_->GetPrefs(), prefs::kExtensionCommands); - DictionaryValue* bindings = updater.Get(); + base::DictionaryValue* bindings = updater.Get(); std::string key = GetPlatformKeybindingKeyForAccelerator(accelerator); if (!allow_overrides && bindings->HasKey(key)) return false; // Already taken. - DictionaryValue* keybinding = new DictionaryValue(); + base::DictionaryValue* keybinding = new base::DictionaryValue(); keybinding->SetString(kExtension, extension_id); keybinding->SetString(kCommandName, command_name); @@ -198,10 +198,11 @@ void CommandService::UpdateKeybindingPrefs(const std::string& extension_id, ui::Accelerator CommandService::FindShortcutForCommand( const std::string& extension_id, const std::string& command) { - const DictionaryValue* bindings = + const base::DictionaryValue* bindings = profile_->GetPrefs()->GetDictionary(prefs::kExtensionCommands); - for (DictionaryValue::Iterator it(*bindings); !it.IsAtEnd(); it.Advance()) { - const DictionaryValue* item = NULL; + for (base::DictionaryValue::Iterator it(*bindings); !it.IsAtEnd(); + it.Advance()) { + const base::DictionaryValue* item = NULL; it.value().GetAsDictionary(&item); std::string extension; @@ -269,12 +270,13 @@ void CommandService::RemoveKeybindingPrefs(const std::string& extension_id, const std::string& command_name) { DictionaryPrefUpdate updater(profile_->GetPrefs(), prefs::kExtensionCommands); - DictionaryValue* bindings = updater.Get(); + base::DictionaryValue* bindings = updater.Get(); typedef std::vector<std::string> KeysToRemove; KeysToRemove keys_to_remove; - for (DictionaryValue::Iterator it(*bindings); !it.IsAtEnd(); it.Advance()) { - const DictionaryValue* item = NULL; + for (base::DictionaryValue::Iterator it(*bindings); !it.IsAtEnd(); + it.Advance()) { + const base::DictionaryValue* item = NULL; it.value().GetAsDictionary(&item); std::string extension; diff --git a/chrome/browser/extensions/api/commands/commands.cc b/chrome/browser/extensions/api/commands/commands.cc index ebe8bad..1bfe054 100644 --- a/chrome/browser/extensions/api/commands/commands.cc +++ b/chrome/browser/extensions/api/commands/commands.cc @@ -10,7 +10,7 @@ namespace { base::DictionaryValue* CreateCommandValue( const extensions::Command& command, bool active) { - DictionaryValue* result = new DictionaryValue(); + base::DictionaryValue* result = new base::DictionaryValue(); result->SetString("name", command.command_name()); result->SetString("description", command.description()); result->SetString("shortcut", @@ -22,7 +22,7 @@ base::DictionaryValue* CreateCommandValue( } // namespace bool GetAllCommandsFunction::RunImpl() { - ListValue* command_list = new ListValue(); + base::ListValue* command_list = new base::ListValue(); extensions::CommandService* command_service = extensions::CommandService::Get(profile_); diff --git a/chrome/browser/extensions/api/content_settings/content_settings_api.cc b/chrome/browser/extensions/api/content_settings/content_settings_api.cc index 1f07c04..35223b8 100644 --- a/chrome/browser/extensions/api/content_settings/content_settings_api.cc +++ b/chrome/browser/extensions/api/content_settings/content_settings_api.cc @@ -42,7 +42,8 @@ namespace { const std::vector<webkit::WebPluginInfo>* g_testing_plugins_; -bool RemoveContentType(ListValue* args, ContentSettingsType* content_type) { +bool RemoveContentType(base::ListValue* args, + ContentSettingsType* content_type) { std::string content_type_str; if (!args->GetString(0, &content_type_str)) return false; @@ -160,7 +161,7 @@ bool ContentSettingsContentSettingGetFunction::RunImpl() { resource_identifier); } - DictionaryValue* result = new DictionaryValue(); + base::DictionaryValue* result = new base::DictionaryValue(); result->SetString(keys::kContentSettingKey, helpers::ContentSettingToString(setting)); @@ -274,7 +275,7 @@ void ContentSettingsContentSettingGetResourceIdentifiersFunction::OnGotPlugins( const std::vector<webkit::WebPluginInfo>& plugins) { PluginFinder* finder = PluginFinder::GetInstance(); std::set<std::string> group_identifiers; - ListValue* list = new ListValue(); + base::ListValue* list = new base::ListValue(); for (std::vector<webkit::WebPluginInfo>::const_iterator it = plugins.begin(); it != plugins.end(); ++it) { scoped_ptr<PluginMetadata> plugin_metadata(finder->GetPluginMetadata(*it)); @@ -283,7 +284,7 @@ void ContentSettingsContentSettingGetResourceIdentifiersFunction::OnGotPlugins( continue; group_identifiers.insert(group_identifier); - DictionaryValue* dict = new DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetString(keys::kIdKey, group_identifier); dict->SetString(keys::kDescriptionKey, plugin_metadata->name()); list->Append(dict); diff --git a/chrome/browser/extensions/api/context_menus/context_menus_api.cc b/chrome/browser/extensions/api/context_menus/context_menus_api.cc index df0e743..de30534 100644 --- a/chrome/browser/extensions/api/context_menus/context_menus_api.cc +++ b/chrome/browser/extensions/api/context_menus/context_menus_api.cc @@ -166,7 +166,7 @@ bool ContextMenusCreateFunction::RunImpl() { } // The Generated Id is added by context_menus_custom_bindings.js. - DictionaryValue* properties = NULL; + base::DictionaryValue* properties = NULL; EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &properties)); EXTENSION_FUNCTION_VALIDATE(properties->GetInteger(kGeneratedIdKey, &id.uid)); diff --git a/chrome/browser/extensions/api/cookies/cookies_api.cc b/chrome/browser/extensions/api/cookies/cookies_api.cc index 72fc053..c9d6293 100644 --- a/chrome/browser/extensions/api/cookies/cookies_api.cc +++ b/chrome/browser/extensions/api/cookies/cookies_api.cc @@ -82,8 +82,8 @@ void CookiesEventRouter::Observe( void CookiesEventRouter::CookieChanged( Profile* profile, ChromeCookieDetails* details) { - scoped_ptr<ListValue> args(new ListValue()); - DictionaryValue* dict = new DictionaryValue(); + scoped_ptr<base::ListValue> args(new base::ListValue()); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetBoolean(keys::kRemovedKey, details->removed); scoped_ptr<Cookie> cookie( @@ -129,7 +129,7 @@ void CookiesEventRouter::CookieChanged( void CookiesEventRouter::DispatchEvent( Profile* profile, const std::string& event_name, - scoped_ptr<ListValue> event_args, + scoped_ptr<base::ListValue> event_args, GURL& cookie_domain) { EventRouter* router = profile ? extensions::ExtensionSystem::Get(profile)->event_router() : NULL; @@ -511,13 +511,13 @@ void CookiesRemoveFunction::RespondOnUIThread() { bool CookiesGetAllCookieStoresFunction::RunImpl() { Profile* original_profile = profile(); DCHECK(original_profile); - scoped_ptr<ListValue> original_tab_ids(new ListValue()); + scoped_ptr<base::ListValue> original_tab_ids(new base::ListValue()); Profile* incognito_profile = NULL; - scoped_ptr<ListValue> incognito_tab_ids; + scoped_ptr<base::ListValue> incognito_tab_ids; if (include_incognito() && profile()->HasOffTheRecordProfile()) { incognito_profile = profile()->GetOffTheRecordProfile(); if (incognito_profile) - incognito_tab_ids.reset(new ListValue()); + incognito_tab_ids.reset(new base::ListValue()); } DCHECK(original_profile != incognito_profile); diff --git a/chrome/browser/extensions/api/cookies/cookies_helpers.cc b/chrome/browser/extensions/api/cookies/cookies_helpers.cc index fe1f01f..c151c92 100644 --- a/chrome/browser/extensions/api/cookies/cookies_helpers.cc +++ b/chrome/browser/extensions/api/cookies/cookies_helpers.cc @@ -90,10 +90,10 @@ scoped_ptr<Cookie> CreateCookie( } scoped_ptr<CookieStore> CreateCookieStore(Profile* profile, - ListValue* tab_ids) { + base::ListValue* tab_ids) { DCHECK(profile); DCHECK(tab_ids); - DictionaryValue dict; + base::DictionaryValue dict; dict.SetString(keys::kIdKey, GetStoreIdFromProfile(profile)); dict.Set(keys::kTabIdsKey, tab_ids); @@ -146,7 +146,7 @@ void AppendMatchingCookiesToVector(const net::CookieList& all_cookies, } } -void AppendToTabIdList(Browser* browser, ListValue* tab_ids) { +void AppendToTabIdList(Browser* browser, base::ListValue* tab_ids) { DCHECK(browser); DCHECK(tab_ids); TabStripModel* tab_strip = browser->tab_strip_model(); diff --git a/chrome/browser/extensions/api/cookies/cookies_unittest.cc b/chrome/browser/extensions/api/cookies/cookies_unittest.cc index 172ed31..f5f1523 100644 --- a/chrome/browser/extensions/api/cookies/cookies_unittest.cc +++ b/chrome/browser/extensions/api/cookies/cookies_unittest.cc @@ -143,7 +143,7 @@ TEST_F(ExtensionCookiesTest, ExtensionTypeCreation) { EXPECT_EQ(10000, *cookie2->expiration_date); TestingProfile profile; - ListValue* tab_ids_list = new ListValue(); + base::ListValue* tab_ids_list = new base::ListValue(); std::vector<int> tab_ids; scoped_ptr<CookieStore> cookie_store( cookies_helpers::CreateCookieStore(&profile, tab_ids_list)); @@ -168,7 +168,7 @@ TEST_F(ExtensionCookiesTest, GetURLFromCanonicalCookie) { } TEST_F(ExtensionCookiesTest, EmptyDictionary) { - DictionaryValue dict; + base::DictionaryValue dict; GetAll::Params::Details details; bool rv = GetAll::Params::Details::Populate(dict, &details); ASSERT_TRUE(rv); @@ -190,8 +190,8 @@ TEST_F(ExtensionCookiesTest, DomainMatching) { for (size_t i = 0; i < arraysize(tests); ++i) { // Build up the Params struct. - ListValue args; - DictionaryValue* dict = new DictionaryValue(); + base::ListValue args; + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetString(keys::kDomainKey, std::string(tests[i].filter)); args.Set(0, dict); scoped_ptr<GetAll::Params> params(GetAll::Params::Create(args)); diff --git a/chrome/browser/extensions/api/debugger/debugger_api.cc b/chrome/browser/extensions/api/debugger/debugger_api.cc index 2ae2b7f..0909b3a 100644 --- a/chrome/browser/extensions/api/debugger/debugger_api.cc +++ b/chrome/browser/extensions/api/debugger/debugger_api.cc @@ -454,7 +454,7 @@ void ExtensionDevToolsClientHost::SendMessageToBackend( DebuggerSendCommandFunction* function, const std::string& method, SendCommand::Params::CommandParams* command_params) { - DictionaryValue protocol_request; + base::DictionaryValue protocol_request; int request_id = ++last_request_id_; pending_requests_[request_id] = function; protocol_request.SetInteger("id", request_id); @@ -517,7 +517,8 @@ void ExtensionDevToolsClientHost::DispatchOnInspectorFrontend( scoped_ptr<Value> result(base::JSONReader::Read(message)); if (!result->IsType(Value::TYPE_DICTIONARY)) return; - DictionaryValue* dictionary = static_cast<DictionaryValue*>(result.get()); + base::DictionaryValue* dictionary = + static_cast<base::DictionaryValue*>(result.get()); int id; if (!dictionary->GetInteger("id", &id)) { @@ -526,7 +527,7 @@ void ExtensionDevToolsClientHost::DispatchOnInspectorFrontend( return; OnEvent::Params params; - DictionaryValue* params_value; + base::DictionaryValue* params_value; if (dictionary->GetDictionary("params", ¶ms_value)) params.additional_properties.Swap(params_value); @@ -715,7 +716,7 @@ bool DebuggerSendCommandFunction::RunImpl() { } void DebuggerSendCommandFunction::SendResponseBody( - DictionaryValue* response) { + base::DictionaryValue* response) { Value* error_body; if (response->Get("error", &error_body)) { base::JSONWriter::Write(error_body, &error_); @@ -723,7 +724,7 @@ void DebuggerSendCommandFunction::SendResponseBody( return; } - DictionaryValue* result_body; + base::DictionaryValue* result_body; SendCommand::Results::Result result; if (response->GetDictionary("result", &result_body)) result.additional_properties.Swap(result_body); diff --git a/chrome/browser/extensions/api/declarative/rules_registry_with_cache.cc b/chrome/browser/extensions/api/declarative/rules_registry_with_cache.cc index 28096a1..888e2a7 100644 --- a/chrome/browser/extensions/api/declarative/rules_registry_with_cache.cc +++ b/chrome/browser/extensions/api/declarative/rules_registry_with_cache.cc @@ -332,7 +332,7 @@ void RulesRegistryWithCache::RuleStorageOnUI::WriteToStorage( if (!profile_) return; - const ListValue* rules = NULL; + const base::ListValue* rules = NULL; CHECK(value->GetAsList(&rules)); bool rules_stored_previously = GetDeclarativeRulesStored(extension_id); bool store_rules = !rules->empty(); diff --git a/chrome/browser/extensions/api/declarative/rules_registry_with_cache_unittest.cc b/chrome/browser/extensions/api/declarative/rules_registry_with_cache_unittest.cc index cf02cef..49bdf21 100644 --- a/chrome/browser/extensions/api/declarative/rules_registry_with_cache_unittest.cc +++ b/chrome/browser/extensions/api/declarative/rules_registry_with_cache_unittest.cc @@ -234,7 +234,7 @@ TEST_F(RulesRegistryWithCacheTest, DeclarativeRulesStored) { // 2. Test writing behavior. int write_count = store->write_count(); - scoped_ptr<base::ListValue> value(new ListValue); + scoped_ptr<base::ListValue> value(new base::ListValue); value->AppendBoolean(true); ui_part->WriteToStorage(extension_id, value.PassAs<base::Value>()); EXPECT_TRUE(ui_part->GetDeclarativeRulesStored(extension_id)); @@ -242,7 +242,7 @@ TEST_F(RulesRegistryWithCacheTest, DeclarativeRulesStored) { EXPECT_EQ(write_count + 1, store->write_count()); write_count = store->write_count(); - value.reset(new ListValue); + value.reset(new base::ListValue); ui_part->WriteToStorage(extension_id, value.PassAs<base::Value>()); EXPECT_FALSE(ui_part->GetDeclarativeRulesStored(extension_id)); message_loop_.RunUntilIdle(); @@ -250,7 +250,7 @@ TEST_F(RulesRegistryWithCacheTest, DeclarativeRulesStored) { EXPECT_EQ(write_count + 1, store->write_count()); write_count = store->write_count(); - value.reset(new ListValue); + value.reset(new base::ListValue); ui_part->WriteToStorage(extension_id, value.PassAs<base::Value>()); EXPECT_FALSE(ui_part->GetDeclarativeRulesStored(extension_id)); message_loop_.RunUntilIdle(); diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_action.cc b/chrome/browser/extensions/api/declarative_webrequest/webrequest_action.cc index 1d267a8..fb38c55 100644 --- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_action.cc +++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_action.cc @@ -46,7 +46,7 @@ const char kEmptyDocumentUrl[] = "data:text/html,"; } while (0) scoped_ptr<helpers::RequestCookie> ParseRequestCookie( - const DictionaryValue* dict) { + const base::DictionaryValue* dict) { scoped_ptr<helpers::RequestCookie> result(new helpers::RequestCookie); std::string tmp; if (dict->GetString(keys::kNameKey, &tmp)) @@ -56,7 +56,7 @@ scoped_ptr<helpers::RequestCookie> ParseRequestCookie( return result.Pass(); } -void ParseResponseCookieImpl(const DictionaryValue* dict, +void ParseResponseCookieImpl(const base::DictionaryValue* dict, helpers::ResponseCookie* cookie) { std::string string_tmp; int int_tmp = 0; @@ -80,14 +80,14 @@ void ParseResponseCookieImpl(const DictionaryValue* dict, } scoped_ptr<helpers::ResponseCookie> ParseResponseCookie( - const DictionaryValue* dict) { + const base::DictionaryValue* dict) { scoped_ptr<helpers::ResponseCookie> result(new helpers::ResponseCookie); ParseResponseCookieImpl(dict, result.get()); return result.Pass(); } scoped_ptr<helpers::FilterResponseCookie> ParseFilterResponseCookie( - const DictionaryValue* dict) { + const base::DictionaryValue* dict) { scoped_ptr<helpers::FilterResponseCookie> result( new helpers::FilterResponseCookie); ParseResponseCookieImpl(dict, result.get()); @@ -266,18 +266,18 @@ scoped_refptr<const WebRequestAction> CreateRequestCookieAction( // Get filter. if (modification->type == helpers::EDIT || modification->type == helpers::REMOVE) { - const DictionaryValue* filter = NULL; + const base::DictionaryValue* filter = NULL; INPUT_FORMAT_VALIDATE(dict->GetDictionary(keys::kFilterKey, &filter)); modification->filter = ParseRequestCookie(filter); } // Get new value. if (modification->type == helpers::ADD) { - const DictionaryValue* value = NULL; + const base::DictionaryValue* value = NULL; INPUT_FORMAT_VALIDATE(dict->GetDictionary(keys::kCookieKey, &value)); modification->modification = ParseRequestCookie(value); } else if (modification->type == helpers::EDIT) { - const DictionaryValue* value = NULL; + const base::DictionaryValue* value = NULL; INPUT_FORMAT_VALIDATE(dict->GetDictionary(keys::kModificationKey, &value)); modification->modification = ParseRequestCookie(value); } @@ -312,18 +312,18 @@ scoped_refptr<const WebRequestAction> CreateResponseCookieAction( // Get filter. if (modification->type == helpers::EDIT || modification->type == helpers::REMOVE) { - const DictionaryValue* filter = NULL; + const base::DictionaryValue* filter = NULL; INPUT_FORMAT_VALIDATE(dict->GetDictionary(keys::kFilterKey, &filter)); modification->filter = ParseFilterResponseCookie(filter); } // Get new value. if (modification->type == helpers::ADD) { - const DictionaryValue* value = NULL; + const base::DictionaryValue* value = NULL; INPUT_FORMAT_VALIDATE(dict->GetDictionary(keys::kCookieKey, &value)); modification->modification = ParseResponseCookie(value); } else if (modification->type == helpers::EDIT) { - const DictionaryValue* value = NULL; + const base::DictionaryValue* value = NULL; INPUT_FORMAT_VALIDATE(dict->GetDictionary(keys::kModificationKey, &value)); modification->modification = ParseResponseCookie(value); } diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc b/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc index d80baf7..5452e18 100644 --- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc +++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc @@ -93,28 +93,28 @@ class WebRequestRulesRegistryTest : public testing::Test { // Returns a rule that roughly matches http://*.example.com and // https://www.example.com and cancels it linked_ptr<RulesRegistry::Rule> CreateRule1() { - ListValue* scheme_http = new ListValue(); + base::ListValue* scheme_http = new base::ListValue(); scheme_http->Append(Value::CreateStringValue("http")); - DictionaryValue* http_condition_dict = new DictionaryValue(); + base::DictionaryValue* http_condition_dict = new base::DictionaryValue(); http_condition_dict->Set(keys2::kSchemesKey, scheme_http); http_condition_dict->SetString(keys2::kHostSuffixKey, "example.com"); - DictionaryValue http_condition_url_filter; + base::DictionaryValue http_condition_url_filter; http_condition_url_filter.Set(keys::kUrlKey, http_condition_dict); http_condition_url_filter.SetString(keys::kInstanceTypeKey, keys::kRequestMatcherType); - ListValue* scheme_https = new ListValue(); + base::ListValue* scheme_https = new base::ListValue(); scheme_http->Append(Value::CreateStringValue("https")); - DictionaryValue* https_condition_dict = new DictionaryValue(); + base::DictionaryValue* https_condition_dict = new base::DictionaryValue(); https_condition_dict->Set(keys2::kSchemesKey, scheme_https); https_condition_dict->SetString(keys2::kHostSuffixKey, "example.com"); https_condition_dict->SetString(keys2::kHostPrefixKey, "www"); - DictionaryValue https_condition_url_filter; + base::DictionaryValue https_condition_url_filter; https_condition_url_filter.Set(keys::kUrlKey, https_condition_dict); https_condition_url_filter.SetString(keys::kInstanceTypeKey, keys::kRequestMatcherType); - DictionaryValue action_dict; + base::DictionaryValue action_dict; action_dict.SetString(keys::kInstanceTypeKey, keys::kCancelRequestType); linked_ptr<RulesRegistry::Rule> rule(new RulesRegistry::Rule); @@ -130,10 +130,10 @@ class WebRequestRulesRegistryTest : public testing::Test { // Returns a rule that matches anything and cancels it. linked_ptr<RulesRegistry::Rule> CreateRule2() { - DictionaryValue condition_dict; + base::DictionaryValue condition_dict; condition_dict.SetString(keys::kInstanceTypeKey, keys::kRequestMatcherType); - DictionaryValue action_dict; + base::DictionaryValue action_dict; action_dict.SetString(keys::kInstanceTypeKey, keys::kCancelRequestType); linked_ptr<RulesRegistry::Rule> rule(new RulesRegistry::Rule); @@ -147,10 +147,10 @@ class WebRequestRulesRegistryTest : public testing::Test { linked_ptr<RulesRegistry::Rule> CreateRedirectRule( const std::string& destination) { - DictionaryValue condition_dict; + base::DictionaryValue condition_dict; condition_dict.SetString(keys::kInstanceTypeKey, keys::kRequestMatcherType); - DictionaryValue action_dict; + base::DictionaryValue action_dict; action_dict.SetString(keys::kInstanceTypeKey, keys::kRedirectRequestType); action_dict.SetString(keys::kRedirectUrlKey, destination); @@ -166,13 +166,13 @@ class WebRequestRulesRegistryTest : public testing::Test { // Create a rule to ignore all other rules for a destination that // contains index.html. linked_ptr<RulesRegistry::Rule> CreateIgnoreRule() { - DictionaryValue condition_dict; - DictionaryValue* http_condition_dict = new DictionaryValue(); + base::DictionaryValue condition_dict; + base::DictionaryValue* http_condition_dict = new base::DictionaryValue(); http_condition_dict->SetString(keys2::kPathContainsKey, "index.html"); condition_dict.SetString(keys::kInstanceTypeKey, keys::kRequestMatcherType); condition_dict.Set(keys::kUrlKey, http_condition_dict); - DictionaryValue action_dict; + base::DictionaryValue action_dict; action_dict.SetString(keys::kInstanceTypeKey, keys::kIgnoreRulesType); action_dict.SetInteger(keys::kLowerPriorityThanKey, 150); @@ -204,7 +204,7 @@ class WebRequestRulesRegistryTest : public testing::Test { linked_ptr<RulesRegistry::Rule> CreateCancellingRule( const char* rule_id, const std::vector<const std::string*>& attributes) { - DictionaryValue action_dict; + base::DictionaryValue action_dict; action_dict.SetString(keys::kInstanceTypeKey, keys::kCancelRequestType); linked_ptr<RulesRegistry::Rule> rule(new RulesRegistry::Rule); diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc index 278d1d8..bdefef0 100644 --- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc +++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc @@ -1063,7 +1063,7 @@ void DeveloperPrivateChoosePathFunction::FileSelectionCanceled() { DeveloperPrivateChoosePathFunction::~DeveloperPrivateChoosePathFunction() {} bool DeveloperPrivateGetStringsFunction::RunImpl() { - DictionaryValue* dict = new DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); SetResult(dict); webui::SetFontAndTextDirection(dict); diff --git a/chrome/browser/extensions/api/dns/dns_apitest.cc b/chrome/browser/extensions/api/dns/dns_apitest.cc index 14c005f..ccd9602 100644 --- a/chrome/browser/extensions/api/dns/dns_apitest.cc +++ b/chrome/browser/extensions/api/dns/dns_apitest.cc @@ -63,7 +63,8 @@ IN_PROC_BROWSER_TEST_F(DnsApiTest, DnsResolveIPLiteral) { scoped_ptr<base::Value> result(RunFunctionAndReturnSingleResult( resolve_function.get(), "[\"127.0.0.1\"]", browser())); ASSERT_EQ(base::Value::TYPE_DICTIONARY, result->GetType()); - DictionaryValue *value = static_cast<DictionaryValue*>(result.get()); + base::DictionaryValue *value = + static_cast<base::DictionaryValue*>(result.get()); int resultCode; EXPECT_TRUE(value->GetInteger("resultCode", &resultCode)); @@ -89,7 +90,8 @@ IN_PROC_BROWSER_TEST_F(DnsApiTest, DnsResolveHostname) { RunFunctionAndReturnSingleResult(resolve_function.get(), function_arguments, browser())); ASSERT_EQ(base::Value::TYPE_DICTIONARY, result->GetType()); - DictionaryValue *value = static_cast<DictionaryValue*>(result.get()); + base::DictionaryValue *value = + static_cast<base::DictionaryValue*>(result.get()); int resultCode; EXPECT_TRUE(value->GetInteger("resultCode", &resultCode)); diff --git a/chrome/browser/extensions/api/downloads/downloads_api.cc b/chrome/browser/extensions/api/downloads/downloads_api.cc index bdd3ff4..7273640 100644 --- a/chrome/browser/extensions/api/downloads/downloads_api.cc +++ b/chrome/browser/extensions/api/downloads/downloads_api.cc @@ -787,7 +787,7 @@ void OnDeterminingFilenameWillDispatchCallback( ExtensionDownloadsEventRouterData* data, Profile* profile, const extensions::Extension* extension, - ListValue* event_args) { + base::ListValue* event_args) { *any_determiners = true; base::Time installed = extensions::ExtensionSystem::Get( profile)->extension_service()->extension_prefs()-> diff --git a/chrome/browser/extensions/api/execute_code_function.cc b/chrome/browser/extensions/api/execute_code_function.cc index 0665657..d1a0f83 100644 --- a/chrome/browser/extensions/api/execute_code_function.cc +++ b/chrome/browser/extensions/api/execute_code_function.cc @@ -172,7 +172,7 @@ void ExecuteCodeFunction::OnExecuteCodeFinished( const std::string& error, int32 on_page_id, const GURL& on_url, - const ListValue& result) { + const base::ListValue& result) { if (!error.empty()) SetError(error); diff --git a/chrome/browser/extensions/api/execute_code_function.h b/chrome/browser/extensions/api/execute_code_function.h index 2e6dbb9..b3de979 100644 --- a/chrome/browser/extensions/api/execute_code_function.h +++ b/chrome/browser/extensions/api/execute_code_function.h @@ -36,7 +36,7 @@ class ExecuteCodeFunction : public AsyncExtensionFunction { virtual void OnExecuteCodeFinished(const std::string& error, int32 on_page_id, const GURL& on_url, - const ListValue& result); + const base::ListValue& result); // The injection details. scoped_ptr<api::tabs::InjectDetails> details_; diff --git a/chrome/browser/extensions/api/extension_action/extension_action_api.cc b/chrome/browser/extensions/api/extension_action/extension_action_api.cc index 1047994..5102b6e 100644 --- a/chrome/browser/extensions/api/extension_action/extension_action_api.cc +++ b/chrome/browser/extensions/api/extension_action/extension_action_api.cc @@ -150,7 +150,7 @@ void SetDefaultsFromValue(const base::DictionaryValue* dict, // disk. scoped_ptr<base::DictionaryValue> DefaultsToValue(ExtensionAction* action) { const int kTabId = ExtensionAction::kDefaultTabId; - scoped_ptr<base::DictionaryValue> dict(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); dict->SetString(kPopupUrlStorageKey, action->GetPopupUrl(kTabId).spec()); dict->SetString(kTitleStorageKey, action->GetTitle(kTabId)); @@ -631,7 +631,7 @@ bool ExtensionActionSetBadgeBackgroundColorFunction::RunExtensionAction() { EXTENSION_FUNCTION_VALIDATE(details_->Get("color", &color_value)); SkColor color = 0; if (color_value->IsType(Value::TYPE_LIST)) { - ListValue* list = NULL; + base::ListValue* list = NULL; EXTENSION_FUNCTION_VALIDATE(details_->GetList("color", &list)); EXTENSION_FUNCTION_VALIDATE(list->GetSize() == 4); @@ -671,7 +671,7 @@ bool ExtensionActionGetBadgeTextFunction::RunExtensionAction() { } bool ExtensionActionGetBadgeBackgroundColorFunction::RunExtensionAction() { - ListValue* list = new ListValue(); + base::ListValue* list = new base::ListValue(); SkColor color = extension_action_->GetBadgeBackgroundColor(tab_id_); list->Append(Value::CreateIntegerValue(SkColorGetR(color))); list->Append(Value::CreateIntegerValue(SkColorGetG(color))); diff --git a/chrome/browser/extensions/api/file_system/file_system_api.cc b/chrome/browser/extensions/api/file_system/file_system_api.cc index a2a5182..60bedd3 100644 --- a/chrome/browser/extensions/api/file_system/file_system_api.cc +++ b/chrome/browser/extensions/api/file_system/file_system_api.cc @@ -405,7 +405,7 @@ void FileSystemEntryFunction::RegisterFileSystemAndSendResponseWithIdOverride( GetExtension()->id(), render_view_host_->GetProcess()->GetID(), path, writable); - DictionaryValue* dict = new DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); SetResult(dict); dict->SetString("fileSystemId", file_entry.filesystem_id); dict->SetString("baseName", file_entry.registered_name); diff --git a/chrome/browser/extensions/api/font_settings/font_settings_api.cc b/chrome/browser/extensions/api/font_settings/font_settings_api.cc index 7ec693d..722172a 100644 --- a/chrome/browser/extensions/api/font_settings/font_settings_api.cc +++ b/chrome/browser/extensions/api/font_settings/font_settings_api.cc @@ -174,8 +174,8 @@ void FontSettingsEventRouter::OnFontNamePrefChanged( } font_name = MaybeGetLocalizedFontName(font_name); - ListValue args; - DictionaryValue* dict = new DictionaryValue(); + base::ListValue args; + base::DictionaryValue* dict = new base::DictionaryValue(); args.Append(dict); dict->SetString(kFontIdKey, font_name); dict->SetString(kGenericFamilyKey, generic_family); @@ -198,8 +198,8 @@ void FontSettingsEventRouter::OnFontPrefChanged( pref_name.c_str()); CHECK(pref); - ListValue args; - DictionaryValue* dict = new DictionaryValue(); + base::ListValue args; + base::DictionaryValue* dict = new base::DictionaryValue(); args.Append(dict); dict->Set(key, pref->GetValue()->DeepCopy()); @@ -275,7 +275,7 @@ bool FontSettingsGetFontFunction::RunImpl() { pref_path, kIncognito); - DictionaryValue* result = new DictionaryValue(); + base::DictionaryValue* result = new base::DictionaryValue(); result->SetString(kFontIdKey, font_name); result->SetString(kLevelOfControlKey, level_of_control); SetResult(result); @@ -314,15 +314,17 @@ bool FontSettingsGetFontListFunction::RunImpl() { } void FontSettingsGetFontListFunction::FontListHasLoaded( - scoped_ptr<ListValue> list) { + scoped_ptr<base::ListValue> list) { bool success = CopyFontsToResult(list.get()); SendResponse(success); } -bool FontSettingsGetFontListFunction::CopyFontsToResult(ListValue* fonts) { - scoped_ptr<ListValue> result(new ListValue()); - for (ListValue::iterator it = fonts->begin(); it != fonts->end(); ++it) { - ListValue* font_list_value; +bool FontSettingsGetFontListFunction::CopyFontsToResult( + base::ListValue* fonts) { + scoped_ptr<base::ListValue> result(new base::ListValue()); + for (base::ListValue::iterator it = fonts->begin(); + it != fonts->end(); ++it) { + base::ListValue* font_list_value; if (!(*it)->GetAsList(&font_list_value)) { NOTREACHED(); return false; @@ -340,7 +342,7 @@ bool FontSettingsGetFontListFunction::CopyFontsToResult(ListValue* fonts) { return false; } - DictionaryValue* font_name = new DictionaryValue(); + base::DictionaryValue* font_name = new base::DictionaryValue(); font_name->Set(kFontIdKey, Value::CreateStringValue(name)); font_name->Set(kDisplayNameKey, Value::CreateStringValue(localized_name)); result->Append(font_name); @@ -376,7 +378,7 @@ bool GetFontPrefExtensionFunction::RunImpl() { GetPrefName(), kIncognito); - DictionaryValue* result = new DictionaryValue(); + base::DictionaryValue* result = new base::DictionaryValue(); result->Set(GetKey(), pref->GetValue()->DeepCopy()); result->SetString(kLevelOfControlKey, level_of_control); SetResult(result); @@ -389,7 +391,7 @@ bool SetFontPrefExtensionFunction::RunImpl() { return false; } - DictionaryValue* details = NULL; + base::DictionaryValue* details = NULL; EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &details)); Value* value; diff --git a/chrome/browser/extensions/api/history/history_api.cc b/chrome/browser/extensions/api/history/history_api.cc index 474db65..5cc419f 100644 --- a/chrome/browser/extensions/api/history/history_api.cc +++ b/chrome/browser/extensions/api/history/history_api.cc @@ -168,7 +168,7 @@ void HistoryEventRouter::HistoryUrlVisited( Profile* profile, const history::URLVisitedDetails* details) { scoped_ptr<HistoryItem> history_item = GetHistoryItem(details->row); - scoped_ptr<ListValue> args = OnVisited::Create(*history_item); + scoped_ptr<base::ListValue> args = OnVisited::Create(*history_item); DispatchEvent(profile, kOnVisited, args.Pass()); } @@ -186,14 +186,14 @@ void HistoryEventRouter::HistoryUrlsRemoved( } removed.urls.reset(urls); - scoped_ptr<ListValue> args = OnVisitRemoved::Create(removed); + scoped_ptr<base::ListValue> args = OnVisitRemoved::Create(removed); DispatchEvent(profile, kOnVisitRemoved, args.Pass()); } void HistoryEventRouter::DispatchEvent( Profile* profile, const char* event_name, - scoped_ptr<ListValue> event_args) { + scoped_ptr<base::ListValue> event_args) { if (profile && extensions::ExtensionSystem::Get(profile)->event_router()) { scoped_ptr<extensions::Event> event(new extensions::Event( event_name, event_args.Pass())); diff --git a/chrome/browser/extensions/api/identity/web_auth_flow.cc b/chrome/browser/extensions/api/identity/web_auth_flow.cc index b0ad761..84fa56b 100644 --- a/chrome/browser/extensions/api/identity/web_auth_flow.cc +++ b/chrome/browser/extensions/api/identity/web_auth_flow.cc @@ -77,7 +77,7 @@ void WebAuthFlow::Start() { DCHECK(success); // identityPrivate.onWebFlowRequest(shell_window_key, provider_url_, mode_) - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->AppendString(shell_window_key_); args->AppendString(provider_url_.spec()); if (mode_ == WebAuthFlow::INTERACTIVE) diff --git a/chrome/browser/extensions/api/identity_private/identity_private_api.cc b/chrome/browser/extensions/api/identity_private/identity_private_api.cc index 0d2d52c..d1e3270 100644 --- a/chrome/browser/extensions/api/identity_private/identity_private_api.cc +++ b/chrome/browser/extensions/api/identity_private/identity_private_api.cc @@ -19,7 +19,7 @@ IdentityPrivateGetResourcesFunction::IdentityPrivateGetResourcesFunction() {} IdentityPrivateGetResourcesFunction::~IdentityPrivateGetResourcesFunction() {} bool IdentityPrivateGetResourcesFunction::RunImpl() { - DictionaryValue* result = new DictionaryValue; + base::DictionaryValue* result = new base::DictionaryValue; result->SetString("IDR_CLOSE_DIALOG", webui::GetBitmapDataUrlFromResource(IDR_CLOSE_DIALOG)); diff --git a/chrome/browser/extensions/api/idle/idle_manager.cc b/chrome/browser/extensions/api/idle/idle_manager.cc index c907b81..bf02c33 100644 --- a/chrome/browser/extensions/api/idle/idle_manager.cc +++ b/chrome/browser/extensions/api/idle/idle_manager.cc @@ -49,7 +49,7 @@ DefaultEventDelegate::~DefaultEventDelegate() { void DefaultEventDelegate::OnStateChanged(const std::string& extension_id, IdleState new_state) { - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(IdleManager::CreateIdleValue(new_state)); scoped_ptr<Event> event(new Event(keys::kOnStateChanged, args.Pass())); event->restrict_to_profile = profile_; diff --git a/chrome/browser/extensions/api/idltest/idltest_api.cc b/chrome/browser/extensions/api/idltest/idltest_api.cc index 744aa79..98ef9b3 100644 --- a/chrome/browser/extensions/api/idltest/idltest_api.cc +++ b/chrome/browser/extensions/api/idltest/idltest_api.cc @@ -10,8 +10,8 @@ using base::BinaryValue; namespace { -ListValue* CopyBinaryValueToIntegerList(const BinaryValue* input) { - ListValue* output = new ListValue(); +base::ListValue* CopyBinaryValueToIntegerList(const BinaryValue* input) { + base::ListValue* output = new base::ListValue(); const char* input_buffer = input->GetBuffer(); for (size_t i = 0; i < input->GetSize(); i++) { output->Append(Value::CreateIntegerValue(input_buffer[i])); diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api.cc b/chrome/browser/extensions/api/input_ime/input_ime_api.cc index c33eff7..0e4845b 100644 --- a/chrome/browser/extensions/api/input_ime/input_ime_api.cc +++ b/chrome/browser/extensions/api/input_ime/input_ime_api.cc @@ -36,10 +36,10 @@ const char kErrorSetMenuItemsFail[] = "Could not create menu Items"; const char kErrorUpdateMenuItemsFail[] = "Could not update menu Items"; bool ReadMenuItems( - ListValue* menu_items, + base::ListValue* menu_items, std::vector<chromeos::InputMethodEngine::MenuItem>* output) { for (size_t i = 0; i < menu_items->GetSize(); ++i) { - DictionaryValue* item_dict; + base::DictionaryValue* item_dict; if (!menu_items->GetDictionary(i, &item_dict)) { return false; } @@ -118,7 +118,7 @@ bool ReadMenuItems( output->back().modified = modified; if (item_dict->HasKey(keys::kItemsKey)) { - ListValue* sub_list; + base::ListValue* sub_list; if (!item_dict->GetList(keys::kItemsKey, &sub_list)) { return false; } @@ -135,7 +135,7 @@ bool ReadMenuItems( static void DispatchEventToExtension(Profile* profile, const std::string& extension_id, const std::string& event_name, - scoped_ptr<ListValue> args) { + scoped_ptr<base::ListValue> args) { scoped_ptr<extensions::Event> event(new extensions::Event( event_name, args.Pass())); event->restrict_to_profile = profile; @@ -176,7 +176,7 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer { if (profile_ == NULL || extension_id_.empty()) return; - scoped_ptr<base::ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(Value::CreateStringValue(engine_id)); DispatchEventToExtension(profile_, extension_id_, @@ -187,7 +187,7 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer { if (profile_ == NULL || extension_id_.empty()) return; - scoped_ptr<base::ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(Value::CreateStringValue(engine_id)); DispatchEventToExtension(profile_, extension_id_, @@ -199,11 +199,11 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer { if (profile_ == NULL || extension_id_.empty()) return; - DictionaryValue* dict = new DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetInteger("contextID", context.id); dict->SetString("type", context.type); - scoped_ptr<base::ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(dict); DispatchEventToExtension(profile_, extension_id_, @@ -214,7 +214,7 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer { if (profile_ == NULL || extension_id_.empty()) return; - scoped_ptr<base::ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(Value::CreateIntegerValue(context_id)); DispatchEventToExtension(profile_, extension_id_, @@ -226,11 +226,11 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer { if (profile_ == NULL || extension_id_.empty()) return; - DictionaryValue* dict = new DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetInteger("contextID", context.id); dict->SetString("type", context.type); - scoped_ptr<base::ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(dict); DispatchEventToExtension(profile_, extension_id_, @@ -248,7 +248,7 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer { extensions::InputImeEventRouter::GetInstance()->AddRequest(engine_id, key_data); - DictionaryValue* dict = new DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetString("type", event.type); dict->SetString("requestId", request_id); dict->SetString("key", event.key); @@ -258,7 +258,7 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer { dict->SetBoolean("shiftKey", event.shift_key); dict->SetBoolean("capsLock", event.caps_lock); - scoped_ptr<base::ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(Value::CreateStringValue(engine_id)); args->Append(dict); @@ -273,7 +273,7 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer { if (profile_ == NULL || extension_id_.empty()) return; - scoped_ptr<base::ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(Value::CreateStringValue(engine_id)); args->Append(Value::CreateIntegerValue(candidate_id)); switch (button) { @@ -301,7 +301,7 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer { if (profile_ == NULL || extension_id_.empty()) return; - scoped_ptr<base::ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(Value::CreateStringValue(engine_id)); args->Append(Value::CreateStringValue(menu_id)); @@ -315,12 +315,12 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer { int anchor_pos) OVERRIDE { if (profile_ == NULL || extension_id_.empty()) return; - DictionaryValue* dict = new DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetString("text", text); dict->SetInteger("focus", cursor_pos); dict->SetInteger("anchor", anchor_pos); - scoped_ptr<ListValue> args(new ListValue); + scoped_ptr<ListValue> args(new base::ListValue); args->Append(Value::CreateStringValue(engine_id)); args->Append(dict); @@ -331,7 +331,7 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer { virtual void OnReset(const std::string& engine_id) OVERRIDE { if (profile_ == NULL || extension_id_.empty()) return; - scoped_ptr<base::ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(Value::CreateStringValue(engine_id)); DispatchEventToExtension(profile_, extension_id_, @@ -506,7 +506,7 @@ bool SetCompositionFunction::RunImpl() { return true; } - DictionaryValue* args; + base::DictionaryValue* args; EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &args)); int context_id; std::string text; @@ -533,12 +533,12 @@ bool SetCompositionFunction::RunImpl() { } if (args->HasKey(keys::kSegmentsKey)) { - ListValue* segment_list = NULL; + base::ListValue* segment_list = NULL; EXTENSION_FUNCTION_VALIDATE(args->GetList(keys::kSegmentsKey, &segment_list)); for (size_t i = 0; i < segment_list->GetSize(); ++i) { - DictionaryValue* segment = NULL; + base::DictionaryValue* segment = NULL; if (!segment_list->GetDictionary(i, &segment)) continue; @@ -581,7 +581,7 @@ bool ClearCompositionFunction::RunImpl() { return true; } - DictionaryValue* args; + base::DictionaryValue* args; EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &args)); int context_id; @@ -605,7 +605,7 @@ bool CommitTextFunction::RunImpl() { return true; } - DictionaryValue* args; + base::DictionaryValue* args; EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &args)); int context_id; std::string text; @@ -623,7 +623,7 @@ bool CommitTextFunction::RunImpl() { } bool SetCandidateWindowPropertiesFunction::RunImpl() { - DictionaryValue* args; + base::DictionaryValue* args; EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &args)); std::string engine_id; @@ -636,7 +636,7 @@ bool SetCandidateWindowPropertiesFunction::RunImpl() { return true; } - DictionaryValue* properties; + base::DictionaryValue* properties; EXTENSION_FUNCTION_VALIDATE(args->GetDictionary(keys::kPropertiesKey, &properties)); @@ -707,10 +707,10 @@ bool SetCandidateWindowPropertiesFunction::RunImpl() { #if defined(OS_CHROMEOS) bool SetCandidatesFunction::ReadCandidates( - ListValue* candidates, + base::ListValue* candidates, std::vector<chromeos::InputMethodEngine::Candidate>* output) { for (size_t i = 0; i < candidates->GetSize(); ++i) { - DictionaryValue* candidate_dict; + base::DictionaryValue* candidate_dict; EXTENSION_FUNCTION_VALIDATE(candidates->GetDictionary(i, &candidate_dict)); std::string candidate; @@ -734,7 +734,7 @@ bool SetCandidatesFunction::ReadCandidates( } if (candidate_dict->HasKey(keys::kUsageKey)) { - DictionaryValue* usage_dict; + base::DictionaryValue* usage_dict; EXTENSION_FUNCTION_VALIDATE(candidate_dict->GetDictionary(keys::kUsageKey, &usage_dict)); EXTENSION_FUNCTION_VALIDATE(usage_dict->GetString(keys::kUsageTitleKey, @@ -751,7 +751,7 @@ bool SetCandidatesFunction::ReadCandidates( output->back().usage = usage_entry; if (candidate_dict->HasKey(keys::kCandidatesKey)) { - ListValue* sub_list; + base::ListValue* sub_list; EXTENSION_FUNCTION_VALIDATE(candidate_dict->GetList(keys::kCandidatesKey, &sub_list)); if (!ReadCandidates(sub_list, &(output->back().candidates))) { @@ -772,7 +772,7 @@ bool SetCandidatesFunction::RunImpl() { return true; } - DictionaryValue* args; + base::DictionaryValue* args; EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &args)); int context_id; @@ -781,7 +781,7 @@ bool SetCandidatesFunction::RunImpl() { EXTENSION_FUNCTION_VALIDATE(args->GetInteger(keys::kContextIdKey, &context_id)); - ListValue* candidate_list; + base::ListValue* candidate_list; EXTENSION_FUNCTION_VALIDATE(args->GetList(keys::kCandidatesKey, &candidate_list)); if (!ReadCandidates(candidate_list, &candidates)) { @@ -806,7 +806,7 @@ bool SetCursorPositionFunction::RunImpl() { return true; } - DictionaryValue* args; + base::DictionaryValue* args; EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &args)); int context_id; int candidate_id; @@ -825,7 +825,7 @@ bool SetCursorPositionFunction::RunImpl() { } bool SetMenuItemsFunction::RunImpl() { - DictionaryValue* args; + base::DictionaryValue* args; EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &args)); std::string engine_id; @@ -838,7 +838,7 @@ bool SetMenuItemsFunction::RunImpl() { return false; } - ListValue* items; + base::ListValue* items; EXTENSION_FUNCTION_VALIDATE(args->GetList(keys::kItemsKey, &items)); std::vector<chromeos::InputMethodEngine::MenuItem> menu_items; @@ -851,7 +851,7 @@ bool SetMenuItemsFunction::RunImpl() { } bool UpdateMenuItemsFunction::RunImpl() { - DictionaryValue* args; + base::DictionaryValue* args; EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &args)); std::string engine_id; @@ -864,7 +864,7 @@ bool UpdateMenuItemsFunction::RunImpl() { return false; } - ListValue* items; + base::ListValue* items; EXTENSION_FUNCTION_VALIDATE(args->GetList(keys::kItemsKey, &items)); std::vector<chromeos::InputMethodEngine::MenuItem> menu_items; @@ -877,7 +877,7 @@ bool UpdateMenuItemsFunction::RunImpl() { } bool DeleteSurroundingTextFunction::RunImpl() { - DictionaryValue* args; + base::DictionaryValue* args; EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &args)); std::string engine_id; diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api.h b/chrome/browser/extensions/api/input_ime/input_ime_api.h index aee6111..e744195 100644 --- a/chrome/browser/extensions/api/input_ime/input_ime_api.h +++ b/chrome/browser/extensions/api/input_ime/input_ime_api.h @@ -128,7 +128,7 @@ class SetCandidatesFunction : public SyncExtensionFunction { private: bool ReadCandidates( - ListValue* candidates, + base::ListValue* candidates, std::vector<chromeos::InputMethodEngine::Candidate>* output); }; diff --git a/chrome/browser/extensions/api/location/location_manager.cc b/chrome/browser/extensions/api/location/location_manager.cc index 509494e..fe37965 100644 --- a/chrome/browser/extensions/api/location/location_manager.cc +++ b/chrome/browser/extensions/api/location/location_manager.cc @@ -200,7 +200,7 @@ void LocationManager::SendLocationUpdate( const content::Geoposition& position) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); std::string event_name; if (position.Validate() && diff --git a/chrome/browser/extensions/api/management/management_api.cc b/chrome/browser/extensions/api/management/management_api.cc index c855b83..7f98037 100644 --- a/chrome/browser/extensions/api/management/management_api.cc +++ b/chrome/browser/extensions/api/management/management_api.cc @@ -315,13 +315,13 @@ class SafeManifestJSONParser : public UtilityProcessHostClient { return handled; } - void OnJSONParseSucceeded(const ListValue& wrapper) { + void OnJSONParseSucceeded(const base::ListValue& wrapper) { CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); const Value* value = NULL; CHECK(wrapper.Get(0, &value)); if (value->IsType(Value::TYPE_DICTIONARY)) parsed_manifest_.reset( - static_cast<const DictionaryValue*>(value)->DeepCopy()); + static_cast<const base::DictionaryValue*>(value)->DeepCopy()); else error_ = keys::kManifestParseError; @@ -358,7 +358,7 @@ class SafeManifestJSONParser : public UtilityProcessHostClient { std::string manifest_; // Results of parsing. - scoped_ptr<DictionaryValue> parsed_manifest_; + scoped_ptr<base::DictionaryValue> parsed_manifest_; std::string error_; }; @@ -382,7 +382,7 @@ bool ManagementGetPermissionWarningsByManifestFunction::RunImpl() { } void ManagementGetPermissionWarningsByManifestFunction::OnParseSuccess( - DictionaryValue* parsed_manifest) { + base::DictionaryValue* parsed_manifest) { CHECK(parsed_manifest); scoped_refptr<Extension> extension = Extension::Create( @@ -676,7 +676,7 @@ void ManagementEventRouter::Observe( DCHECK(event_name); DCHECK(extension); - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); if (event_name == events::kOnExtensionUninstalled) { args->Append(Value::CreateStringValue(extension->id())); } else { diff --git a/chrome/browser/extensions/api/management/management_browsertest.cc b/chrome/browser/extensions/api/management/management_browsertest.cc index 8457eea..ae05985 100644 --- a/chrome/browser/extensions/api/management/management_browsertest.cc +++ b/chrome/browser/extensions/api/management/management_browsertest.cc @@ -511,14 +511,14 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, ExternalPolicyRefresh) { ASSERT_TRUE(service->disabled_extensions()->is_empty()); PrefService* prefs = browser()->profile()->GetPrefs(); - const DictionaryValue* forcelist = + const base::DictionaryValue* forcelist = prefs->GetDictionary(prefs::kExtensionInstallForceList); ASSERT_TRUE(forcelist->empty()) << kForceInstallNotEmptyHelp; { // Set the policy as a user preference and fire notification observers. DictionaryPrefUpdate pref_update(prefs, prefs::kExtensionInstallForceList); - DictionaryValue* forcelist = pref_update.Get(); + base::DictionaryValue* forcelist = pref_update.Get(); extensions::ExternalPolicyLoader::AddExtension( forcelist, kExtensionId, "http://localhost/autoupdate/manifest"); } @@ -584,7 +584,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, // Check that the policy is initially empty. PrefService* prefs = browser()->profile()->GetPrefs(); - const DictionaryValue* forcelist = + const base::DictionaryValue* forcelist = prefs->GetDictionary(prefs::kExtensionInstallForceList); ASSERT_TRUE(forcelist->empty()) << kForceInstallNotEmptyHelp; @@ -638,7 +638,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, // and force enable it too. { DictionaryPrefUpdate pref_update(prefs, prefs::kExtensionInstallForceList); - DictionaryValue* forcelist = pref_update.Get(); + base::DictionaryValue* forcelist = pref_update.Get(); extensions::ExternalPolicyLoader::AddExtension( forcelist, kExtensionId, "http://localhost/autoupdate/manifest"); } diff --git a/chrome/browser/extensions/api/media_galleries_private/gallery_watch_state_tracker.cc b/chrome/browser/extensions/api/media_galleries_private/gallery_watch_state_tracker.cc index bcd2ff5..309b008 100644 --- a/chrome/browser/extensions/api/media_galleries_private/gallery_watch_state_tracker.cc +++ b/chrome/browser/extensions/api/media_galleries_private/gallery_watch_state_tracker.cc @@ -55,7 +55,7 @@ chrome::MediaGalleryPrefIdSet WatchedGalleryIdsFromValue( scoped_ptr<base::ListValue> WatchedGalleryIdsToValue( const chrome::MediaGalleryPrefIdSet gallery_ids) { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); - scoped_ptr<base::ListValue> list(new ListValue()); + scoped_ptr<base::ListValue> list(new base::ListValue()); for (chrome::MediaGalleryPrefIdSet::const_iterator id_iter = gallery_ids.begin(); id_iter != gallery_ids.end(); ++id_iter) diff --git a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_event_router.cc b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_event_router.cc index 2d7bb43..8a2070a 100644 --- a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_event_router.cc +++ b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_event_router.cc @@ -62,7 +62,7 @@ void MediaGalleriesPrivateEventRouter::OnGalleryChanged( it != extension_ids.end(); ++it) { GalleryChangeDetails details; details.gallery_id = gallery_id; - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(details.ToValue().release()); scoped_ptr<extensions::Event> event(new extensions::Event( event_names::kOnGalleryChangedEventName, @@ -106,7 +106,7 @@ void MediaGalleriesPrivateEventRouter::OnRemovableStorageDetached( DeviceDetachmentDetails details; details.device_id = GetTransientIdForDeviceId(info.device_id()); - scoped_ptr<base::ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(details.ToValue().release()); DispatchEvent(event_names::kOnDetachEventName, args.Pass()); } diff --git a/chrome/browser/extensions/api/messaging/message_service.cc b/chrome/browser/extensions/api/messaging/message_service.cc index 3d05766..6ef2531 100644 --- a/chrome/browser/extensions/api/messaging/message_service.cc +++ b/chrome/browser/extensions/api/messaging/message_service.cc @@ -70,7 +70,7 @@ struct MessageService::MessageChannel { struct MessageService::OpenChannelParams { content::RenderProcessHost* source; - DictionaryValue source_tab; + base::DictionaryValue source_tab; scoped_ptr<MessagePort> receiver; int receiver_port_id; std::string source_extension_id; @@ -80,7 +80,7 @@ struct MessageService::OpenChannelParams { // Takes ownership of receiver. OpenChannelParams(content::RenderProcessHost* source, - scoped_ptr<DictionaryValue> source_tab, + scoped_ptr<base::DictionaryValue> source_tab, MessagePort* receiver, int receiver_port_id, const std::string& source_extension_id, @@ -240,7 +240,7 @@ void MessageService::OpenChannelToExtension( source_process_id, source_routing_id); // Include info about the opener's tab (if it was a tab). - scoped_ptr<DictionaryValue> source_tab; + scoped_ptr<base::DictionaryValue> source_tab; GURL source_url_for_tab; if (source_contents && ExtensionTabUtil::GetTabId(source_contents) >= 0) { @@ -355,8 +355,8 @@ void MessageService::OpenChannelToTab( scoped_ptr<OpenChannelParams> params(new OpenChannelParams( source, - scoped_ptr<DictionaryValue>(), // Source tab doesn't make sense for - // opening to tabs. + scoped_ptr<base::DictionaryValue>(), // Source tab doesn't make sense + // for opening to tabs. receiver.release(), receiver_port_id, extension_id, diff --git a/chrome/browser/extensions/api/notifications/notifications_api.cc b/chrome/browser/extensions/api/notifications/notifications_api.cc index 7365649..949b5d7 100644 --- a/chrome/browser/extensions/api/notifications/notifications_api.cc +++ b/chrome/browser/extensions/api/notifications/notifications_api.cc @@ -135,18 +135,18 @@ class NotificationsApiDelegate : public NotificationDelegate { virtual void Display() OVERRIDE { } virtual void Error() OVERRIDE { - scoped_ptr<ListValue> args(CreateBaseEventArgs()); + scoped_ptr<base::ListValue> args(CreateBaseEventArgs()); SendEvent(event_names::kOnNotificationError, args.Pass()); } virtual void Close(bool by_user) OVERRIDE { - scoped_ptr<ListValue> args(CreateBaseEventArgs()); + scoped_ptr<base::ListValue> args(CreateBaseEventArgs()); args->Append(Value::CreateBooleanValue(by_user)); SendEvent(event_names::kOnNotificationClosed, args.Pass()); } virtual void Click() OVERRIDE { - scoped_ptr<ListValue> args(CreateBaseEventArgs()); + scoped_ptr<base::ListValue> args(CreateBaseEventArgs()); SendEvent(event_names::kOnNotificationClicked, args.Pass()); } @@ -156,7 +156,7 @@ class NotificationsApiDelegate : public NotificationDelegate { } virtual void ButtonClick(int index) OVERRIDE { - scoped_ptr<ListValue> args(CreateBaseEventArgs()); + scoped_ptr<base::ListValue> args(CreateBaseEventArgs()); args->Append(Value::CreateIntegerValue(index)); SendEvent(event_names::kOnNotificationButtonClicked, args.Pass()); } @@ -186,14 +186,14 @@ class NotificationsApiDelegate : public NotificationDelegate { private: virtual ~NotificationsApiDelegate() {} - void SendEvent(const std::string& name, scoped_ptr<ListValue> args) { + void SendEvent(const std::string& name, scoped_ptr<base::ListValue> args) { scoped_ptr<Event> event(new Event(name, args.Pass())); ExtensionSystem::Get(profile_)->event_router()->DispatchEventToExtension( extension_id_, event.Pass()); } - scoped_ptr<ListValue> CreateBaseEventArgs() { - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> CreateBaseEventArgs() { + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(Value::CreateStringValue(id_)); return args.Pass(); } @@ -442,7 +442,7 @@ bool NotificationsGetAllFunction::RunNotificationsApi() { notification_ui_manager->GetAllIdsByProfileAndSourceOrigin( profile_, extension_->url()); - scoped_ptr<DictionaryValue> result(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue()); for (std::set<std::string>::iterator iter = notification_ids.begin(); iter != notification_ids.end(); iter++) { diff --git a/chrome/browser/extensions/api/omnibox/omnibox_api.cc b/chrome/browser/extensions/api/omnibox/omnibox_api.cc index 774055f..400fc32 100644 --- a/chrome/browser/extensions/api/omnibox/omnibox_api.cc +++ b/chrome/browser/extensions/api/omnibox/omnibox_api.cc @@ -74,7 +74,7 @@ scoped_ptr<omnibox::SuggestResult> GetOmniboxDefaultSuggestion( ExtensionSystem::Get(profile)->extension_service()->extension_prefs(); scoped_ptr<omnibox::SuggestResult> suggestion; - const DictionaryValue* dict = NULL; + const base::DictionaryValue* dict = NULL; if (prefs && prefs->ReadPrefAsDictionary(extension_id, kOmniboxDefaultSuggestion, &dict)) { @@ -112,7 +112,7 @@ bool SetOmniboxDefaultSuggestion( void ExtensionOmniboxEventRouter::OnInputStarted( Profile* profile, const std::string& extension_id) { scoped_ptr<Event> event(new Event( - events::kOnInputStarted, make_scoped_ptr(new ListValue()))); + events::kOnInputStarted, make_scoped_ptr(new base::ListValue()))); event->restrict_to_profile = profile; ExtensionSystem::Get(profile)->event_router()-> DispatchEventToExtension(extension_id, event.Pass()); @@ -126,7 +126,7 @@ bool ExtensionOmniboxEventRouter::OnInputChanged( ExtensionHasEventListener(extension_id, events::kOnInputChanged)) return false; - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Set(0, Value::CreateStringValue(input)); args->Set(1, Value::CreateIntegerValue(suggest_id)); @@ -153,7 +153,7 @@ void ExtensionOmniboxEventRouter::OnInputEntered( extensions::TabHelper::FromWebContents(web_contents)-> active_tab_permission_granter()->GrantIfRequested(extension); - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Set(0, Value::CreateStringValue(input)); if (disposition == NEW_FOREGROUND_TAB) args->Set(1, Value::CreateStringValue(kForegroundTabDisposition)); @@ -177,7 +177,7 @@ void ExtensionOmniboxEventRouter::OnInputEntered( void ExtensionOmniboxEventRouter::OnInputCancelled( Profile* profile, const std::string& extension_id) { scoped_ptr<Event> event(new Event( - events::kOnInputCancelled, make_scoped_ptr(new ListValue()))); + events::kOnInputCancelled, make_scoped_ptr(new base::ListValue()))); event->restrict_to_profile = profile; ExtensionSystem::Get(profile)->event_router()-> DispatchEventToExtension(extension_id, event.Pass()); diff --git a/chrome/browser/extensions/api/omnibox/omnibox_unittest.cc b/chrome/browser/extensions/api/omnibox/omnibox_unittest.cc index f1ab1ed..549367f 100644 --- a/chrome/browser/extensions/api/omnibox/omnibox_unittest.cc +++ b/chrome/browser/extensions/api/omnibox/omnibox_unittest.cc @@ -41,7 +41,7 @@ void CompareClassification(const ACMatchClassifications& expected, // + ddd // = nmmmmndddn TEST(ExtensionOmniboxTest, DescriptionStylesSimple) { - scoped_ptr<ListValue> list = ListBuilder() + scoped_ptr<base::ListValue> list = ListBuilder() .Append(42) .Append(ListBuilder() .Append(DictionaryBuilder() @@ -72,7 +72,7 @@ TEST(ExtensionOmniboxTest, DescriptionStylesSimple) { *params->suggest_results[0])); // Same input, but swap the order. Ensure it still works. - scoped_ptr<ListValue> swap_list = ListBuilder() + scoped_ptr<base::ListValue> swap_list = ListBuilder() .Append(42) .Append(ListBuilder() .Append(DictionaryBuilder() @@ -104,7 +104,7 @@ TEST(ExtensionOmniboxTest, DescriptionStylesSimple) { // + dd // = 3773unnnn66 TEST(ExtensionOmniboxTest, DescriptionStylesCombine) { - scoped_ptr<ListValue> list = ListBuilder() + scoped_ptr<base::ListValue> list = ListBuilder() .Append(42) .Append(ListBuilder() .Append(DictionaryBuilder() @@ -149,7 +149,7 @@ TEST(ExtensionOmniboxTest, DescriptionStylesCombine) { // Try moving the "dim/match" style pair at offset 9. Output should be the // same. - scoped_ptr<ListValue> moved_list = ListBuilder() + scoped_ptr<base::ListValue> moved_list = ListBuilder() .Append(42) .Append(ListBuilder() .Append(DictionaryBuilder() @@ -193,7 +193,7 @@ TEST(ExtensionOmniboxTest, DescriptionStylesCombine) { // + ddd // = 77777nnnnn TEST(ExtensionOmniboxTest, DescriptionStylesCombine2) { - scoped_ptr<ListValue> list = ListBuilder() + scoped_ptr<base::ListValue> list = ListBuilder() .Append(42) .Append(ListBuilder() .Append(DictionaryBuilder() @@ -242,7 +242,7 @@ TEST(ExtensionOmniboxTest, DescriptionStylesCombine2) { // = 77777nnnnn TEST(ExtensionOmniboxTest, DefaultSuggestResult) { // Default suggestions should not have a content parameter. - scoped_ptr<ListValue> list = ListBuilder() + scoped_ptr<base::ListValue> list = ListBuilder() .Append(DictionaryBuilder() .Set("description", "description") .Set("descriptionStyles", ListBuilder() diff --git a/chrome/browser/extensions/api/page_capture/page_capture_api.cc b/chrome/browser/extensions/api/page_capture/page_capture_api.cc index 62a800e..1fe87c7 100644 --- a/chrome/browser/extensions/api/page_capture/page_capture_api.cc +++ b/chrome/browser/extensions/api/page_capture/page_capture_api.cc @@ -175,7 +175,7 @@ void PageCaptureSaveAsMHTMLFunction::ReturnSuccess(int64 file_size) { ChildProcessSecurityPolicy::GetInstance()->GrantReadFile( child_id, mhtml_path_); - DictionaryValue* dict = new DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); SetResult(dict); dict->SetString("mhtmlFilePath", mhtml_path_.value()); dict->SetInteger("mhtmlFileLength", file_size); diff --git a/chrome/browser/extensions/api/permissions/permissions_api_helpers_unittest.cc b/chrome/browser/extensions/api/permissions/permissions_api_helpers_unittest.cc index 429ee70..3ec4abc 100644 --- a/chrome/browser/extensions/api/permissions/permissions_api_helpers_unittest.cc +++ b/chrome/browser/extensions/api/permissions/permissions_api_helpers_unittest.cc @@ -41,9 +41,9 @@ TEST(ExtensionPermissionsAPIHelpers, Pack) { // Pack the permission set to value and verify its contents. scoped_ptr<Permissions> permissions(PackPermissionSet(permission_set.get())); - scoped_ptr<DictionaryValue> value(permissions->ToValue()); - ListValue* api_list = NULL; - ListValue* origin_list = NULL; + scoped_ptr<base::DictionaryValue> value(permissions->ToValue()); + base::ListValue* api_list = NULL; + base::ListValue* origin_list = NULL; EXPECT_TRUE(value->GetList("permissions", &api_list)); EXPECT_TRUE(value->GetList("origins", &origin_list)); @@ -77,12 +77,12 @@ TEST(ExtensionPermissionsAPIHelpers, Pack) { // Tests various error conditions and edge cases when unpacking values // into PermissionSets. TEST(ExtensionPermissionsAPIHelpers, Unpack) { - scoped_ptr<ListValue> apis(new ListValue()); + scoped_ptr<base::ListValue> apis(new base::ListValue()); apis->Append(Value::CreateStringValue("tabs")); - scoped_ptr<ListValue> origins(new ListValue()); + scoped_ptr<base::ListValue> origins(new base::ListValue()); origins->Append(Value::CreateStringValue("http://a.com/*")); - scoped_ptr<DictionaryValue> value(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); scoped_refptr<PermissionSet> permissions; std::string error; @@ -113,7 +113,7 @@ TEST(ExtensionPermissionsAPIHelpers, Unpack) { { Permissions permissions_object; value->Clear(); - scoped_ptr<ListValue> invalid_apis(apis->DeepCopy()); + scoped_ptr<base::ListValue> invalid_apis(apis->DeepCopy()); invalid_apis->Append(Value::CreateIntegerValue(3)); value->Set("permissions", invalid_apis->DeepCopy()); EXPECT_FALSE(Permissions::Populate(*value, &permissions_object)); @@ -123,7 +123,7 @@ TEST(ExtensionPermissionsAPIHelpers, Unpack) { { Permissions permissions_object; value->Clear(); - scoped_ptr<ListValue> invalid_origins(origins->DeepCopy()); + scoped_ptr<base::ListValue> invalid_origins(origins->DeepCopy()); invalid_origins->Append(Value::CreateIntegerValue(3)); value->Set("origins", invalid_origins->DeepCopy()); EXPECT_FALSE(Permissions::Populate(*value, &permissions_object)); @@ -161,7 +161,7 @@ TEST(ExtensionPermissionsAPIHelpers, Unpack) { { Permissions permissions_object; value->Clear(); - scoped_ptr<ListValue> invalid_apis(apis->DeepCopy()); + scoped_ptr<base::ListValue> invalid_apis(apis->DeepCopy()); invalid_apis->Append(Value::CreateStringValue("unknown_permission")); value->Set("permissions", invalid_apis->DeepCopy()); EXPECT_TRUE(Permissions::Populate(*value, &permissions_object)); diff --git a/chrome/browser/extensions/api/preference/preference_helpers.cc b/chrome/browser/extensions/api/preference/preference_helpers.cc index c8f1f6b..e4192dd 100644 --- a/chrome/browser/extensions/api/preference/preference_helpers.cc +++ b/chrome/browser/extensions/api/preference/preference_helpers.cc @@ -88,7 +88,7 @@ const char* GetLevelOfControl( void DispatchEventToExtensions( Profile* profile, const std::string& event_name, - ListValue* args, + base::ListValue* args, APIPermission::ID permission, bool incognito, const std::string& browser_pref) { @@ -108,7 +108,7 @@ void DispatchEventToExtensions( (!incognito || IncognitoInfo::IsSplitMode(it->get()) || extension_service->CanCrossIncognito(it->get()))) { // Inject level of control key-value. - DictionaryValue* dict; + base::DictionaryValue* dict; bool rv = args->GetDictionary(0, &dict); DCHECK(rv); std::string level_of_control = @@ -134,7 +134,7 @@ void DispatchEventToExtensions( } } - scoped_ptr<ListValue> args_copy(args->DeepCopy()); + scoped_ptr<base::ListValue> args_copy(args->DeepCopy()); scoped_ptr<Event> event(new Event(event_name, args_copy.Pass())); event->restrict_to_profile = restrict_to_profile; router->DispatchEventToExtension(extension_id, event.Pass()); diff --git a/chrome/browser/extensions/api/processes/processes_api.cc b/chrome/browser/extensions/api/processes/processes_api.cc index 2aa2204..b6879ff 100644 --- a/chrome/browser/extensions/api/processes/processes_api.cc +++ b/chrome/browser/extensions/api/processes/processes_api.cc @@ -44,16 +44,16 @@ namespace { #if defined(ENABLE_TASK_MANAGER) -DictionaryValue* CreateCacheData( +base::DictionaryValue* CreateCacheData( const WebKit::WebCache::ResourceTypeStat& stat) { - DictionaryValue* cache = new DictionaryValue(); + base::DictionaryValue* cache = new base::DictionaryValue(); cache->SetDouble(keys::kCacheSize, static_cast<double>(stat.size)); cache->SetDouble(keys::kCacheLiveSize, static_cast<double>(stat.liveSize)); return cache; } -void SetProcessType(DictionaryValue* result, +void SetProcessType(base::DictionaryValue* result, TaskManagerModel* model, int index) { // Determine process type. @@ -99,8 +99,8 @@ void SetProcessType(DictionaryValue* result, result->SetString(keys::kTypeKey, type); } -ListValue* GetTabsForProcess(int process_id) { - ListValue* tabs_list = new ListValue(); +base::ListValue* GetTabsForProcess(int process_id) { + base::ListValue* tabs_list = new base::ListValue(); // The tabs list only makes sense for render processes, so if we don't find // one, just return the empty list. @@ -136,11 +136,11 @@ ListValue* GetTabsForProcess(int process_id) { // This function creates a Process object to be returned to the extensions // using these APIs. For memory details, which are not added by this function, // the callers need to use AddMemoryDetails. -DictionaryValue* CreateProcessFromModel(int process_id, - TaskManagerModel* model, - int index, - bool include_optional) { - DictionaryValue* result = new DictionaryValue(); +base::DictionaryValue* CreateProcessFromModel(int process_id, + TaskManagerModel* model, + int index, + bool include_optional) { + base::DictionaryValue* result = new base::DictionaryValue(); size_t mem; result->SetInteger(keys::kIdKey, process_id); @@ -199,7 +199,7 @@ DictionaryValue* CreateProcessFromModel(int process_id, // Since memory details are expensive to gather, we don't do it by default. // This function is a helper to add memory details data to an existing // Process object representation. -void AddMemoryDetails(DictionaryValue* result, +void AddMemoryDetails(base::DictionaryValue* result, TaskManagerModel* model, int index) { size_t mem; @@ -306,8 +306,8 @@ void ProcessesEventRouter::OnItemsAdded(int start, int length) { index = model_->GetGroupIndexForResource(start); } - scoped_ptr<ListValue> args(new ListValue()); - DictionaryValue* process = CreateProcessFromModel( + scoped_ptr<base::ListValue> args(new base::ListValue()); + base::DictionaryValue* process = CreateProcessFromModel( model_->GetUniqueChildProcessId(index), model_, index, false); DCHECK(process != NULL); @@ -338,21 +338,21 @@ void ProcessesEventRouter::OnItemsChanged(int start, int length) { DCHECK(updated || updated_memory); - IDMap<DictionaryValue> processes_map; + IDMap<base::DictionaryValue> processes_map; for (int i = start; i < start + length; i++) { if (model_->IsResourceFirstInGroup(i)) { int id = model_->GetUniqueChildProcessId(i); - DictionaryValue* process = CreateProcessFromModel(id, model_, i, true); + base::DictionaryValue* process = CreateProcessFromModel(id, model_, i, true); processes_map.AddWithID(process, i); } } int id; std::string idkey(keys::kIdKey); - DictionaryValue* processes = new DictionaryValue(); + base::DictionaryValue* processes = new base::DictionaryValue(); if (updated) { - IDMap<DictionaryValue>::iterator it(&processes_map); + IDMap<base::DictionaryValue>::iterator it(&processes_map); for (; !it.IsAtEnd(); it.Advance()) { if (!it.GetCurrentValue()->GetInteger(idkey, &id)) continue; @@ -361,13 +361,13 @@ void ProcessesEventRouter::OnItemsChanged(int start, int length) { processes->Set(base::IntToString(id), it.GetCurrentValue()); } - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(processes); DispatchEvent(keys::kOnUpdated, args.Pass()); } if (updated_memory) { - IDMap<DictionaryValue>::iterator it(&processes_map); + IDMap<base::DictionaryValue>::iterator it(&processes_map); for (; !it.IsAtEnd(); it.Advance()) { if (!it.GetCurrentValue()->GetInteger(idkey, &id)) continue; @@ -380,7 +380,7 @@ void ProcessesEventRouter::OnItemsChanged(int start, int length) { processes->Set(base::IntToString(id), it.GetCurrentValue()); } - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(processes); DispatchEvent(keys::kOnUpdatedWithMemory, args.Pass()); } @@ -399,7 +399,7 @@ void ProcessesEventRouter::OnItemsToBeRemoved(int start, int length) { return; // The callback function parameters. - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); // First arg: The id of the process that was closed. args->Append(Value::CreateIntegerValue( @@ -421,7 +421,7 @@ void ProcessesEventRouter::ProcessHangEvent(content::RenderWidgetHost* widget) { if (!HasEventListeners(event)) return; - DictionaryValue* process = NULL; + base::DictionaryValue* process = NULL; int count = model_->ResourceCount(); int id = widget->GetProcess()->GetID(); @@ -438,7 +438,7 @@ void ProcessesEventRouter::ProcessHangEvent(content::RenderWidgetHost* widget) { if (process == NULL) return; - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(process); DispatchEvent(keys::kOnUnresponsive, args.Pass()); @@ -450,7 +450,7 @@ void ProcessesEventRouter::ProcessClosedEvent( content::RenderProcessHost::RendererClosedDetails* details) { #if defined(ENABLE_TASK_MANAGER) // The callback function parameters. - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); // First arg: The id of the process that was closed. args->Append(Value::CreateIntegerValue(rph->GetID())); @@ -465,8 +465,9 @@ void ProcessesEventRouter::ProcessClosedEvent( #endif // defined(ENABLE_TASK_MANAGER) } -void ProcessesEventRouter::DispatchEvent(const char* event_name, - scoped_ptr<ListValue> event_args) { +void ProcessesEventRouter::DispatchEvent( + const char* event_name, + scoped_ptr<base::ListValue> event_args) { if (extensions::ExtensionSystem::Get(profile_)->event_router()) { scoped_ptr<extensions::Event> event(new extensions::Event( event_name, event_args.Pass())); @@ -731,7 +732,7 @@ void GetProcessInfoFunction::Observe( void GetProcessInfoFunction::GatherProcessInfo() { #if defined(ENABLE_TASK_MANAGER) TaskManagerModel* model = TaskManager::GetInstance()->model(); - DictionaryValue* processes = new DictionaryValue(); + base::DictionaryValue* processes = new base::DictionaryValue(); // If there are no process IDs specified, it means we need to return all of // the ones we know of. @@ -740,7 +741,7 @@ void GetProcessInfoFunction::GatherProcessInfo() { for (int i = 0; i < resources; ++i) { if (model->IsResourceFirstInGroup(i)) { int id = model->GetUniqueChildProcessId(i); - DictionaryValue* d = CreateProcessFromModel(id, model, i, false); + base::DictionaryValue* d = CreateProcessFromModel(id, model, i, false); if (memory_) AddMemoryDetails(d, model, i); processes->Set(base::IntToString(id), d); @@ -754,7 +755,8 @@ void GetProcessInfoFunction::GatherProcessInfo() { std::vector<int>::iterator proc_id = std::find(process_ids_.begin(), process_ids_.end(), id); if (proc_id != process_ids_.end()) { - DictionaryValue* d = CreateProcessFromModel(id, model, i, false); + base::DictionaryValue* d = + CreateProcessFromModel(id, model, i, false); if (memory_) AddMemoryDetails(d, model, i); processes->Set(base::IntToString(id), d); diff --git a/chrome/browser/extensions/api/proxy/proxy_api.cc b/chrome/browser/extensions/api/proxy/proxy_api.cc index 054cab6..a115a1b 100644 --- a/chrome/browser/extensions/api/proxy/proxy_api.cc +++ b/chrome/browser/extensions/api/proxy/proxy_api.cc @@ -37,8 +37,8 @@ void ProxyEventRouter::OnProxyError( EventRouterForwarder* event_router, void* profile, int error_code) { - scoped_ptr<ListValue> args(new ListValue()); - DictionaryValue* dict = new DictionaryValue(); + scoped_ptr<base::ListValue> args(new base::ListValue()); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetBoolean(keys::kProxyEventFatal, true); dict->SetString(keys::kProxyEventError, net::ErrorToString(error_code)); dict->SetString(keys::kProxyEventDetails, std::string()); @@ -58,8 +58,8 @@ void ProxyEventRouter::OnPACScriptError( void* profile, int line_number, const string16& error) { - scoped_ptr<ListValue> args(new ListValue()); - DictionaryValue* dict = new DictionaryValue(); + scoped_ptr<base::ListValue> args(new base::ListValue()); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetBoolean(keys::kProxyEventFatal, false); dict->SetString(keys::kProxyEventError, net::ErrorToString(net::ERR_PAC_SCRIPT_FAILED)); @@ -95,8 +95,8 @@ Value* ProxyPrefTransformer::ExtensionToBrowserPref(const Value* extension_pref, // has been verified already by the extension API to match the schema // defined in the extension API JSON. CHECK(extension_pref->IsType(Value::TYPE_DICTIONARY)); - const DictionaryValue* config = - static_cast<const DictionaryValue*>(extension_pref); + const base::DictionaryValue* config = + static_cast<const base::DictionaryValue*>(extension_pref); // Extract the various pieces of information passed to // chrome.proxy.settings.set(). Several of these strings will @@ -135,7 +135,7 @@ Value* ProxyPrefTransformer::BrowserToExtensionPref(const Value* browser_pref) { // This is a dictionary wrapper that exposes the proxy configuration stored in // the browser preferences. ProxyConfigDictionary config( - static_cast<const DictionaryValue*>(browser_pref)); + static_cast<const base::DictionaryValue*>(browser_pref)); ProxyPrefs::ProxyMode mode; if (!config.GetMode(&mode)) { @@ -144,7 +144,7 @@ Value* ProxyPrefTransformer::BrowserToExtensionPref(const Value* browser_pref) { } // Build a new ProxyConfig instance as defined in the extension API. - scoped_ptr<DictionaryValue> extension_pref(new DictionaryValue); + scoped_ptr<base::DictionaryValue> extension_pref(new base::DictionaryValue); extension_pref->SetString(keys::kProxyConfigMode, ProxyPrefs::ProxyModeToString(mode)); @@ -159,7 +159,7 @@ Value* ProxyPrefTransformer::BrowserToExtensionPref(const Value* browser_pref) { // A PAC URL either point to a PAC script or contain a base64 encoded // PAC script. In either case we build a PacScript dictionary as defined // in the extension API. - DictionaryValue* pac_dict = helpers::CreatePacScriptDict(config); + base::DictionaryValue* pac_dict = helpers::CreatePacScriptDict(config); if (!pac_dict) return NULL; extension_pref->Set(keys::kProxyConfigPacScript, pac_dict); @@ -167,7 +167,8 @@ Value* ProxyPrefTransformer::BrowserToExtensionPref(const Value* browser_pref) { } case ProxyPrefs::MODE_FIXED_SERVERS: { // Build ProxyRules dictionary according to the extension API. - DictionaryValue* proxy_rules_dict = helpers::CreateProxyRulesDict(config); + base::DictionaryValue* proxy_rules_dict = + helpers::CreateProxyRulesDict(config); if (!proxy_rules_dict) return NULL; extension_pref->Set(keys::kProxyConfigRules, proxy_rules_dict); diff --git a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc index 8dcd291..f0fc389 100644 --- a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc +++ b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc @@ -58,7 +58,7 @@ bool CreatePACScriptFromDataURL( // Extension Pref -> Browser Pref conversion. -bool GetProxyModeFromExtensionPref(const DictionaryValue* proxy_config, +bool GetProxyModeFromExtensionPref(const base::DictionaryValue* proxy_config, ProxyPrefs::ProxyMode* out, std::string* error, bool* bad_message) { @@ -75,11 +75,11 @@ bool GetProxyModeFromExtensionPref(const DictionaryValue* proxy_config, return true; } -bool GetPacMandatoryFromExtensionPref(const DictionaryValue* proxy_config, +bool GetPacMandatoryFromExtensionPref(const base::DictionaryValue* proxy_config, bool* out, std::string* error, bool* bad_message){ - const DictionaryValue* pac_dict = NULL; + const base::DictionaryValue* pac_dict = NULL; proxy_config->GetDictionary(keys::kProxyConfigPacScript, &pac_dict); if (!pac_dict) return true; @@ -96,11 +96,11 @@ bool GetPacMandatoryFromExtensionPref(const DictionaryValue* proxy_config, return true; } -bool GetPacUrlFromExtensionPref(const DictionaryValue* proxy_config, +bool GetPacUrlFromExtensionPref(const base::DictionaryValue* proxy_config, std::string* out, std::string* error, bool* bad_message) { - const DictionaryValue* pac_dict = NULL; + const base::DictionaryValue* pac_dict = NULL; proxy_config->GetDictionary(keys::kProxyConfigPacScript, &pac_dict); if (!pac_dict) return true; @@ -122,11 +122,11 @@ bool GetPacUrlFromExtensionPref(const DictionaryValue* proxy_config, return true; } -bool GetPacDataFromExtensionPref(const DictionaryValue* proxy_config, +bool GetPacDataFromExtensionPref(const base::DictionaryValue* proxy_config, std::string* out, std::string* error, bool* bad_message) { - const DictionaryValue* pac_dict = NULL; + const base::DictionaryValue* pac_dict = NULL; proxy_config->GetDictionary(keys::kProxyConfigPacScript, &pac_dict); if (!pac_dict) return true; @@ -147,7 +147,7 @@ bool GetPacDataFromExtensionPref(const DictionaryValue* proxy_config, return true; } -bool GetProxyServer(const DictionaryValue* proxy_server, +bool GetProxyServer(const base::DictionaryValue* proxy_server, net::ProxyServer::Scheme default_scheme, net::ProxyServer* out, std::string* error, @@ -188,11 +188,12 @@ bool GetProxyServer(const DictionaryValue* proxy_server, return true; } -bool GetProxyRulesStringFromExtensionPref(const DictionaryValue* proxy_config, - std::string* out, - std::string* error, - bool* bad_message) { - const DictionaryValue* proxy_rules = NULL; +bool GetProxyRulesStringFromExtensionPref( + const base::DictionaryValue* proxy_config, + std::string* out, + std::string* error, + bool* bad_message) { + const base::DictionaryValue* proxy_rules = NULL; proxy_config->GetDictionary(keys::kProxyConfigRules, &proxy_rules); if (!proxy_rules) return true; @@ -207,7 +208,7 @@ bool GetProxyRulesStringFromExtensionPref(const DictionaryValue* proxy_config, // singleProxy that will supersede per-URL proxies, but it's worth it to keep // the code simple and extensible. for (size_t i = 0; i <= keys::SCHEME_MAX; ++i) { - const DictionaryValue* proxy_dict = NULL; + const base::DictionaryValue* proxy_dict = NULL; has_proxy[i] = proxy_rules->GetDictionary(keys::field_name[i], &proxy_dict); if (has_proxy[i]) { @@ -255,7 +256,7 @@ bool GetProxyRulesStringFromExtensionPref(const DictionaryValue* proxy_config, return true; } -bool JoinUrlList(const ListValue* list, +bool JoinUrlList(const base::ListValue* list, const std::string& joiner, std::string* out, std::string* error, @@ -283,11 +284,11 @@ bool JoinUrlList(const ListValue* list, return true; } -bool GetBypassListFromExtensionPref(const DictionaryValue* proxy_config, +bool GetBypassListFromExtensionPref(const base::DictionaryValue* proxy_config, std::string* out, std::string* error, bool* bad_message) { - const DictionaryValue* proxy_rules = NULL; + const base::DictionaryValue* proxy_rules = NULL; proxy_config->GetDictionary(keys::kProxyConfigRules, &proxy_rules); if (!proxy_rules) return true; @@ -296,7 +297,7 @@ bool GetBypassListFromExtensionPref(const DictionaryValue* proxy_config, *out = ""; return true; } - const ListValue* bypass_list = NULL; + const base::ListValue* bypass_list = NULL; if (!proxy_rules->GetList(keys::kProxyConfigBypassList, &bypass_list)) { LOG(ERROR) << "'rules.bypassList' could not be parsed."; *bad_message = true; @@ -306,14 +307,15 @@ bool GetBypassListFromExtensionPref(const DictionaryValue* proxy_config, return JoinUrlList(bypass_list, ",", out, error, bad_message); } -DictionaryValue* CreateProxyConfigDict(ProxyPrefs::ProxyMode mode_enum, - bool pac_mandatory, - const std::string& pac_url, - const std::string& pac_data, - const std::string& proxy_rules_string, - const std::string& bypass_list, - std::string* error) { - DictionaryValue* result_proxy_config = NULL; +base::DictionaryValue* CreateProxyConfigDict( + ProxyPrefs::ProxyMode mode_enum, + bool pac_mandatory, + const std::string& pac_url, + const std::string& pac_data, + const std::string& proxy_rules_string, + const std::string& bypass_list, + std::string* error) { + base::DictionaryValue* result_proxy_config = NULL; switch (mode_enum) { case ProxyPrefs::MODE_DIRECT: result_proxy_config = ProxyConfigDictionary::CreateDirect(); @@ -357,12 +359,13 @@ DictionaryValue* CreateProxyConfigDict(ProxyPrefs::ProxyMode mode_enum, return result_proxy_config; } -DictionaryValue* CreateProxyRulesDict( +base::DictionaryValue* CreateProxyRulesDict( const ProxyConfigDictionary& proxy_config) { ProxyPrefs::ProxyMode mode; CHECK(proxy_config.GetMode(&mode) && mode == ProxyPrefs::MODE_FIXED_SERVERS); - scoped_ptr<DictionaryValue> extension_proxy_rules(new DictionaryValue); + scoped_ptr<base::DictionaryValue> extension_proxy_rules( + new base::DictionaryValue); std::string proxy_servers; if (!proxy_config.GetProxyServer(&proxy_servers)) { @@ -417,15 +420,16 @@ DictionaryValue* CreateProxyRulesDict( LOG(ERROR) << "Invalid bypassList in configuration."; return NULL; } - ListValue* bypass_list = TokenizeToStringList(bypass_list_string, ",;"); + base::ListValue* bypass_list = + TokenizeToStringList(bypass_list_string, ",;"); extension_proxy_rules->Set(keys::kProxyConfigBypassList, bypass_list); } return extension_proxy_rules.release(); } -DictionaryValue* CreateProxyServerDict(const net::ProxyServer& proxy) { - scoped_ptr<DictionaryValue> out(new DictionaryValue); +base::DictionaryValue* CreateProxyServerDict(const net::ProxyServer& proxy) { + scoped_ptr<base::DictionaryValue> out(new base::DictionaryValue); switch (proxy.scheme()) { case net::ProxyServer::SCHEME_HTTP: out->SetString(keys::kProxyConfigRuleScheme, "http"); @@ -449,12 +453,12 @@ DictionaryValue* CreateProxyServerDict(const net::ProxyServer& proxy) { return out.release(); } -DictionaryValue* CreatePacScriptDict( +base::DictionaryValue* CreatePacScriptDict( const ProxyConfigDictionary& proxy_config) { ProxyPrefs::ProxyMode mode; CHECK(proxy_config.GetMode(&mode) && mode == ProxyPrefs::MODE_PAC_SCRIPT); - scoped_ptr<DictionaryValue> pac_script_dict(new DictionaryValue); + scoped_ptr<base::DictionaryValue> pac_script_dict(new base::DictionaryValue); std::string pac_url; if (!proxy_config.GetPacUrl(&pac_url)) { LOG(ERROR) << "Invalid proxy configuration. Missing PAC URL."; @@ -481,9 +485,9 @@ DictionaryValue* CreatePacScriptDict( return pac_script_dict.release(); } -ListValue* TokenizeToStringList(const std::string& in, +base::ListValue* TokenizeToStringList(const std::string& in, const std::string& delims) { - ListValue* out = new ListValue; + base::ListValue* out = new base::ListValue; base::StringTokenizer entries(in, delims); while (entries.GetNext()) out->Append(Value::CreateStringValue(entries.token())); diff --git a/chrome/browser/extensions/api/proxy/proxy_api_helpers_unittest.cc b/chrome/browser/extensions/api/proxy/proxy_api_helpers_unittest.cc index ff3cd32..f0e04da 100644 --- a/chrome/browser/extensions/api/proxy/proxy_api_helpers_unittest.cc +++ b/chrome/browser/extensions/api/proxy/proxy_api_helpers_unittest.cc @@ -27,18 +27,18 @@ const char kSamplePacScriptUrl[] = "http://wpad/wpad.dat"; // Helper function to create a ProxyServer dictionary as defined in the // extension API. -DictionaryValue* CreateTestProxyServerDict(const std::string& host) { - DictionaryValue* dict = new DictionaryValue; +base::DictionaryValue* CreateTestProxyServerDict(const std::string& host) { + base::DictionaryValue* dict = new base::DictionaryValue; dict->SetString(keys::kProxyConfigRuleHost, host); return dict; } // Helper function to create a ProxyServer dictionary as defined in the // extension API. -DictionaryValue* CreateTestProxyServerDict(const std::string& schema, - const std::string& host, - int port) { - DictionaryValue* dict = new DictionaryValue; +base::DictionaryValue* CreateTestProxyServerDict(const std::string& schema, + const std::string& host, + int port) { + base::DictionaryValue* dict = new base::DictionaryValue; dict->SetString(keys::kProxyConfigRuleScheme, schema); dict->SetString(keys::kProxyConfigRuleHost, host); dict->SetInteger(keys::kProxyConfigRulePort, port); @@ -69,7 +69,7 @@ TEST(ExtensionProxyApiHelpers, CreatePACScriptFromDataURL) { } TEST(ExtensionProxyApiHelpers, GetProxyModeFromExtensionPref) { - DictionaryValue proxy_config; + base::DictionaryValue proxy_config; ProxyPrefs::ProxyMode mode; std::string error; bool bad_message = false; @@ -99,7 +99,7 @@ TEST(ExtensionProxyApiHelpers, GetPacUrlFromExtensionPref) { std::string error; bool bad_message = false; - DictionaryValue proxy_config; + base::DictionaryValue proxy_config; proxy_config.SetString( keys::kProxyConfigMode, ProxyPrefs::ProxyModeToString(ProxyPrefs::MODE_PAC_SCRIPT)); @@ -113,7 +113,7 @@ TEST(ExtensionProxyApiHelpers, GetPacUrlFromExtensionPref) { EXPECT_FALSE(bad_message); // Set up a pac script. - DictionaryValue* pacScriptDict = new DictionaryValue; + base::DictionaryValue* pacScriptDict = new base::DictionaryValue; pacScriptDict->SetString(keys::kProxyConfigPacScriptUrl, kSamplePacScriptUrl); proxy_config.Set(keys::kProxyConfigPacScript, pacScriptDict); @@ -129,7 +129,7 @@ TEST(ExtensionProxyApiHelpers, GetPacDataFromExtensionPref) { std::string error; bool bad_message = false; - DictionaryValue proxy_config; + base::DictionaryValue proxy_config; proxy_config.SetString( keys::kProxyConfigMode, ProxyPrefs::ProxyModeToString(ProxyPrefs::MODE_PAC_SCRIPT)); @@ -142,7 +142,7 @@ TEST(ExtensionProxyApiHelpers, GetPacDataFromExtensionPref) { EXPECT_FALSE(bad_message); // Set up a PAC script. - DictionaryValue* pacScriptDict = new DictionaryValue; + base::DictionaryValue* pacScriptDict = new base::DictionaryValue; pacScriptDict->SetString(keys::kProxyConfigPacScriptData, kSamplePacScript); proxy_config.Set(keys::kProxyConfigPacScript, pacScriptDict); @@ -158,7 +158,7 @@ TEST(ExtensionProxyApiHelpers, GetProxyRulesStringFromExtensionPref) { std::string error; bool bad_message = false; - DictionaryValue proxy_config; + base::DictionaryValue proxy_config; proxy_config.SetString( keys::kProxyConfigMode, ProxyPrefs::ProxyModeToString(ProxyPrefs::MODE_FIXED_SERVERS)); @@ -171,7 +171,7 @@ TEST(ExtensionProxyApiHelpers, GetProxyRulesStringFromExtensionPref) { EXPECT_EQ(std::string(), out); EXPECT_EQ(std::string(), error); - DictionaryValue* proxy_rules = new DictionaryValue; + base::DictionaryValue* proxy_rules = new base::DictionaryValue; proxy_rules->Set(keys::field_name[1], CreateTestProxyServerDict("proxy1")); proxy_rules->Set(keys::field_name[2], CreateTestProxyServerDict("proxy2")); proxy_config.Set(keys::kProxyConfigRules, proxy_rules); @@ -189,7 +189,7 @@ TEST(ExtensionProxyApiHelpers, GetBypassListFromExtensionPref) { std::string error; bool bad_message = false; - DictionaryValue proxy_config; + base::DictionaryValue proxy_config; proxy_config.SetString( keys::kProxyConfigMode, ProxyPrefs::ProxyModeToString(ProxyPrefs::MODE_FIXED_SERVERS)); @@ -203,10 +203,10 @@ TEST(ExtensionProxyApiHelpers, GetBypassListFromExtensionPref) { EXPECT_EQ(std::string(), error); EXPECT_FALSE(bad_message); - ListValue* bypass_list = new ListValue; + base::ListValue* bypass_list = new base::ListValue; bypass_list->Append(Value::CreateStringValue("host1")); bypass_list->Append(Value::CreateStringValue("host2")); - DictionaryValue* proxy_rules = new DictionaryValue; + base::DictionaryValue* proxy_rules = new base::DictionaryValue; proxy_rules->Set(keys::kProxyConfigBypassList, bypass_list); proxy_config.Set(keys::kProxyConfigRules, proxy_rules); @@ -220,8 +220,9 @@ TEST(ExtensionProxyApiHelpers, GetBypassListFromExtensionPref) { TEST(ExtensionProxyApiHelpers, CreateProxyConfigDict) { std::string error; - scoped_ptr<DictionaryValue> exp_direct(ProxyConfigDictionary::CreateDirect()); - scoped_ptr<DictionaryValue> out_direct( + scoped_ptr<base::DictionaryValue> exp_direct( + ProxyConfigDictionary::CreateDirect()); + scoped_ptr<base::DictionaryValue> out_direct( CreateProxyConfigDict(ProxyPrefs::MODE_DIRECT, false, std::string(), @@ -231,9 +232,9 @@ TEST(ExtensionProxyApiHelpers, CreateProxyConfigDict) { &error)); EXPECT_TRUE(Value::Equals(exp_direct.get(), out_direct.get())); - scoped_ptr<DictionaryValue> exp_auto( + scoped_ptr<base::DictionaryValue> exp_auto( ProxyConfigDictionary::CreateAutoDetect()); - scoped_ptr<DictionaryValue> out_auto( + scoped_ptr<base::DictionaryValue> out_auto( CreateProxyConfigDict(ProxyPrefs::MODE_AUTO_DETECT, false, std::string(), @@ -243,9 +244,9 @@ TEST(ExtensionProxyApiHelpers, CreateProxyConfigDict) { &error)); EXPECT_TRUE(Value::Equals(exp_auto.get(), out_auto.get())); - scoped_ptr<DictionaryValue> exp_pac_url( + scoped_ptr<base::DictionaryValue> exp_pac_url( ProxyConfigDictionary::CreatePacScript(kSamplePacScriptUrl, false)); - scoped_ptr<DictionaryValue> out_pac_url( + scoped_ptr<base::DictionaryValue> out_pac_url( CreateProxyConfigDict(ProxyPrefs::MODE_PAC_SCRIPT, false, kSamplePacScriptUrl, @@ -255,9 +256,9 @@ TEST(ExtensionProxyApiHelpers, CreateProxyConfigDict) { &error)); EXPECT_TRUE(Value::Equals(exp_pac_url.get(), out_pac_url.get())); - scoped_ptr<DictionaryValue> exp_pac_data( + scoped_ptr<base::DictionaryValue> exp_pac_data( ProxyConfigDictionary::CreatePacScript(kSamplePacScriptAsDataUrl, false)); - scoped_ptr<DictionaryValue> out_pac_data( + scoped_ptr<base::DictionaryValue> out_pac_data( CreateProxyConfigDict(ProxyPrefs::MODE_PAC_SCRIPT, false, std::string(), @@ -267,9 +268,9 @@ TEST(ExtensionProxyApiHelpers, CreateProxyConfigDict) { &error)); EXPECT_TRUE(Value::Equals(exp_pac_data.get(), out_pac_data.get())); - scoped_ptr<DictionaryValue> exp_fixed( + scoped_ptr<base::DictionaryValue> exp_fixed( ProxyConfigDictionary::CreateFixedServers("foo:80", "localhost")); - scoped_ptr<DictionaryValue> out_fixed( + scoped_ptr<base::DictionaryValue> out_fixed( CreateProxyConfigDict(ProxyPrefs::MODE_FIXED_SERVERS, false, std::string(), @@ -279,8 +280,9 @@ TEST(ExtensionProxyApiHelpers, CreateProxyConfigDict) { &error)); EXPECT_TRUE(Value::Equals(exp_fixed.get(), out_fixed.get())); - scoped_ptr<DictionaryValue> exp_system(ProxyConfigDictionary::CreateSystem()); - scoped_ptr<DictionaryValue> out_system( + scoped_ptr<base::DictionaryValue> exp_system( + ProxyConfigDictionary::CreateSystem()); + scoped_ptr<base::DictionaryValue> out_system( CreateProxyConfigDict(ProxyPrefs::MODE_SYSTEM, false, std::string(), @@ -295,7 +297,7 @@ TEST(ExtensionProxyApiHelpers, CreateProxyConfigDict) { } TEST(ExtensionProxyApiHelpers, GetProxyServer) { - DictionaryValue proxy_server_dict; + base::DictionaryValue proxy_server_dict; net::ProxyServer created; std::string error; bool bad_message = false; @@ -320,7 +322,7 @@ TEST(ExtensionProxyApiHelpers, GetProxyServer) { TEST(ExtensionProxyApiHelpers, JoinUrlList) { bool bad_message = false; - ListValue list; + base::ListValue list; list.Append(Value::CreateStringValue("s1")); list.Append(Value::CreateStringValue("s2")); list.Append(Value::CreateStringValue("s3")); @@ -334,15 +336,15 @@ TEST(ExtensionProxyApiHelpers, JoinUrlList) { // This tests CreateProxyServerDict as well. TEST(ExtensionProxyApiHelpers, CreateProxyRulesDict) { - scoped_ptr<DictionaryValue> browser_pref( + scoped_ptr<base::DictionaryValue> browser_pref( ProxyConfigDictionary::CreateFixedServers( "http=proxy1:80;https=proxy2:80;ftp=proxy3:80;socks=proxy4:80", "localhost")); ProxyConfigDictionary config(browser_pref.get()); - scoped_ptr<DictionaryValue> extension_pref(CreateProxyRulesDict(config)); + scoped_ptr<base::DictionaryValue> extension_pref(CreateProxyRulesDict(config)); ASSERT_TRUE(extension_pref.get()); - scoped_ptr<DictionaryValue> expected(new DictionaryValue); + scoped_ptr<base::DictionaryValue> expected(new base::DictionaryValue); expected->Set("proxyForHttp", CreateTestProxyServerDict("http", "proxy1", 80)); expected->Set("proxyForHttps", @@ -351,7 +353,7 @@ TEST(ExtensionProxyApiHelpers, CreateProxyRulesDict) { CreateTestProxyServerDict("http", "proxy3", 80)); expected->Set("fallbackProxy", CreateTestProxyServerDict("socks4", "proxy4", 80)); - ListValue* bypass_list = new ListValue; + base::ListValue* bypass_list = new base::ListValue; bypass_list->Append(Value::CreateStringValue("localhost")); expected->Set(keys::kProxyConfigBypassList, bypass_list); @@ -360,16 +362,17 @@ TEST(ExtensionProxyApiHelpers, CreateProxyRulesDict) { // Test multiple proxies per scheme -- expect that only the first is returned. TEST(ExtensionProxyApiHelpers, CreateProxyRulesDictMultipleProxies) { - scoped_ptr<DictionaryValue> browser_pref( + scoped_ptr<base::DictionaryValue> browser_pref( ProxyConfigDictionary::CreateFixedServers( "http=proxy1:80,default://;https=proxy2:80,proxy1:80;ftp=proxy3:80," "https://proxy5:443;socks=proxy4:80,proxy1:80", "localhost")); ProxyConfigDictionary config(browser_pref.get()); - scoped_ptr<DictionaryValue> extension_pref(CreateProxyRulesDict(config)); + scoped_ptr<base::DictionaryValue> extension_pref( + CreateProxyRulesDict(config)); ASSERT_TRUE(extension_pref.get()); - scoped_ptr<DictionaryValue> expected(new DictionaryValue); + scoped_ptr<base::DictionaryValue> expected(new base::DictionaryValue); expected->Set("proxyForHttp", CreateTestProxyServerDict("http", "proxy1", 80)); expected->Set("proxyForHttps", @@ -378,7 +381,7 @@ TEST(ExtensionProxyApiHelpers, CreateProxyRulesDictMultipleProxies) { CreateTestProxyServerDict("http", "proxy3", 80)); expected->Set("fallbackProxy", CreateTestProxyServerDict("socks4", "proxy4", 80)); - ListValue* bypass_list = new ListValue; + base::ListValue* bypass_list = new base::ListValue; bypass_list->Append(Value::CreateStringValue("localhost")); expected->Set(keys::kProxyConfigBypassList, bypass_list); @@ -387,13 +390,13 @@ TEST(ExtensionProxyApiHelpers, CreateProxyRulesDictMultipleProxies) { // Test if a PAC script URL is specified. TEST(ExtensionProxyApiHelpers, CreatePacScriptDictWithUrl) { - scoped_ptr<DictionaryValue> browser_pref( + scoped_ptr<base::DictionaryValue> browser_pref( ProxyConfigDictionary::CreatePacScript(kSamplePacScriptUrl, false)); ProxyConfigDictionary config(browser_pref.get()); - scoped_ptr<DictionaryValue> extension_pref(CreatePacScriptDict(config)); + scoped_ptr<base::DictionaryValue> extension_pref(CreatePacScriptDict(config)); ASSERT_TRUE(extension_pref.get()); - scoped_ptr<DictionaryValue> expected(new DictionaryValue); + scoped_ptr<base::DictionaryValue> expected(new base::DictionaryValue); expected->SetString(keys::kProxyConfigPacScriptUrl, kSamplePacScriptUrl); expected->SetBoolean(keys::kProxyConfigPacScriptMandatory, false); @@ -402,13 +405,13 @@ TEST(ExtensionProxyApiHelpers, CreatePacScriptDictWithUrl) { // Test if a PAC script is encoded in a data URL. TEST(ExtensionProxyApiHelpers, CreatePacScriptDictWidthData) { - scoped_ptr<DictionaryValue> browser_pref( + scoped_ptr<base::DictionaryValue> browser_pref( ProxyConfigDictionary::CreatePacScript(kSamplePacScriptAsDataUrl, false)); ProxyConfigDictionary config(browser_pref.get()); - scoped_ptr<DictionaryValue> extension_pref(CreatePacScriptDict(config)); + scoped_ptr<base::DictionaryValue> extension_pref(CreatePacScriptDict(config)); ASSERT_TRUE(extension_pref.get()); - scoped_ptr<DictionaryValue> expected(new DictionaryValue); + scoped_ptr<base::DictionaryValue> expected(new base::DictionaryValue); expected->SetString(keys::kProxyConfigPacScriptData, kSamplePacScript); expected->SetBoolean(keys::kProxyConfigPacScriptMandatory, false); @@ -416,12 +419,12 @@ TEST(ExtensionProxyApiHelpers, CreatePacScriptDictWidthData) { } TEST(ExtensionProxyApiHelpers, TokenizeToStringList) { - ListValue expected; + base::ListValue expected; expected.Append(Value::CreateStringValue("s1")); expected.Append(Value::CreateStringValue("s2")); expected.Append(Value::CreateStringValue("s3")); - scoped_ptr<ListValue> out(TokenizeToStringList("s1;s2;s3", ";")); + scoped_ptr<base::ListValue> out(TokenizeToStringList("s1;s2;s3", ";")); EXPECT_TRUE(Value::Equals(&expected, out.get())); } diff --git a/chrome/browser/extensions/api/push_messaging/obfuscated_gaia_id_fetcher.cc b/chrome/browser/extensions/api/push_messaging/obfuscated_gaia_id_fetcher.cc index 3dc1267..6063b1f 100644 --- a/chrome/browser/extensions/api/push_messaging/obfuscated_gaia_id_fetcher.cc +++ b/chrome/browser/extensions/api/push_messaging/obfuscated_gaia_id_fetcher.cc @@ -127,7 +127,7 @@ bool ObfuscatedGaiaIdFetcher::ParseResponse( if (!value.get()) return false; - DictionaryValue* dict = NULL; + base::DictionaryValue* dict = NULL; if (!value->GetAsDictionary(&dict)) return false; diff --git a/chrome/browser/extensions/api/record/record_api_test.cc b/chrome/browser/extensions/api/record/record_api_test.cc index c276ba3..f20dfea 100644 --- a/chrome/browser/extensions/api/record/record_api_test.cc +++ b/chrome/browser/extensions/api/record/record_api_test.cc @@ -241,7 +241,7 @@ class RecordApiTest : public InProcessBrowserTest { // Verify that the URL list of good and bad URLs was properly handled. // Needed by several tests. - bool VerifyURLHandling(const ListValue* result, + bool VerifyURLHandling(const base::ListValue* result, const TestProcessStrategy& strategy) { // Check that the two bad URLs are returned. @@ -345,7 +345,7 @@ IN_PROC_BROWSER_TEST_F(RecordApiTest, MAYBE_CheckPlayback) { // Check for return value with proper stats. EXPECT_EQ(kTestStatistics, utils::GetString(result.get(), kStatsKey)); - ListValue* errors = NULL; + base::ListValue* errors = NULL; EXPECT_TRUE(result->GetList(kErrorsKey, &errors)); EXPECT_TRUE(VerifyURLHandling(errors, strategy)); } diff --git a/chrome/browser/extensions/api/runtime/runtime_api.cc b/chrome/browser/extensions/api/runtime/runtime_api.cc index d00ab43..bdfff1f 100644 --- a/chrome/browser/extensions/api/runtime/runtime_api.cc +++ b/chrome/browser/extensions/api/runtime/runtime_api.cc @@ -100,7 +100,7 @@ static void DispatchOnStartupEventImpl( return; } - scoped_ptr<base::ListValue> event_args(new ListValue()); + scoped_ptr<base::ListValue> event_args(new base::ListValue()); scoped_ptr<Event> event(new Event(kOnStartupEvent, event_args.Pass())); system->event_router()->DispatchEventToExtension(extension_id, event.Pass()); } @@ -143,7 +143,7 @@ void RuntimeEventRouter::DispatchOnInstalledEvent( // chance to register for events. So we register on its behalf. If the // extension does not actually have a listener, the event will just be // ignored. - scoped_ptr<base::ListValue> event_args(new ListValue()); + scoped_ptr<base::ListValue> event_args(new base::ListValue()); base::DictionaryValue* info = new base::DictionaryValue(); event_args->Append(info); if (old_version.IsValid()) { @@ -166,12 +166,12 @@ void RuntimeEventRouter::DispatchOnInstalledEvent( void RuntimeEventRouter::DispatchOnUpdateAvailableEvent( Profile* profile, const std::string& extension_id, - const DictionaryValue* manifest) { + const base::DictionaryValue* manifest) { ExtensionSystem* system = ExtensionSystem::Get(profile); if (!system) return; - scoped_ptr<ListValue> args(new ListValue); + scoped_ptr<base::ListValue> args(new base::ListValue); args->Append(manifest->DeepCopy()); DCHECK(system->event_router()); scoped_ptr<Event> event(new Event(kOnUpdateAvailableEvent, args.Pass())); @@ -185,7 +185,7 @@ void RuntimeEventRouter::DispatchOnBrowserUpdateAvailableEvent( if (!system) return; - scoped_ptr<ListValue> args(new ListValue); + scoped_ptr<base::ListValue> args(new base::ListValue); DCHECK(system->event_router()); scoped_ptr<Event> event(new Event(kOnBrowserUpdateAvailableEvent, args.Pass())); @@ -409,7 +409,7 @@ bool RuntimeGetPackageDirectoryEntryFunction::RunImpl() { if (!policy->CanReadFile(renderer_id, path)) policy->GrantReadFile(renderer_id, path); - DictionaryValue* dict = new DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); SetResult(dict); dict->SetString("fileSystemId", filesystem_id); dict->SetString("baseName", relative_path); diff --git a/chrome/browser/extensions/api/serial/serial_api.cc b/chrome/browser/extensions/api/serial/serial_api.cc index 1a36453..b0e7925 100644 --- a/chrome/browser/extensions/api/serial/serial_api.cc +++ b/chrome/browser/extensions/api/serial/serial_api.cc @@ -60,7 +60,7 @@ bool SerialGetPortsFunction::Prepare() { void SerialGetPortsFunction::Work() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); - ListValue* ports = new ListValue(); + base::ListValue* ports = new base::ListValue(); SerialPortEnumerator::StringSet port_names = SerialPortEnumerator::GenerateValidSerialPortNames(); SerialPortEnumerator::StringSet::const_iterator i = port_names.begin(); @@ -96,7 +96,7 @@ bool SerialOpenFunction::Prepare() { EXTENSION_FUNCTION_VALIDATE(params_.get()); if (params_->options.get()) { - scoped_ptr<DictionaryValue> options = params_->options->ToValue(); + scoped_ptr<base::DictionaryValue> options = params_->options->ToValue(); if (options->HasKey(kBitrateKey)) EXTENSION_FUNCTION_VALIDATE(options->GetInteger(kBitrateKey, &bitrate_)); } @@ -128,12 +128,12 @@ void SerialOpenFunction::Work() { id = -1; } - DictionaryValue* result = new DictionaryValue(); + base::DictionaryValue* result = new base::DictionaryValue(); result->SetInteger(kConnectionIdKey, id); SetResult(result); AsyncWorkCompleted(); } else { - DictionaryValue* result = new DictionaryValue(); + base::DictionaryValue* result = new base::DictionaryValue(); result->SetInteger(kConnectionIdKey, -1); SetResult(result); AsyncWorkCompleted(); @@ -218,7 +218,7 @@ void SerialReadFunction::Work() { if (serial_connection) bytes_read = serial_connection->Read(io_buffer); - DictionaryValue* result = new DictionaryValue(); + base::DictionaryValue* result = new base::DictionaryValue(); // The API is defined to require a 'data' value, so we will always // create a BinaryValue, even if it's zero-length. @@ -262,7 +262,7 @@ void SerialWriteFunction::Work() { else error_ = kSerialConnectionNotFoundError; - DictionaryValue* result = new DictionaryValue(); + base::DictionaryValue* result = new base::DictionaryValue(); result->SetInteger(kBytesWrittenKey, bytes_written); SetResult(result); } @@ -318,7 +318,7 @@ bool SerialGetControlSignalsFunction::Prepare() { } void SerialGetControlSignalsFunction::Work() { - DictionaryValue *result = new DictionaryValue(); + base::DictionaryValue *result = new base::DictionaryValue(); SerialConnection* serial_connection = GetSerialConnection( params_->connection_id); if (serial_connection) { diff --git a/chrome/browser/extensions/api/serial/serial_apitest.cc b/chrome/browser/extensions/api/serial/serial_apitest.cc index 9b1d8dd..646dfd1 100644 --- a/chrome/browser/extensions/api/serial/serial_apitest.cc +++ b/chrome/browser/extensions/api/serial/serial_apitest.cc @@ -36,7 +36,7 @@ namespace extensions { class FakeSerialGetPortsFunction : public AsyncExtensionFunction { public: virtual bool RunImpl() OVERRIDE { - ListValue* ports = new ListValue(); + base::ListValue* ports = new base::ListValue(); ports->Append(Value::CreateStringValue("/dev/fakeserial")); ports->Append(Value::CreateStringValue("\\\\COM800\\")); SetResult(ports); diff --git a/chrome/browser/extensions/api/socket/socket_api.cc b/chrome/browser/extensions/api/socket/socket_api.cc index b21769f..6a43ce7 100644 --- a/chrome/browser/extensions/api/socket/socket_api.cc +++ b/chrome/browser/extensions/api/socket/socket_api.cc @@ -151,7 +151,7 @@ void SocketCreateFunction::Work() { } DCHECK(socket); - DictionaryValue* result = new DictionaryValue(); + base::DictionaryValue* result = new base::DictionaryValue(); result->SetInteger(kSocketIdKey, manager_->Add(socket)); SetResult(result); } @@ -348,7 +348,7 @@ void SocketAcceptFunction::AsyncWorkStart() { void SocketAcceptFunction::OnAccept(int result_code, net::TCPClientSocket *socket) { - DictionaryValue* result = new DictionaryValue(); + base::DictionaryValue* result = new base::DictionaryValue(); result->SetInteger(kResultCodeKey, result_code); if (socket) { Socket *client_socket = new TCPSocket(socket, extension_id(), true); @@ -383,7 +383,7 @@ void SocketReadFunction::AsyncWorkStart() { void SocketReadFunction::OnCompleted(int bytes_read, scoped_refptr<net::IOBuffer> io_buffer) { - DictionaryValue* result = new DictionaryValue(); + base::DictionaryValue* result = new base::DictionaryValue(); result->SetInteger(kResultCodeKey, bytes_read); if (bytes_read > 0) { result->Set(kDataKey, @@ -429,7 +429,7 @@ void SocketWriteFunction::AsyncWorkStart() { } void SocketWriteFunction::OnCompleted(int bytes_written) { - DictionaryValue* result = new DictionaryValue(); + base::DictionaryValue* result = new base::DictionaryValue(); result->SetInteger(kBytesWrittenKey, bytes_written); SetResult(result); @@ -462,7 +462,7 @@ void SocketRecvFromFunction::OnCompleted(int bytes_read, scoped_refptr<net::IOBuffer> io_buffer, const std::string& address, int port) { - DictionaryValue* result = new DictionaryValue(); + base::DictionaryValue* result = new base::DictionaryValue(); result->SetInteger(kResultCodeKey, bytes_read); if (bytes_read > 0) { result->Set(kDataKey, @@ -541,7 +541,7 @@ void SocketSendToFunction::StartSendTo() { } void SocketSendToFunction::OnCompleted(int bytes_written) { - DictionaryValue* result = new DictionaryValue(); + base::DictionaryValue* result = new base::DictionaryValue(); result->SetInteger(kBytesWrittenKey, bytes_written); SetResult(result); diff --git a/chrome/browser/extensions/api/socket/socket_apitest.cc b/chrome/browser/extensions/api/socket/socket_apitest.cc index 970c922..0d0f8c8 100644 --- a/chrome/browser/extensions/api/socket/socket_apitest.cc +++ b/chrome/browser/extensions/api/socket/socket_apitest.cc @@ -125,7 +125,8 @@ IN_PROC_BROWSER_TEST_F(SocketApiTest, SocketUDPCreateGood) { scoped_ptr<base::Value> result(utils::RunFunctionAndReturnSingleResult( socket_create_function.get(), "[\"udp\"]", browser(), utils::NONE)); ASSERT_EQ(base::Value::TYPE_DICTIONARY, result->GetType()); - DictionaryValue *value = static_cast<DictionaryValue*>(result.get()); + base::DictionaryValue *value = + static_cast<base::DictionaryValue*>(result.get()); int socketId = -1; EXPECT_TRUE(value->GetInteger("socketId", &socketId)); EXPECT_TRUE(socketId > 0); @@ -142,7 +143,8 @@ IN_PROC_BROWSER_TEST_F(SocketApiTest, SocketTCPCreateGood) { scoped_ptr<base::Value> result(utils::RunFunctionAndReturnSingleResult( socket_create_function.get(), "[\"tcp\"]", browser(), utils::NONE)); ASSERT_EQ(base::Value::TYPE_DICTIONARY, result->GetType()); - DictionaryValue *value = static_cast<DictionaryValue*>(result.get()); + base::DictionaryValue *value = + static_cast<base::DictionaryValue*>(result.get()); int socketId = -1; EXPECT_TRUE(value->GetInteger("socketId", &socketId)); ASSERT_TRUE(socketId > 0); @@ -162,7 +164,7 @@ IN_PROC_BROWSER_TEST_F(SocketApiTest, GetNetworkList) { // If we're invoking socket tests, all we can confirm is that we have at // least one address, but not what it is. - ListValue *value = static_cast<ListValue*>(result.get()); + base::ListValue *value = static_cast<base::ListValue*>(result.get()); ASSERT_TRUE(value->GetSize() > 0); } diff --git a/chrome/browser/extensions/api/storage/setting_sync_data.cc b/chrome/browser/extensions/api/storage/setting_sync_data.cc index cb4fe79..42f72f2 100644 --- a/chrome/browser/extensions/api/storage/setting_sync_data.cc +++ b/chrome/browser/extensions/api/storage/setting_sync_data.cc @@ -51,7 +51,7 @@ void SettingSyncData::InitFromExtensionSettingSpecifics( if (!value.get()) { LOG(WARNING) << "Specifics for " << specifics.extension_id() << "/" << specifics.key() << " had bad JSON for value: " << specifics.value(); - value.reset(new DictionaryValue()); + value.reset(new base::DictionaryValue()); } internal_ = new Internal( change_type, diff --git a/chrome/browser/extensions/api/storage/settings_apitest.cc b/chrome/browser/extensions/api/storage/settings_apitest.cc index 433f69c..a1b2c6d 100644 --- a/chrome/browser/extensions/api/storage/settings_apitest.cc +++ b/chrome/browser/extensions/api/storage/settings_apitest.cc @@ -196,7 +196,7 @@ class ExtensionSettingsApiTest : public ExtensionApiTest { Namespace settings_namespace, const std::string& action, bool is_final_action) { - scoped_ptr<DictionaryValue> message(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> message(new base::DictionaryValue()); message->SetString("namespace", ToString(settings_namespace)); message->SetString("action", action); message->SetBoolean("isFinalAction", is_final_action); diff --git a/chrome/browser/extensions/api/storage/settings_backend.cc b/chrome/browser/extensions/api/storage/settings_backend.cc index e1a5d37..cd4976a 100644 --- a/chrome/browser/extensions/api/storage/settings_backend.cc +++ b/chrome/browser/extensions/api/storage/settings_backend.cc @@ -41,12 +41,13 @@ SettingsBackend::~SettingsBackend() { ValueStore* SettingsBackend::GetStorage( const std::string& extension_id) const { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); - DictionaryValue empty; + base::DictionaryValue empty; return GetOrCreateStorageWithSyncData(extension_id, empty); } SyncableSettingsStorage* SettingsBackend::GetOrCreateStorageWithSyncData( - const std::string& extension_id, const DictionaryValue& sync_data) const { + const std::string& extension_id, + const base::DictionaryValue& sync_data) const { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); StorageObjMap::iterator maybe_storage = storage_objs_.find(extension_id); @@ -132,10 +133,10 @@ std::set<std::string> SettingsBackend::GetKnownExtensionIDs() const { static void AddAllSyncData( const std::string& extension_id, - const DictionaryValue& src, + const base::DictionaryValue& src, syncer::ModelType type, syncer::SyncDataList* dst) { - for (DictionaryValue::Iterator it(src); !it.IsAtEnd(); it.Advance()) { + for (base::DictionaryValue::Iterator it(src); !it.IsAtEnd(); it.Advance()) { dst->push_back(settings_sync_util::CreateData( extension_id, it.key(), it.value(), type)); } @@ -184,14 +185,15 @@ syncer::SyncMergeResult SettingsBackend::MergeDataAndStartSyncing( sync_error_factory_ = sync_error_factory.Pass(); // Group the initial sync data by extension id. - std::map<std::string, linked_ptr<DictionaryValue> > grouped_sync_data; + std::map<std::string, linked_ptr<base::DictionaryValue> > grouped_sync_data; for (syncer::SyncDataList::const_iterator it = initial_sync_data.begin(); it != initial_sync_data.end(); ++it) { SettingSyncData data(*it); - linked_ptr<DictionaryValue> sync_data = + linked_ptr<base::DictionaryValue> sync_data = grouped_sync_data[data.extension_id()]; if (!sync_data.get()) { - sync_data = linked_ptr<DictionaryValue>(new DictionaryValue()); + sync_data = linked_ptr<base::DictionaryValue>( + new base::DictionaryValue()); grouped_sync_data[data.extension_id()] = sync_data; } DCHECK(!sync_data->HasKey(data.key())) << @@ -203,7 +205,7 @@ syncer::SyncMergeResult SettingsBackend::MergeDataAndStartSyncing( // the future will start being synced as part of the creation process. for (StorageObjMap::iterator it = storage_objs_.begin(); it != storage_objs_.end(); ++it) { - std::map<std::string, linked_ptr<DictionaryValue> >::iterator + std::map<std::string, linked_ptr<base::DictionaryValue> >::iterator maybe_sync_data = grouped_sync_data.find(it->first); syncer::SyncError error; if (maybe_sync_data != grouped_sync_data.end()) { @@ -212,7 +214,7 @@ syncer::SyncMergeResult SettingsBackend::MergeDataAndStartSyncing( CreateSettingsSyncProcessor(it->first).Pass()); grouped_sync_data.erase(it->first); } else { - DictionaryValue empty; + base::DictionaryValue empty; error = it->second->StartSyncing( empty, CreateSettingsSyncProcessor(it->first).Pass()); @@ -224,7 +226,7 @@ syncer::SyncMergeResult SettingsBackend::MergeDataAndStartSyncing( // Eagerly create and init the rest of the storage areas that have sync data. // Under normal circumstances (i.e. not first-time sync) this will be all of // them. - for (std::map<std::string, linked_ptr<DictionaryValue> >::iterator it = + for (std::map<std::string, linked_ptr<base::DictionaryValue> >::iterator it = grouped_sync_data.begin(); it != grouped_sync_data.end(); ++it) { GetOrCreateStorageWithSyncData(it->first, *it->second); } @@ -247,7 +249,7 @@ syncer::SyncError SettingsBackend::ProcessSyncChanges( } // Create any storage areas that don't exist yet but have sync data. - DictionaryValue empty; + base::DictionaryValue empty; for (std::map<std::string, SettingSyncDataList>::iterator it = grouped_sync_data.begin(); it != grouped_sync_data.end(); ++it) { SyncableSettingsStorage* storage = diff --git a/chrome/browser/extensions/api/storage/settings_backend.h b/chrome/browser/extensions/api/storage/settings_backend.h index 9de4f0e..0882b68 100644 --- a/chrome/browser/extensions/api/storage/settings_backend.h +++ b/chrome/browser/extensions/api/storage/settings_backend.h @@ -72,7 +72,7 @@ class SettingsBackend : public syncer::SyncableService { // initializing sync with some initial data if sync enabled. SyncableSettingsStorage* GetOrCreateStorageWithSyncData( const std::string& extension_id, - const DictionaryValue& sync_data) const; + const base::DictionaryValue& sync_data) const; // Gets all extension IDs known to extension settings. This may not be all // installed extensions. diff --git a/chrome/browser/extensions/api/storage/settings_frontend.cc b/chrome/browser/extensions/api/storage/settings_frontend.cc index dece669..a14ed69 100644 --- a/chrome/browser/extensions/api/storage/settings_frontend.cc +++ b/chrome/browser/extensions/api/storage/settings_frontend.cc @@ -44,7 +44,7 @@ class DefaultObserver : public SettingsObserver { const std::string& change_json) OVERRIDE { // TODO(gdk): This is a temporary hack while the refactoring for // string-based event payloads is removed. http://crbug.com/136045 - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(base::JSONReader::Read(change_json)); args->Append(Value::CreateStringValue(settings_namespace::ToString( settings_namespace))); diff --git a/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc b/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc index 28015a8..9705531 100644 --- a/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc +++ b/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc @@ -40,7 +40,7 @@ scoped_ptr<Value> CreateKilobyte() { // Creates a megabyte of data. scoped_ptr<Value> CreateMegabyte() { - ListValue* megabyte = new ListValue(); + base::ListValue* megabyte = new base::ListValue(); for (int i = 0; i < 1000; ++i) { megabyte->Append(CreateKilobyte().release()); } diff --git a/chrome/browser/extensions/api/storage/settings_quota_unittest.cc b/chrome/browser/extensions/api/storage/settings_quota_unittest.cc index 8ed71e8..0e4ea79 100644 --- a/chrome/browser/extensions/api/storage/settings_quota_unittest.cc +++ b/chrome/browser/extensions/api/storage/settings_quota_unittest.cc @@ -11,6 +11,10 @@ #include "chrome/browser/value_store/testing_value_store.h" #include "testing/gtest/include/gtest/gtest.h" +using base::DictionaryValue; +using base::ListValue; +using base::Value; + namespace extensions { // To save typing ValueStore::DEFAULTS/IGNORE_QUOTA everywhere. diff --git a/chrome/browser/extensions/api/storage/settings_storage_quota_enforcer.cc b/chrome/browser/extensions/api/storage/settings_storage_quota_enforcer.cc index ffe05ab..c64dd6c 100644 --- a/chrome/browser/extensions/api/storage/settings_storage_quota_enforcer.cc +++ b/chrome/browser/extensions/api/storage/settings_storage_quota_enforcer.cc @@ -91,7 +91,7 @@ SettingsStorageQuotaEnforcer::SettingsStorageQuotaEnforcer( return; } - for (DictionaryValue::Iterator it(*maybe_settings->settings().get()); + for (base::DictionaryValue::Iterator it(*maybe_settings->settings().get()); !it.IsAtEnd(); it.Advance()) { Allocate(it.key(), it.value(), &used_total_, &used_per_setting_); } @@ -164,10 +164,11 @@ ValueStore::WriteResult SettingsStorageQuotaEnforcer::Set( } ValueStore::WriteResult SettingsStorageQuotaEnforcer::Set( - WriteOptions options, const DictionaryValue& values) { + WriteOptions options, const base::DictionaryValue& values) { size_t new_used_total = used_total_; std::map<std::string, size_t> new_used_per_setting = used_per_setting_; - for (DictionaryValue::Iterator it(values); !it.IsAtEnd(); it.Advance()) { + for (base::DictionaryValue::Iterator it(values); !it.IsAtEnd(); + it.Advance()) { Allocate(it.key(), it.value(), &new_used_total, &new_used_per_setting); if (!(options & IGNORE_QUOTA) && diff --git a/chrome/browser/extensions/api/storage/settings_storage_quota_enforcer.h b/chrome/browser/extensions/api/storage/settings_storage_quota_enforcer.h index 537ee33..7db793e 100644 --- a/chrome/browser/extensions/api/storage/settings_storage_quota_enforcer.h +++ b/chrome/browser/extensions/api/storage/settings_storage_quota_enforcer.h @@ -42,7 +42,7 @@ class SettingsStorageQuotaEnforcer : public ValueStore { const std::string& key, const Value& value) OVERRIDE; virtual WriteResult Set( - WriteOptions options, const DictionaryValue& values) OVERRIDE; + WriteOptions options, const base::DictionaryValue& values) OVERRIDE; virtual WriteResult Remove(const std::string& key) OVERRIDE; virtual WriteResult Remove(const std::vector<std::string>& keys) OVERRIDE; virtual WriteResult Clear() OVERRIDE; diff --git a/chrome/browser/extensions/api/storage/settings_sync_processor.cc b/chrome/browser/extensions/api/storage/settings_sync_processor.cc index 06b4ee8..b016e9e 100644 --- a/chrome/browser/extensions/api/storage/settings_sync_processor.cc +++ b/chrome/browser/extensions/api/storage/settings_sync_processor.cc @@ -31,11 +31,12 @@ SettingsSyncProcessor::~SettingsSyncProcessor() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); } -void SettingsSyncProcessor::Init(const DictionaryValue& initial_state) { +void SettingsSyncProcessor::Init(const base::DictionaryValue& initial_state) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); CHECK(!initialized_) << "Init called multiple times"; - for (DictionaryValue::Iterator i(initial_state); !i.IsAtEnd(); i.Advance()) + for (base::DictionaryValue::Iterator i(initial_state); !i.IsAtEnd(); + i.Advance()) synced_keys_.insert(i.key()); initialized_ = true; diff --git a/chrome/browser/extensions/api/storage/settings_sync_processor.h b/chrome/browser/extensions/api/storage/settings_sync_processor.h index 834e026..acc836f 100644 --- a/chrome/browser/extensions/api/storage/settings_sync_processor.h +++ b/chrome/browser/extensions/api/storage/settings_sync_processor.h @@ -31,7 +31,7 @@ class SettingsSyncProcessor { ~SettingsSyncProcessor(); // Initializes this with the initial state of sync. - void Init(const DictionaryValue& initial_state); + void Init(const base::DictionaryValue& initial_state); // Sends |changes| to sync. syncer::SyncError SendChanges(const ValueStoreChangeList& changes); diff --git a/chrome/browser/extensions/api/storage/settings_sync_unittest.cc b/chrome/browser/extensions/api/storage/settings_sync_unittest.cc index ae4a353..81537aa 100644 --- a/chrome/browser/extensions/api/storage/settings_sync_unittest.cc +++ b/chrome/browser/extensions/api/storage/settings_sync_unittest.cc @@ -24,6 +24,9 @@ #include "sync/api/sync_error_factory_mock.h" #include "testing/gtest/include/gtest/gtest.h" +using base::DictionaryValue; +using base::ListValue; +using base::Value; using content::BrowserThread; namespace extensions { diff --git a/chrome/browser/extensions/api/storage/settings_sync_util.cc b/chrome/browser/extensions/api/storage/settings_sync_util.cc index b9246e0..4509ee9 100644 --- a/chrome/browser/extensions/api/storage/settings_sync_util.cc +++ b/chrome/browser/extensions/api/storage/settings_sync_util.cc @@ -98,7 +98,7 @@ syncer::SyncChange CreateDelete( const std::string& extension_id, const std::string& key, syncer::ModelType type) { - DictionaryValue no_value; + base::DictionaryValue no_value; return syncer::SyncChange( FROM_HERE, syncer::SyncChange::ACTION_DELETE, diff --git a/chrome/browser/extensions/api/storage/settings_test_util.cc b/chrome/browser/extensions/api/storage/settings_test_util.cc index 30bf92b..3d8d110 100644 --- a/chrome/browser/extensions/api/storage/settings_test_util.cc +++ b/chrome/browser/extensions/api/storage/settings_test_util.cc @@ -60,11 +60,11 @@ void MockExtensionService::AddExtensionWithIdAndPermissions( const std::string& id, Manifest::Type type, const std::set<std::string>& permissions_set) { - DictionaryValue manifest; + base::DictionaryValue manifest; manifest.SetString("name", std::string("Test extension ") + id); manifest.SetString("version", "1.0"); - scoped_ptr<ListValue> permissions(new ListValue()); + scoped_ptr<base::ListValue> permissions(new base::ListValue()); for (std::set<std::string>::const_iterator it = permissions_set.begin(); it != permissions_set.end(); ++it) { permissions->Append(Value::CreateStringValue(*it)); @@ -76,8 +76,8 @@ void MockExtensionService::AddExtensionWithIdAndPermissions( break; case Manifest::TYPE_LEGACY_PACKAGED_APP: { - DictionaryValue* app = new DictionaryValue(); - DictionaryValue* app_launch = new DictionaryValue(); + base::DictionaryValue* app = new base::DictionaryValue(); + base::DictionaryValue* app_launch = new base::DictionaryValue(); app_launch->SetString("local_path", "fake.html"); app->Set("launch", app_launch); manifest.Set("app", app); diff --git a/chrome/browser/extensions/api/storage/storage_api.cc b/chrome/browser/extensions/api/storage/storage_api.cc index bfc41a5..d86b763 100644 --- a/chrome/browser/extensions/api/storage/storage_api.cc +++ b/chrome/browser/extensions/api/storage/storage_api.cc @@ -113,10 +113,12 @@ bool SettingsFunction::UseWriteResult(ValueStore::WriteResult result) { namespace { // Adds all StringValues from a ListValue to a vector of strings. -void AddAllStringValues(const ListValue& from, std::vector<std::string>* to) { +void AddAllStringValues(const base::ListValue& from, + std::vector<std::string>* to) { DCHECK(to->empty()); std::string as_string; - for (ListValue::const_iterator it = from.begin(); it != from.end(); ++it) { + for (base::ListValue::const_iterator it = from.begin(); + it != from.end(); ++it) { if ((*it)->GetAsString(&as_string)) { to->push_back(as_string); } @@ -124,9 +126,9 @@ void AddAllStringValues(const ListValue& from, std::vector<std::string>* to) { } // Gets the keys of a DictionaryValue. -std::vector<std::string> GetKeys(const DictionaryValue& dict) { +std::vector<std::string> GetKeys(const base::DictionaryValue& dict) { std::vector<std::string> keys; - for (DictionaryValue::Iterator it(dict); !it.IsAtEnd(); it.Advance()) { + for (base::DictionaryValue::Iterator it(dict); !it.IsAtEnd(); it.Advance()) { keys.push_back(it.key()); } return keys; @@ -162,33 +164,34 @@ void GetModificationQuotaLimitHeuristics(QuotaLimitHeuristics* heuristics) { } // namespace bool StorageStorageAreaGetFunction::RunWithStorage(ValueStore* storage) { - Value* input = NULL; + base::Value* input = NULL; EXTENSION_FUNCTION_VALIDATE(args_->Get(0, &input)); switch (input->GetType()) { - case Value::TYPE_NULL: + case base::Value::TYPE_NULL: return UseReadResult(storage->Get()); - case Value::TYPE_STRING: { + case base::Value::TYPE_STRING: { std::string as_string; input->GetAsString(&as_string); return UseReadResult(storage->Get(as_string)); } - case Value::TYPE_LIST: { + case base::Value::TYPE_LIST: { std::vector<std::string> as_string_list; - AddAllStringValues(*static_cast<ListValue*>(input), &as_string_list); + AddAllStringValues(*static_cast<base::ListValue*>(input), + &as_string_list); return UseReadResult(storage->Get(as_string_list)); } - case Value::TYPE_DICTIONARY: { - DictionaryValue* as_dict = static_cast<DictionaryValue*>(input); + case base::Value::TYPE_DICTIONARY: { + base::DictionaryValue* as_dict = static_cast<base::DictionaryValue*>(input); ValueStore::ReadResult result = storage->Get(GetKeys(*as_dict)); if (result->HasError()) { return UseReadResult(result.Pass()); } - DictionaryValue* with_default_values = as_dict->DeepCopy(); + base::DictionaryValue* with_default_values = as_dict->DeepCopy(); with_default_values->MergeDictionary(result->settings().get()); return UseReadResult( ValueStore::MakeReadResult(with_default_values)); @@ -202,26 +205,27 @@ bool StorageStorageAreaGetFunction::RunWithStorage(ValueStore* storage) { bool StorageStorageAreaGetBytesInUseFunction::RunWithStorage( ValueStore* storage) { - Value* input = NULL; + base::Value* input = NULL; EXTENSION_FUNCTION_VALIDATE(args_->Get(0, &input)); size_t bytes_in_use = 0; switch (input->GetType()) { - case Value::TYPE_NULL: + case base::Value::TYPE_NULL: bytes_in_use = storage->GetBytesInUse(); break; - case Value::TYPE_STRING: { + case base::Value::TYPE_STRING: { std::string as_string; input->GetAsString(&as_string); bytes_in_use = storage->GetBytesInUse(as_string); break; } - case Value::TYPE_LIST: { + case base::Value::TYPE_LIST: { std::vector<std::string> as_string_list; - AddAllStringValues(*static_cast<ListValue*>(input), &as_string_list); + AddAllStringValues(*static_cast<base::ListValue*>(input), + &as_string_list); bytes_in_use = storage->GetBytesInUse(as_string_list); break; } @@ -231,12 +235,12 @@ bool StorageStorageAreaGetBytesInUseFunction::RunWithStorage( return false; } - SetResult(Value::CreateIntegerValue(bytes_in_use)); + SetResult(base::Value::CreateIntegerValue(bytes_in_use)); return true; } bool StorageStorageAreaSetFunction::RunWithStorage(ValueStore* storage) { - DictionaryValue* input = NULL; + base::DictionaryValue* input = NULL; EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &input)); return UseWriteResult(storage->Set(ValueStore::DEFAULTS, *input)); } @@ -247,19 +251,20 @@ void StorageStorageAreaSetFunction::GetQuotaLimitHeuristics( } bool StorageStorageAreaRemoveFunction::RunWithStorage(ValueStore* storage) { - Value* input = NULL; + base::Value* input = NULL; EXTENSION_FUNCTION_VALIDATE(args_->Get(0, &input)); switch (input->GetType()) { - case Value::TYPE_STRING: { + case base::Value::TYPE_STRING: { std::string as_string; input->GetAsString(&as_string); return UseWriteResult(storage->Remove(as_string)); } - case Value::TYPE_LIST: { + case base::Value::TYPE_LIST: { std::vector<std::string> as_string_list; - AddAllStringValues(*static_cast<ListValue*>(input), &as_string_list); + AddAllStringValues(*static_cast<base::ListValue*>(input), + &as_string_list); return UseWriteResult(storage->Remove(as_string_list)); } diff --git a/chrome/browser/extensions/api/storage/syncable_settings_storage.cc b/chrome/browser/extensions/api/storage/syncable_settings_storage.cc index 221ebeb..5bfc039 100644 --- a/chrome/browser/extensions/api/storage/syncable_settings_storage.cc +++ b/chrome/browser/extensions/api/storage/syncable_settings_storage.cc @@ -75,7 +75,7 @@ ValueStore::WriteResult SyncableSettingsStorage::Set( } ValueStore::WriteResult SyncableSettingsStorage::Set( - WriteOptions options, const DictionaryValue& values) { + WriteOptions options, const base::DictionaryValue& values) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); WriteResult result = delegate_->Set(options, values); if (result->HasError()) { @@ -129,7 +129,7 @@ void SyncableSettingsStorage::SyncResultIfEnabled( // Sync-related methods. syncer::SyncError SyncableSettingsStorage::StartSyncing( - const DictionaryValue& sync_state, + const base::DictionaryValue& sync_state, scoped_ptr<SettingsSyncProcessor> sync_processor) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); DCHECK(!sync_processor_.get()); @@ -145,7 +145,7 @@ syncer::SyncError SyncableSettingsStorage::StartSyncing( sync_processor_->type()); } - const DictionaryValue& settings = *maybe_settings->settings().get(); + const base::DictionaryValue& settings = *maybe_settings->settings().get(); if (sync_state.empty()) return SendLocalSettingsToSync(settings); else @@ -153,11 +153,11 @@ syncer::SyncError SyncableSettingsStorage::StartSyncing( } syncer::SyncError SyncableSettingsStorage::SendLocalSettingsToSync( - const DictionaryValue& settings) { + const base::DictionaryValue& settings) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); ValueStoreChangeList changes; - for (DictionaryValue::Iterator i(settings); !i.IsAtEnd(); i.Advance()) { + for (base::DictionaryValue::Iterator i(settings); !i.IsAtEnd(); i.Advance()) { changes.push_back(ValueStoreChange(i.key(), NULL, i.value().DeepCopy())); } @@ -172,14 +172,15 @@ syncer::SyncError SyncableSettingsStorage::SendLocalSettingsToSync( } syncer::SyncError SyncableSettingsStorage::OverwriteLocalSettingsWithSync( - const DictionaryValue& sync_state, const DictionaryValue& settings) { + const base::DictionaryValue& sync_state, + const base::DictionaryValue& settings) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); // Treat this as a list of changes to sync and use ProcessSyncChanges. // This gives notifications etc for free. - scoped_ptr<DictionaryValue> new_sync_state(sync_state.DeepCopy()); + scoped_ptr<base::DictionaryValue> new_sync_state(sync_state.DeepCopy()); SettingSyncDataList changes; - for (DictionaryValue::Iterator it(settings); !it.IsAtEnd(); it.Advance()) { + for (base::DictionaryValue::Iterator it(settings); !it.IsAtEnd(); it.Advance()) { Value* orphaned_sync_value = NULL; if (new_sync_state->RemoveWithoutPathExpansion( it.key(), &orphaned_sync_value)) { @@ -202,13 +203,13 @@ syncer::SyncError SyncableSettingsStorage::OverwriteLocalSettingsWithSync( syncer::SyncChange::ACTION_DELETE, extension_id_, it.key(), - scoped_ptr<Value>(new DictionaryValue()))); + scoped_ptr<Value>(new base::DictionaryValue()))); } } // Add all new settings to local settings. while (!new_sync_state->empty()) { - DictionaryValue::Iterator first_entry(*new_sync_state); + base::DictionaryValue::Iterator first_entry(*new_sync_state); std::string key = first_entry.key(); Value* value = NULL; CHECK(new_sync_state->RemoveWithoutPathExpansion(key, &value)); diff --git a/chrome/browser/extensions/api/storage/syncable_settings_storage.h b/chrome/browser/extensions/api/storage/syncable_settings_storage.h index ec57f83..d971ef0 100644 --- a/chrome/browser/extensions/api/storage/syncable_settings_storage.h +++ b/chrome/browser/extensions/api/storage/syncable_settings_storage.h @@ -43,7 +43,7 @@ class SyncableSettingsStorage : public ValueStore { const std::string& key, const Value& value) OVERRIDE; virtual WriteResult Set( - WriteOptions options, const DictionaryValue& values) OVERRIDE; + WriteOptions options, const base::DictionaryValue& values) OVERRIDE; virtual WriteResult Remove(const std::string& key) OVERRIDE; virtual WriteResult Remove(const std::vector<std::string>& keys) OVERRIDE; virtual WriteResult Clear() OVERRIDE; @@ -54,7 +54,7 @@ class SyncableSettingsStorage : public ValueStore { // Must only be called if sync isn't already active. syncer::SyncError StartSyncing( - const DictionaryValue& sync_state, + const base::DictionaryValue& sync_state, scoped_ptr<SettingsSyncProcessor> sync_processor); // May be called at any time (idempotent). @@ -69,11 +69,12 @@ class SyncableSettingsStorage : public ValueStore { // Sends all local settings to sync (synced settings assumed to be empty). syncer::SyncError SendLocalSettingsToSync( - const DictionaryValue& settings); + const base::DictionaryValue& settings); // Overwrites local state with sync state. syncer::SyncError OverwriteLocalSettingsWithSync( - const DictionaryValue& sync_state, const DictionaryValue& settings); + const base::DictionaryValue& sync_state, + const base::DictionaryValue& settings); // Called when an Add/Update/Remove comes from sync. Ownership of Value*s // are taken. diff --git a/chrome/browser/extensions/api/storage/weak_unlimited_settings_storage.cc b/chrome/browser/extensions/api/storage/weak_unlimited_settings_storage.cc index 7adf5f4..241ae2f 100644 --- a/chrome/browser/extensions/api/storage/weak_unlimited_settings_storage.cc +++ b/chrome/browser/extensions/api/storage/weak_unlimited_settings_storage.cc @@ -41,12 +41,12 @@ ValueStore::ReadResult WeakUnlimitedSettingsStorage::Get() { } ValueStore::WriteResult WeakUnlimitedSettingsStorage::Set( - WriteOptions options, const std::string& key, const Value& value) { + WriteOptions options, const std::string& key, const base::Value& value) { return delegate_->Set(IGNORE_QUOTA, key, value); } ValueStore::WriteResult WeakUnlimitedSettingsStorage::Set( - WriteOptions options, const DictionaryValue& values) { + WriteOptions options, const base::DictionaryValue& values) { return delegate_->Set(IGNORE_QUOTA, values); } diff --git a/chrome/browser/extensions/api/storage/weak_unlimited_settings_storage.h b/chrome/browser/extensions/api/storage/weak_unlimited_settings_storage.h index c74d57c..66a4002 100644 --- a/chrome/browser/extensions/api/storage/weak_unlimited_settings_storage.h +++ b/chrome/browser/extensions/api/storage/weak_unlimited_settings_storage.h @@ -32,7 +32,7 @@ class WeakUnlimitedSettingsStorage : public ValueStore { const std::string& key, const Value& value) OVERRIDE; virtual WriteResult Set( - WriteOptions options, const DictionaryValue& values) OVERRIDE; + WriteOptions options, const base::DictionaryValue& values) OVERRIDE; virtual WriteResult Remove(const std::string& key) OVERRIDE; virtual WriteResult Remove(const std::vector<std::string>& keys) OVERRIDE; virtual WriteResult Clear() OVERRIDE; diff --git a/chrome/browser/extensions/api/streams_private/streams_private_api.cc b/chrome/browser/extensions/api/streams_private/streams_private_api.cc index d87c9a0..dc1fb07 100644 --- a/chrome/browser/extensions/api/streams_private/streams_private_api.cc +++ b/chrome/browser/extensions/api/streams_private/streams_private_api.cc @@ -52,7 +52,7 @@ void StreamsPrivateAPI::ExecuteMimeTypeHandler( scoped_ptr<content::StreamHandle> stream, int64 expected_content_size) { // Create the event's arguments value. - scoped_ptr<ListValue> event_args(new ListValue()); + scoped_ptr<base::ListValue> event_args(new base::ListValue()); event_args->Append(new base::StringValue(stream->GetMimeType())); event_args->Append(new base::StringValue(stream->GetOriginalURL().spec())); event_args->Append(new base::StringValue(stream->GetURL().spec())); diff --git a/chrome/browser/extensions/api/streams_private/streams_private_apitest.cc b/chrome/browser/extensions/api/streams_private/streams_private_apitest.cc index 7fd3672..83e8c90 100644 --- a/chrome/browser/extensions/api/streams_private/streams_private_apitest.cc +++ b/chrome/browser/extensions/api/streams_private/streams_private_apitest.cc @@ -134,7 +134,7 @@ class StreamsPrivateApiTest : public ExtensionApiTest { // event with the "test/done" MIME type (unless the 'chrome.test.notifyFail' // has already been called). void SendDoneEvent() { - scoped_ptr<ListValue> event_args(new ListValue()); + scoped_ptr<base::ListValue> event_args(new base::ListValue()); event_args->Append(new base::StringValue("test/done")); event_args->Append(new base::StringValue("http://foo")); event_args->Append(new base::StringValue("blob://bar")); diff --git a/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.cc b/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.cc index e856033..3b76078 100644 --- a/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.cc +++ b/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.cc @@ -75,7 +75,7 @@ void ExtensionSyncEventObserver::OnFileSynced( sync_file_system::SyncFileStatus status, sync_file_system::SyncAction action, sync_file_system::SyncDirection direction) { - scoped_ptr<base::ListValue> params(new ListValue()); + scoped_ptr<base::ListValue> params(new base::ListValue()); // For now we always assume events come only for files (not directories). params->Append(CreateDictionaryValueForFileSystemEntry( diff --git a/chrome/browser/extensions/api/sync_file_system/sync_file_system_api.cc b/chrome/browser/extensions/api/sync_file_system/sync_file_system_api.cc index cb0c0fd..a0274b2 100644 --- a/chrome/browser/extensions/api/sync_file_system/sync_file_system_api.cc +++ b/chrome/browser/extensions/api/sync_file_system/sync_file_system_api.cc @@ -171,7 +171,7 @@ void SyncFileSystemRequestFileSystemFunction::DidOpenFileSystem( return; } - DictionaryValue* dict = new DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); SetResult(dict); dict->SetString("name", file_system_name); dict->SetString("root", root_url.spec()); @@ -220,7 +220,7 @@ SyncFileSystemGetFileStatusesFunction::~SyncFileSystemGetFileStatusesFunction( bool SyncFileSystemGetFileStatusesFunction::RunImpl() { // All FileEntries converted into array of URL Strings in JS custom bindings. - ListValue* file_entry_urls = NULL; + base::ListValue* file_entry_urls = NULL; EXTENSION_FUNCTION_VALIDATE(args_->GetList(0, &file_entry_urls)); scoped_refptr<fileapi::FileSystemContext> file_system_context = @@ -274,7 +274,7 @@ void SyncFileSystemGetFileStatusesFunction::DidGetFileStatus( base::ListValue* status_array = new base::ListValue(); for (URLToStatusMap::iterator it = file_sync_statuses_.begin(); it != file_sync_statuses_.end(); ++it) { - DictionaryValue* dict = new DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); status_array->Append(dict); fileapi::FileSystemURL url = it->first; diff --git a/chrome/browser/extensions/api/system_private/system_private_api.cc b/chrome/browser/extensions/api/system_private/system_private_api.cc index bab2503..55296e3 100644 --- a/chrome/browser/extensions/api/system_private/system_private_api.cc +++ b/chrome/browser/extensions/api/system_private/system_private_api.cc @@ -124,7 +124,7 @@ bool SystemPrivateGetUpdateStatusFunction::RunImpl() { state = kNotAvailableState; } #endif - DictionaryValue* dict = new DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetString(kStateKey, state); dict->SetDouble(kDownloadProgressKey, download_progress); SetResult(dict); @@ -133,14 +133,14 @@ bool SystemPrivateGetUpdateStatusFunction::RunImpl() { } void DispatchVolumeChangedEvent(double volume, bool is_volume_muted) { - DictionaryValue* dict = new DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetDouble(kVolumeKey, volume); dict->SetBoolean(kIsVolumeMutedKey, is_volume_muted); DispatchEvent(kOnVolumeChanged, dict); } void DispatchBrightnessChangedEvent(int brightness, bool user_initiated) { - DictionaryValue* dict = new DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetInteger(kBrightnessKey, brightness); dict->SetBoolean(kUserInitiatedKey, user_initiated); DispatchEvent(kOnBrightnessChanged, dict); diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc b/chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc index bd2d5c1..88d37be 100644 --- a/chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc +++ b/chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc @@ -312,7 +312,7 @@ void TabCaptureRegistry::DispatchStatusChangeEvent( info->status = request->status; info->fullscreen = request->fullscreen; - scoped_ptr<base::ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(info->ToValue().release()); scoped_ptr<Event> event(new Event( extensions::event_names::kOnTabCaptureStatusChanged, args.Pass())); diff --git a/chrome/browser/extensions/api/tabs/ash_panel_contents.cc b/chrome/browser/extensions/api/tabs/ash_panel_contents.cc index 059847b..37f7a24 100644 --- a/chrome/browser/extensions/api/tabs/ash_panel_contents.cc +++ b/chrome/browser/extensions/api/tabs/ash_panel_contents.cc @@ -78,9 +78,9 @@ base::DictionaryValue* AshPanelWindowController::CreateWindowValueWithTabs( const extensions::Extension* extension) const { DCHECK(IsVisibleToExtension(extension)); base::DictionaryValue* result = CreateWindowValue(); - DictionaryValue* tab_value = CreateTabValue(extension, 0); + base::DictionaryValue* tab_value = CreateTabValue(extension, 0); if (tab_value) { - base::ListValue* tab_list = new ListValue(); + base::ListValue* tab_list = new base::ListValue(); tab_list->Append(tab_value); result->Set(extensions::tabs_constants::kTabsKey, tab_list); } @@ -97,7 +97,7 @@ base::DictionaryValue* AshPanelWindowController::CreateTabValue( if (!web_contents) return NULL; - DictionaryValue* tab_value = new DictionaryValue(); + base::DictionaryValue* tab_value = new base::DictionaryValue(); tab_value->SetInteger(extensions::tabs_constants::kIdKey, SessionID::IdForTab(web_contents)); tab_value->SetInteger(extensions::tabs_constants::kIndexKey, 0); diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc index d643040..2b1e14b 100644 --- a/chrome/browser/extensions/api/tabs/tabs_api.cc +++ b/chrome/browser/extensions/api/tabs/tabs_api.cc @@ -328,7 +328,7 @@ bool WindowsGetAllFunction::RunImpl() { if (params->get_info.get() && params->get_info->populate.get()) populate_tabs = *params->get_info->populate; - ListValue* window_list = new ListValue(); + base::ListValue* window_list = new base::ListValue(); const WindowControllerList::ControllerList& windows = WindowControllerList::GetInstance()->windows(); for (WindowControllerList::ControllerList::const_iterator iter = @@ -396,7 +396,7 @@ bool WindowsCreateFunction::ShouldOpenIncognitoWindow( } bool WindowsCreateFunction::RunImpl() { - DictionaryValue* args = NULL; + base::DictionaryValue* args = NULL; std::vector<GURL> urls; TabStripModel* source_tab_strip = NULL; int tab_index = -1; @@ -417,7 +417,8 @@ bool WindowsCreateFunction::RunImpl() { url_value->GetAsString(&url_string); url_strings.push_back(url_string); } else if (url_value->IsType(Value::TYPE_LIST)) { - const ListValue* url_list = static_cast<const ListValue*>(url_value); + const base::ListValue* url_list = + static_cast<const base::ListValue*>(url_value); for (size_t i = 0; i < url_list->GetSize(); ++i) { std::string url_string; EXTENSION_FUNCTION_VALIDATE(url_list->GetString(i, &url_string)); @@ -689,7 +690,7 @@ bool WindowsCreateFunction::RunImpl() { bool WindowsUpdateFunction::RunImpl() { int window_id = extension_misc::kUnknownWindowId; EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &window_id)); - DictionaryValue* update_props; + base::DictionaryValue* update_props; EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(1, &update_props)); WindowController* controller; @@ -937,7 +938,7 @@ bool TabsQueryFunction::RunImpl() { params->query_info.window_type); } - ListValue* result = new ListValue(); + base::ListValue* result = new base::ListValue(); for (chrome::BrowserIterator it; !it.done(); it.Next()) { Browser* browser = *it; if (!profile()->IsSameProfile(browser->profile())) @@ -1445,10 +1446,11 @@ void TabsUpdateFunction::PopulateResult() { SetResult(ExtensionTabUtil::CreateTabValue(web_contents_, GetExtension())); } -void TabsUpdateFunction::OnExecuteCodeFinished(const std::string& error, - int32 on_page_id, - const GURL& url, - const ListValue& script_result) { +void TabsUpdateFunction::OnExecuteCodeFinished( + const std::string& error, + int32 on_page_id, + const GURL& url, + const base::ListValue& script_result) { if (error.empty()) PopulateResult(); else @@ -1462,7 +1464,7 @@ bool TabsMoveFunction::RunImpl() { int new_index = params->move_properties.index; int* window_id = params->move_properties.window_id.get(); - ListValue tab_values; + base::ListValue tab_values; std::vector<int> tab_ids; if (params->tab_ids.as_array.get()) { @@ -1501,7 +1503,7 @@ bool TabsMoveFunction::RunImpl() { bool TabsMoveFunction::MoveTab(int tab_id, int *new_index, int iteration, - ListValue* tab_values, + base::ListValue* tab_values, int* window_id) { Browser* source_browser = NULL; TabStripModel* source_tab_strip = NULL; @@ -2024,10 +2026,11 @@ bool TabsExecuteScriptFunction::ShouldInsertCSS() const { return false; } -void TabsExecuteScriptFunction::OnExecuteCodeFinished(const std::string& error, - int32 on_page_id, - const GURL& on_url, - const ListValue& result) { +void TabsExecuteScriptFunction::OnExecuteCodeFinished( + const std::string& error, + int32 on_page_id, + const GURL& on_url, + const base::ListValue& result) { if (error.empty()) SetResult(result.DeepCopy()); ExecuteCodeInTabFunction::OnExecuteCodeFinished(error, on_page_id, on_url, @@ -2044,7 +2047,7 @@ bool ExecuteCodeInTabFunction::Init() { EXTENSION_FUNCTION_VALIDATE(tab_id >= 0); // |details| are not optional. - DictionaryValue* details_value = NULL; + base::DictionaryValue* details_value = NULL; if (!args_->GetDictionary(1, &details_value)) return false; scoped_ptr<InjectDetails> details(new InjectDetails()); diff --git a/chrome/browser/extensions/api/tabs/tabs_api.h b/chrome/browser/extensions/api/tabs/tabs_api.h index 3b61e62..80e47a6 100644 --- a/chrome/browser/extensions/api/tabs/tabs_api.h +++ b/chrome/browser/extensions/api/tabs/tabs_api.h @@ -150,7 +150,7 @@ class TabsUpdateFunction : public AsyncExtensionFunction { void OnExecuteCodeFinished(const std::string& error, int32 on_page_id, const GURL& on_url, - const ListValue& script_result); + const base::ListValue& script_result); DECLARE_EXTENSION_FUNCTION("tabs.update", TABS_UPDATE) }; @@ -160,7 +160,7 @@ class TabsMoveFunction : public SyncExtensionFunction { bool MoveTab(int tab_id, int* new_index, int iteration, - ListValue* tab_values, + base::ListValue* tab_values, int* window_id); DECLARE_EXTENSION_FUNCTION("tabs.move", TABS_MOVE) }; @@ -253,10 +253,11 @@ class TabsExecuteScriptFunction : public ExecuteCodeInTabFunction { private: virtual ~TabsExecuteScriptFunction() {} - virtual void OnExecuteCodeFinished(const std::string& error, - int32 on_page_id, - const GURL& on_url, - const ListValue& script_result) OVERRIDE; + virtual void OnExecuteCodeFinished( + const std::string& error, + int32 on_page_id, + const GURL& on_url, + const base::ListValue& script_result) OVERRIDE; DECLARE_EXTENSION_FUNCTION("tabs.executeScript", TABS_EXECUTESCRIPT) }; diff --git a/chrome/browser/extensions/api/tabs/tabs_interactive_test.cc b/chrome/browser/extensions/api/tabs/tabs_interactive_test.cc index 7af0c97..293f076 100644 --- a/chrome/browser/extensions/api/tabs/tabs_interactive_test.cc +++ b/chrome/browser/extensions/api/tabs/tabs_interactive_test.cc @@ -45,7 +45,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, MAYBE_GetLastFocusedWindow) { // The id should always match the last focused window and does not depend // on what was passed to RunFunctionAndReturnSingleResult. EXPECT_EQ(focused_window_id, utils::GetInteger(result.get(), "id")); - ListValue* tabs = NULL; + base::ListValue* tabs = NULL; EXPECT_FALSE(result.get()->GetList(keys::kTabsKey, &tabs)); function = new extensions::WindowsGetLastFocusedFunction(); @@ -91,11 +91,11 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, DISABLED_QueryLastFocusedWindowTabs) { "[{\"lastFocusedWindow\":true}]", browser()))); - ListValue* result_tabs = result.get(); + base::ListValue* result_tabs = result.get(); // We should have one initial tab and one added tab. EXPECT_EQ(2u, result_tabs->GetSize()); for (size_t i = 0; i < result_tabs->GetSize(); ++i) { - DictionaryValue* result_tab = NULL; + base::DictionaryValue* result_tab = NULL; EXPECT_TRUE(result_tabs->GetDictionary(i, &result_tab)); EXPECT_EQ(focused_window_id, utils::GetInteger(result_tab, keys::kWindowIdKey)); @@ -112,7 +112,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, DISABLED_QueryLastFocusedWindowTabs) { // We should get one tab for each extra window and one for the initial window. EXPECT_EQ(kExtraWindows + 1, result_tabs->GetSize()); for (size_t i = 0; i < result_tabs->GetSize(); ++i) { - DictionaryValue* result_tab = NULL; + base::DictionaryValue* result_tab = NULL; EXPECT_TRUE(result_tabs->GetDictionary(i, &result_tab)); EXPECT_NE(focused_window_id, utils::GetInteger(result_tab, keys::kWindowIdKey)); diff --git a/chrome/browser/extensions/api/tabs/tabs_test.cc b/chrome/browser/extensions/api/tabs/tabs_test.cc index 821d254..0ce9e1f 100644 --- a/chrome/browser/extensions/api/tabs/tabs_test.cc +++ b/chrome/browser/extensions/api/tabs/tabs_test.cc @@ -83,7 +83,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, GetWindow) { EXPECT_EQ(window_id, utils::GetInteger(result.get(), "id")); // "populate" was enabled so tabs should be populated. - ListValue* tabs = NULL; + base::ListValue* tabs = NULL; EXPECT_TRUE(result.get()->GetList(keys::kTabsKey, &tabs)); // TODO(aa): Can't assume window is focused. On mac, calling Activate() from a @@ -153,7 +153,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, GetCurrentWindow) { // The id should match the window id of the browser instance that was passed // to RunFunctionAndReturnSingleResult. EXPECT_EQ(new_id, utils::GetInteger(result.get(), "id")); - ListValue* tabs = NULL; + base::ListValue* tabs = NULL; EXPECT_FALSE(result.get()->GetList(keys::kTabsKey, &tabs)); // Get the current window using the old window and make the tabs populated. @@ -190,15 +190,15 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, GetAllWindows) { "[]", browser()))); - ListValue* windows = result.get(); + base::ListValue* windows = result.get(); EXPECT_EQ(NUM_WINDOWS, windows->GetSize()); for (size_t i = 0; i < NUM_WINDOWS; ++i) { - DictionaryValue* result_window = NULL; + base::DictionaryValue* result_window = NULL; EXPECT_TRUE(windows->GetDictionary(i, &result_window)); result_ids.insert(utils::GetInteger(result_window, "id")); // "populate" was not passed in so tabs are not populated. - ListValue* tabs = NULL; + base::ListValue* tabs = NULL; EXPECT_FALSE(result_window->GetList(keys::kTabsKey, &tabs)); } // The returned ids should contain all the current browser instance ids. @@ -215,12 +215,12 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, GetAllWindows) { windows = result.get(); EXPECT_EQ(NUM_WINDOWS, windows->GetSize()); for (size_t i = 0; i < windows->GetSize(); ++i) { - DictionaryValue* result_window = NULL; + base::DictionaryValue* result_window = NULL; EXPECT_TRUE(windows->GetDictionary(i, &result_window)); result_ids.insert(utils::GetInteger(result_window, "id")); // "populate" was enabled so tabs should be populated. - ListValue* tabs = NULL; + base::ListValue* tabs = NULL; EXPECT_TRUE(result_window->GetList(keys::kTabsKey, &tabs)); } // The returned ids should contain all the current browser instance ids. @@ -404,11 +404,11 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, QueryCurrentWindowTabs) { "[{\"currentWindow\":true}]", browser()))); - ListValue* result_tabs = result.get(); + base::ListValue* result_tabs = result.get(); // We should have one initial tab and one added tab. EXPECT_EQ(2u, result_tabs->GetSize()); for (size_t i = 0; i < result_tabs->GetSize(); ++i) { - DictionaryValue* result_tab = NULL; + base::DictionaryValue* result_tab = NULL; EXPECT_TRUE(result_tabs->GetDictionary(i, &result_tab)); EXPECT_EQ(window_id, utils::GetInteger(result_tab, keys::kWindowIdKey)); } @@ -425,7 +425,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, QueryCurrentWindowTabs) { // We should have one tab for each extra window. EXPECT_EQ(kExtraWindows, result_tabs->GetSize()); for (size_t i = 0; i < kExtraWindows; ++i) { - DictionaryValue* result_tab = NULL; + base::DictionaryValue* result_tab = NULL; EXPECT_TRUE(result_tabs->GetDictionary(i, &result_tab)); EXPECT_NE(window_id, utils::GetInteger(result_tab, keys::kWindowIdKey)); } diff --git a/chrome/browser/extensions/api/tabs/windows_event_router.cc b/chrome/browser/extensions/api/tabs/windows_event_router.cc index 2880c3af..54d9b2d 100644 --- a/chrome/browser/extensions/api/tabs/windows_event_router.cc +++ b/chrome/browser/extensions/api/tabs/windows_event_router.cc @@ -57,8 +57,9 @@ void WindowsEventRouter::OnWindowControllerAdded( if (!profile_->IsSameProfile(window_controller->profile())) return; - scoped_ptr<base::ListValue> args(new ListValue()); - DictionaryValue* window_dictionary = window_controller->CreateWindowValue(); + scoped_ptr<base::ListValue> args(new base::ListValue()); + base::DictionaryValue* window_dictionary = + window_controller->CreateWindowValue(); args->Append(window_dictionary); DispatchEvent(event_names::kOnWindowCreated, window_controller->profile(), args.Pass()); @@ -70,7 +71,7 @@ void WindowsEventRouter::OnWindowControllerRemoved( return; int window_id = window_controller->GetWindowId(); - scoped_ptr<base::ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(Value::CreateIntegerValue(window_id)); DispatchEvent(event_names::kOnWindowRemoved, window_controller->profile(), args.Pass()); @@ -107,7 +108,7 @@ static void WillDispatchWindowFocusedEvent(Profile* new_active_profile, int window_id, Profile* profile, const Extension* extension, - ListValue* event_args) { + base::ListValue* event_args) { // When switching between windows in the default and incognito profiles, // dispatch WINDOW_ID_NONE to extensions whose profile lost focus that // can't see the new focused window across the incognito boundary. @@ -143,7 +144,7 @@ void WindowsEventRouter::OnActiveWindowChanged( focused_window_id_ = window_id; scoped_ptr<Event> event(new Event(event_names::kOnWindowFocusedChanged, - make_scoped_ptr(new ListValue()))); + make_scoped_ptr(new base::ListValue()))); event->will_dispatch_callback = base::Bind(&WillDispatchWindowFocusedEvent, window_profile, window_id); ExtensionSystem::Get(profile_)->event_router()->BroadcastEvent(event.Pass()); diff --git a/chrome/browser/extensions/api/test/test_api.cc b/chrome/browser/extensions/api/test/test_api.cc index 207cc91..d3940ce 100644 --- a/chrome/browser/extensions/api/test/test_api.cc +++ b/chrome/browser/extensions/api/test/test_api.cc @@ -124,7 +124,7 @@ void TestSendMessageFunction::Reply(const std::string& message) { // static void TestGetConfigFunction::set_test_config_state( - DictionaryValue* value) { + base::DictionaryValue* value) { TestConfigState* test_config_state = TestConfigState::GetInstance(); test_config_state->set_config_state(value); } diff --git a/chrome/browser/extensions/api/test/test_api.h b/chrome/browser/extensions/api/test/test_api.h index 5c0df7d..fa0c2ab 100644 --- a/chrome/browser/extensions/api/test/test_api.h +++ b/chrome/browser/extensions/api/test/test_api.h @@ -98,7 +98,7 @@ class TestGetConfigFunction : public SyncExtensionFunction { // Set the dictionary returned by chrome.test.getConfig(). // Does not take ownership of |value|. - static void set_test_config_state(DictionaryValue* value); + static void set_test_config_state(base::DictionaryValue* value); protected: // Tests that set configuration state do so by calling @@ -109,11 +109,11 @@ class TestGetConfigFunction : public SyncExtensionFunction { public: static TestConfigState* GetInstance(); - void set_config_state(DictionaryValue* config_state) { + void set_config_state(base::DictionaryValue* config_state) { config_state_ = config_state; } - const DictionaryValue* config_state() { + const base::DictionaryValue* config_state() { return config_state_; } @@ -121,7 +121,7 @@ class TestGetConfigFunction : public SyncExtensionFunction { friend struct DefaultSingletonTraits<TestConfigState>; TestConfigState(); - DictionaryValue* config_state_; + base::DictionaryValue* config_state_; DISALLOW_COPY_AND_ASSIGN(TestConfigState); }; diff --git a/chrome/browser/extensions/api/top_sites/top_sites_api.cc b/chrome/browser/extensions/api/top_sites/top_sites_api.cc index 84d31a3..77d5a93 100644 --- a/chrome/browser/extensions/api/top_sites/top_sites_api.cc +++ b/chrome/browser/extensions/api/top_sites/top_sites_api.cc @@ -30,11 +30,11 @@ bool TopSitesGetFunction::RunImpl() { void TopSitesGetFunction::OnMostVisitedURLsAvailable( const history::MostVisitedURLList& data) { - scoped_ptr<base::ListValue> pages_value(new ListValue); + scoped_ptr<base::ListValue> pages_value(new base::ListValue); for (size_t i = 0; i < data.size(); i++) { const history::MostVisitedURL& url = data[i]; if (!url.url.is_empty()) { - DictionaryValue* page_value = new DictionaryValue(); + base::DictionaryValue* page_value = new base::DictionaryValue(); page_value->SetString("url", url.url.spec()); if (url.title.empty()) page_value->SetString("title", url.url.spec()); diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc index 84b94cc..ab52613 100644 --- a/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc +++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc @@ -37,7 +37,7 @@ double MilliSecondsFromTime(const base::Time& time) { // Dispatches events to the extension message service. void DispatchEvent(content::BrowserContext* browser_context, const char* event_name, - scoped_ptr<ListValue> args, + scoped_ptr<base::ListValue> args, const GURL& url) { EventFilteringInfo info; info.SetURL(url); @@ -65,8 +65,8 @@ void DispatchOnBeforeNavigate(content::WebContents* web_contents, int64 parent_frame_id, bool parent_is_main_frame, const GURL& validated_url) { - scoped_ptr<ListValue> args(new ListValue()); - DictionaryValue* dict = new DictionaryValue(); + scoped_ptr<base::ListValue> args(new base::ListValue()); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetInteger(keys::kTabIdKey, ExtensionTabUtil::GetTabId(web_contents)); dict->SetString(keys::kUrlKey, validated_url.spec()); dict->SetInteger(keys::kProcessIdKey, render_process_id); @@ -90,8 +90,8 @@ void DispatchOnCommitted(const char* event_name, bool is_main_frame, const GURL& url, content::PageTransition transition_type) { - scoped_ptr<ListValue> args(new ListValue()); - DictionaryValue* dict = new DictionaryValue(); + scoped_ptr<base::ListValue> args(new base::ListValue()); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetInteger(keys::kTabIdKey, ExtensionTabUtil::GetTabId(web_contents)); dict->SetString(keys::kUrlKey, url.spec()); dict->SetInteger(keys::kProcessIdKey, @@ -100,7 +100,7 @@ void DispatchOnCommitted(const char* event_name, dict->SetString( keys::kTransitionTypeKey, content::PageTransitionGetCoreTransitionString(transition_type)); - ListValue* qualifiers = new ListValue(); + base::ListValue* qualifiers = new base::ListValue(); if (transition_type & content::PAGE_TRANSITION_CLIENT_REDIRECT) qualifiers->Append(Value::CreateStringValue("client_redirect")); if (transition_type & content::PAGE_TRANSITION_SERVER_REDIRECT) @@ -122,8 +122,8 @@ void DispatchOnDOMContentLoaded(content::WebContents* web_contents, const GURL& url, bool is_main_frame, int64 frame_id) { - scoped_ptr<ListValue> args(new ListValue()); - DictionaryValue* dict = new DictionaryValue(); + scoped_ptr<base::ListValue> args(new base::ListValue()); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetInteger(keys::kTabIdKey, ExtensionTabUtil::GetTabId(web_contents)); dict->SetString(keys::kUrlKey, url.spec()); @@ -144,8 +144,8 @@ void DispatchOnCompleted(content::WebContents* web_contents, const GURL& url, bool is_main_frame, int64 frame_id) { - scoped_ptr<ListValue> args(new ListValue()); - DictionaryValue* dict = new DictionaryValue(); + scoped_ptr<base::ListValue> args(new base::ListValue()); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetInteger(keys::kTabIdKey, ExtensionTabUtil::GetTabId(web_contents)); dict->SetString(keys::kUrlKey, url.spec()); @@ -174,8 +174,8 @@ void DispatchOnCreatedNavigationTarget( Profile::FromBrowserContext(target_web_contents->GetBrowserContext()), false, NULL, NULL, NULL, NULL)); - scoped_ptr<ListValue> args(new ListValue()); - DictionaryValue* dict = new DictionaryValue(); + scoped_ptr<base::ListValue> args(new base::ListValue()); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetInteger(keys::kSourceTabIdKey, ExtensionTabUtil::GetTabId(web_contents)); dict->SetInteger(keys::kSourceProcessIdKey, @@ -199,8 +199,8 @@ void DispatchOnErrorOccurred(content::WebContents* web_contents, int64 frame_id, bool is_main_frame, int error_code) { - scoped_ptr<ListValue> args(new ListValue()); - DictionaryValue* dict = new DictionaryValue(); + scoped_ptr<base::ListValue> args(new base::ListValue()); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetInteger(keys::kTabIdKey, ExtensionTabUtil::GetTabId(web_contents)); dict->SetString(keys::kUrlKey, url.spec()); dict->SetInteger(keys::kProcessIdKey, render_process_id); @@ -218,8 +218,8 @@ void DispatchOnTabReplaced( content::WebContents* old_web_contents, content::BrowserContext* browser_context, content::WebContents* new_web_contents) { - scoped_ptr<ListValue> args(new ListValue()); - DictionaryValue* dict = new DictionaryValue(); + scoped_ptr<base::ListValue> args(new base::ListValue()); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetInteger(keys::kReplacedTabIdKey, ExtensionTabUtil::GetTabId(old_web_contents)); dict->SetInteger(keys::kTabIdKey, diff --git a/chrome/browser/extensions/api/web_request/upload_data_presenter_unittest.cc b/chrome/browser/extensions/api/web_request/upload_data_presenter_unittest.cc index 5e06660..c445982 100644 --- a/chrome/browser/extensions/api/web_request/upload_data_presenter_unittest.cc +++ b/chrome/browser/extensions/api/web_request/upload_data_presenter_unittest.cc @@ -9,11 +9,6 @@ #include "net/base/upload_bytes_element_reader.h" #include "testing/gtest/include/gtest/gtest.h" -using base::BinaryValue; -using base::ListValue; -using base::StringValue; -using base::Value; - namespace keys = extension_web_request_api_constants; namespace extensions { @@ -27,9 +22,9 @@ TEST(WebRequestUploadDataPresenterTest, ParsedData) { net::UploadBytesElementReader element(block, sizeof(block) - 1); // Expected output. - scoped_ptr<ListValue> values(new ListValue); - values->Append(Value::CreateStringValue("value")); - DictionaryValue expected_form; + scoped_ptr<base::ListValue> values(new base::ListValue); + values->Append(base::Value::CreateStringValue("value")); + base::DictionaryValue expected_form; expected_form.SetWithoutPathExpansion("key.with.dots", values.release()); // Real output. @@ -38,7 +33,7 @@ TEST(WebRequestUploadDataPresenterTest, ParsedData) { ASSERT_TRUE(parsed_data_presenter.get() != NULL); parsed_data_presenter->FeedNext(element); EXPECT_TRUE(parsed_data_presenter->Succeeded()); - scoped_ptr<Value> result = parsed_data_presenter->Result(); + scoped_ptr<base::Value> result = parsed_data_presenter->Result(); ASSERT_TRUE(result.get() != NULL); EXPECT_TRUE(result->Equals(&expected_form)); @@ -53,16 +48,17 @@ TEST(WebRequestUploadDataPresenterTest, RawData) { const size_t block2_size = sizeof(block2) - 1; // Expected output. - scoped_ptr<BinaryValue> expected_a( - BinaryValue::CreateWithCopiedBuffer(block1, block1_size)); + scoped_ptr<base::BinaryValue> expected_a( + base::BinaryValue::CreateWithCopiedBuffer(block1, block1_size)); ASSERT_TRUE(expected_a.get() != NULL); - scoped_ptr<StringValue> expected_b(Value::CreateStringValue(kFilename)); + scoped_ptr<base::StringValue> expected_b( + base::Value::CreateStringValue(kFilename)); ASSERT_TRUE(expected_b.get() != NULL); - scoped_ptr<BinaryValue> expected_c( - BinaryValue::CreateWithCopiedBuffer(block2, block2_size)); + scoped_ptr<base::BinaryValue> expected_c( + base::BinaryValue::CreateWithCopiedBuffer(block2, block2_size)); ASSERT_TRUE(expected_c.get() != NULL); - ListValue expected_list; + base::ListValue expected_list; subtle::AppendKeyValuePair( keys::kRequestBodyRawBytesKey, expected_a.release(), &expected_list); subtle::AppendKeyValuePair( @@ -76,7 +72,7 @@ TEST(WebRequestUploadDataPresenterTest, RawData) { raw_presenter.FeedNextFile(kFilename); raw_presenter.FeedNextBytes(block2, block2_size); EXPECT_TRUE(raw_presenter.Succeeded()); - scoped_ptr<Value> result = raw_presenter.Result(); + scoped_ptr<base::Value> result = raw_presenter.Result(); ASSERT_TRUE(result.get() != NULL); EXPECT_TRUE(result->Equals(&expected_list)); diff --git a/chrome/browser/extensions/api/web_request/web_request_api_helpers.cc b/chrome/browser/extensions/api/web_request/web_request_api_helpers.cc index f083906..480bb94 100644 --- a/chrome/browser/extensions/api/web_request/web_request_api_helpers.cc +++ b/chrome/browser/extensions/api/web_request/web_request_api_helpers.cc @@ -216,10 +216,10 @@ net::NetLog::ParametersCallback CreateNetLogExtensionIdCallback( Value* NetLogModificationCallback( const EventResponseDelta* delta, net::NetLog::LogLevel log_level) { - DictionaryValue* dict = new DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetString("extension_id", delta->extension_id); - ListValue* modified_headers = new ListValue(); + base::ListValue* modified_headers = new base::ListValue(); net::HttpRequestHeaders::Iterator modification( delta->modified_request_headers); while (modification.GetNext()) { @@ -228,7 +228,7 @@ Value* NetLogModificationCallback( } dict->Set("modified_headers", modified_headers); - ListValue* deleted_headers = new ListValue(); + base::ListValue* deleted_headers = new base::ListValue(); for (std::vector<std::string>::const_iterator key = delta->deleted_request_headers.begin(); key != delta->deleted_request_headers.end(); @@ -245,8 +245,8 @@ bool InDecreasingExtensionInstallationTimeOrder( return a->extension_install_time > b->extension_install_time; } -ListValue* StringToCharList(const std::string& s) { - ListValue* result = new ListValue; +base::ListValue* StringToCharList(const std::string& s) { + base::ListValue* result = new base::ListValue; for (size_t i = 0, n = s.size(); i < n; ++i) { result->Append( Value::CreateIntegerValue( @@ -255,7 +255,7 @@ ListValue* StringToCharList(const std::string& s) { return result; } -bool CharListToString(const ListValue* list, std::string* out) { +bool CharListToString(const base::ListValue* list, std::string* out) { if (!list) return false; const size_t list_length = list->GetSize(); diff --git a/chrome/browser/extensions/api/web_socket_proxy_private/web_socket_proxy_private_api.cc b/chrome/browser/extensions/api/web_socket_proxy_private/web_socket_proxy_private_api.cc index 91483c5..3e551a3 100644 --- a/chrome/browser/extensions/api/web_socket_proxy_private/web_socket_proxy_private_api.cc +++ b/chrome/browser/extensions/api/web_socket_proxy_private/web_socket_proxy_private_api.cc @@ -171,7 +171,7 @@ void WebSocketProxyPrivateGetURLForTCPFunction::CustomFinalize() { bool WebSocketProxyPrivateGetURLForTCPFunction::RunImpl() { #if defined(OS_CHROMEOS) - DictionaryValue* qualification = NULL; + base::DictionaryValue* qualification = NULL; if (args_->GetDictionary(2, &qualification)) { const char kTlsOption[] = "tls"; if (qualification->HasKey(kTlsOption)) { diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc index 9d25844..8981d53 100644 --- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc +++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc @@ -168,8 +168,8 @@ const char kUserCancelledError[] = "User cancelled install"; // Helper to create a dictionary with login properties set from the appropriate // values in the passed-in |profile|. -DictionaryValue* CreateLoginResult(Profile* profile) { - DictionaryValue* dictionary = new DictionaryValue(); +base::DictionaryValue* CreateLoginResult(Profile* profile) { + base::DictionaryValue* dictionary = new base::DictionaryValue(); std::string username = profile->GetPrefs()->GetString( prefs::kGoogleServicesUsername); dictionary->SetString(kLoginKey, username); @@ -222,7 +222,7 @@ InstallBundleFunction::InstallBundleFunction() {} InstallBundleFunction::~InstallBundleFunction() {} bool InstallBundleFunction::RunImpl() { - ListValue* extensions = NULL; + base::ListValue* extensions = NULL; EXTENSION_FUNCTION_VALIDATE(args_->GetList(0, &extensions)); BundleInstaller::ItemList items; @@ -237,10 +237,10 @@ bool InstallBundleFunction::RunImpl() { return true; } -bool InstallBundleFunction::ReadBundleInfo(ListValue* extensions, +bool InstallBundleFunction::ReadBundleInfo(base::ListValue* extensions, BundleInstaller::ItemList* items) { for (size_t i = 0; i < extensions->GetSize(); ++i) { - DictionaryValue* details = NULL; + base::DictionaryValue* details = NULL; EXTENSION_FUNCTION_VALIDATE(extensions->GetDictionary(i, &details)); BundleInstaller::Item item; @@ -286,7 +286,7 @@ BeginInstallWithManifestFunction::BeginInstallWithManifestFunction() BeginInstallWithManifestFunction::~BeginInstallWithManifestFunction() {} bool BeginInstallWithManifestFunction::RunImpl() { - DictionaryValue* details = NULL; + base::DictionaryValue* details = NULL; EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &details)); CHECK(details); @@ -401,7 +401,7 @@ void BeginInstallWithManifestFunction::SetResultCode(ResultCode code) { void BeginInstallWithManifestFunction::OnWebstoreParseSuccess( const std::string& id, const SkBitmap& icon, - DictionaryValue* parsed_manifest) { + base::DictionaryValue* parsed_manifest) { CHECK_EQ(id_, id); CHECK(parsed_manifest); icon_ = icon; diff --git a/chrome/browser/extensions/api/webview/webview_api.cc b/chrome/browser/extensions/api/webview/webview_api.cc index a5be9df..dc89e45 100644 --- a/chrome/browser/extensions/api/webview/webview_api.cc +++ b/chrome/browser/extensions/api/webview/webview_api.cc @@ -32,7 +32,7 @@ bool WebviewExecuteCodeFunction::Init() { if (!guest_instance_id_) return false; - DictionaryValue* details_value = NULL; + base::DictionaryValue* details_value = NULL; if (!args_->GetDictionary(1, &details_value)) return false; scoped_ptr<InjectDetails> details(new InjectDetails()); @@ -68,7 +68,7 @@ void WebviewExecuteScriptFunction::OnExecuteCodeFinished( const std::string& error, int32 on_page_id, const GURL& on_url, - const ListValue& result) { + const base::ListValue& result) { content::RecordAction(content::UserMetricsAction("WebView.ExecuteScript")); if (error.empty()) SetResult(result.DeepCopy()); diff --git a/chrome/browser/extensions/api/webview/webview_api.h b/chrome/browser/extensions/api/webview/webview_api.h index c525e2c..961d001 100644 --- a/chrome/browser/extensions/api/webview/webview_api.h +++ b/chrome/browser/extensions/api/webview/webview_api.h @@ -36,7 +36,7 @@ class WebviewExecuteScriptFunction : public WebviewExecuteCodeFunction { virtual void OnExecuteCodeFinished(const std::string& error, int32 on_page_id, const GURL& on_url, - const ListValue& result) OVERRIDE; + const base::ListValue& result) OVERRIDE; DECLARE_EXTENSION_FUNCTION("webview.executeScript", WEBVIEW_EXECUTESCRIPT) }; diff --git a/chrome/browser/extensions/app_window_contents.cc b/chrome/browser/extensions/app_window_contents.cc index 40b1111..8a92b25 100644 --- a/chrome/browser/extensions/app_window_contents.cc +++ b/chrome/browser/extensions/app_window_contents.cc @@ -84,7 +84,7 @@ void AppWindowContents::LoadContents(int32 creator_process_id) { void AppWindowContents::NativeWindowChanged( NativeAppWindow* native_app_window) { - ListValue args; + base::ListValue args; DictionaryValue* dictionary = new DictionaryValue(); args.Append(dictionary); diff --git a/chrome/browser/extensions/browser_event_router.cc b/chrome/browser/extensions/browser_event_router.cc index d2c8b5d..3f85d96 100644 --- a/chrome/browser/extensions/browser_event_router.cc +++ b/chrome/browser/extensions/browser_event_router.cc @@ -165,7 +165,7 @@ static void WillDispatchTabCreatedEvent(WebContents* contents, bool active, Profile* profile, const Extension* extension, - ListValue* event_args) { + base::ListValue* event_args) { DictionaryValue* tab_value = ExtensionTabUtil::CreateTabValue( contents, extension); event_args->Clear(); @@ -177,7 +177,7 @@ void BrowserEventRouter::TabCreatedAt(WebContents* contents, int index, bool active) { Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); scoped_ptr<Event> event(new Event(events::kOnTabCreated, args.Pass())); event->restrict_to_profile = profile; event->user_gesture = EventRouter::USER_GESTURE_NOT_ENABLED; @@ -200,7 +200,7 @@ void BrowserEventRouter::TabInsertedAt(WebContents* contents, return; } - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(Value::CreateIntegerValue(tab_id)); DictionaryValue* object_args = new DictionaryValue(); @@ -221,7 +221,7 @@ void BrowserEventRouter::TabDetachedAt(WebContents* contents, int index) { return; } - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(Value::CreateIntegerValue(ExtensionTabUtil::GetTabId(contents))); DictionaryValue* object_args = new DictionaryValue(); @@ -241,7 +241,7 @@ void BrowserEventRouter::TabClosingAt(TabStripModel* tab_strip_model, int index) { int tab_id = ExtensionTabUtil::GetTabId(contents); - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(Value::CreateIntegerValue(tab_id)); DictionaryValue* object_args = new DictionaryValue(); @@ -265,7 +265,7 @@ void BrowserEventRouter::ActiveTabChanged(WebContents* old_contents, WebContents* new_contents, int index, int reason) { - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); int tab_id = ExtensionTabUtil::GetTabId(new_contents); args->Append(Value::CreateIntegerValue(tab_id)); @@ -283,9 +283,9 @@ void BrowserEventRouter::ActiveTabChanged(WebContents* old_contents, ? EventRouter::USER_GESTURE_ENABLED : EventRouter::USER_GESTURE_NOT_ENABLED; DispatchEvent(profile, events::kOnTabSelectionChanged, - scoped_ptr<ListValue>(args->DeepCopy()), gesture); + scoped_ptr<base::ListValue>(args->DeepCopy()), gesture); DispatchEvent(profile, events::kOnTabActiveChanged, - scoped_ptr<ListValue>(args->DeepCopy()), gesture); + scoped_ptr<base::ListValue>(args->DeepCopy()), gesture); // The onActivated event takes one argument: {windowId, tabId}. args->Remove(0, NULL); @@ -298,7 +298,7 @@ void BrowserEventRouter::TabSelectionChanged( const ui::ListSelectionModel& old_model) { ui::ListSelectionModel::SelectedIndices new_selection = tab_strip_model->selection_model().selected_indices(); - ListValue* all = new ListValue(); + base::ListValue* all = new base::ListValue(); for (size_t i = 0; i < new_selection.size(); ++i) { int index = new_selection[i]; @@ -309,7 +309,7 @@ void BrowserEventRouter::TabSelectionChanged( all->Append(Value::CreateIntegerValue(tab_id)); } - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); DictionaryValue* select_info = new DictionaryValue(); select_info->Set(tab_keys::kWindowIdKey, Value::CreateIntegerValue( @@ -321,7 +321,7 @@ void BrowserEventRouter::TabSelectionChanged( // The onHighlighted event replaced onHighlightChanged. Profile* profile = tab_strip_model->profile(); DispatchEvent(profile, events::kOnTabHighlightChanged, - scoped_ptr<ListValue>(args->DeepCopy()), + scoped_ptr<base::ListValue>(args->DeepCopy()), EventRouter::USER_GESTURE_UNKNOWN); DispatchEvent(profile, events::kOnTabHighlighted, args.Pass(), EventRouter::USER_GESTURE_UNKNOWN); @@ -330,7 +330,7 @@ void BrowserEventRouter::TabSelectionChanged( void BrowserEventRouter::TabMoved(WebContents* contents, int from_index, int to_index) { - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(Value::CreateIntegerValue(ExtensionTabUtil::GetTabId(contents))); DictionaryValue* object_args = new DictionaryValue(); @@ -380,7 +380,7 @@ void BrowserEventRouter::FaviconUrlUpdated(WebContents* contents, void BrowserEventRouter::DispatchEvent( Profile* profile, const char* event_name, - scoped_ptr<ListValue> args, + scoped_ptr<base::ListValue> args, EventRouter::UserGestureState user_gesture) { if (!profile_->IsSameProfile(profile) || !extensions::ExtensionSystem::Get(profile)->event_router()) @@ -396,7 +396,7 @@ void BrowserEventRouter::DispatchEventToExtension( Profile* profile, const std::string& extension_id, const char* event_name, - scoped_ptr<ListValue> event_args, + scoped_ptr<base::ListValue> event_args, EventRouter::UserGestureState user_gesture) { if (!profile_->IsSameProfile(profile) || !extensions::ExtensionSystem::Get(profile)->event_router()) @@ -414,7 +414,7 @@ void BrowserEventRouter::DispatchSimpleBrowserEvent( if (!profile_->IsSameProfile(profile)) return; - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(Value::CreateIntegerValue(window_id)); DispatchEvent(profile, event_name, args.Pass(), @@ -426,7 +426,7 @@ static void WillDispatchTabUpdatedEvent( const DictionaryValue* changed_properties, Profile* profile, const Extension* extension, - ListValue* event_args) { + base::ListValue* event_args) { // Overwrite the second argument with the appropriate properties dictionary, // depending on extension permissions. DictionaryValue* properties_value = changed_properties->DeepCopy(); @@ -447,7 +447,7 @@ void BrowserEventRouter::DispatchTabUpdatedEvent( // The state of the tab (as seen from the extension point of view) has // changed. Send a notification to the extension. - scoped_ptr<ListValue> args_base(new ListValue()); + scoped_ptr<base::ListValue> args_base(new base::ListValue()); // First arg: The id of the tab that changed. args_base->AppendInteger(ExtensionTabUtil::GetTabId(contents)); @@ -517,7 +517,7 @@ void BrowserEventRouter::TabReplacedAt(TabStripModel* tab_strip_model, // WebContents being swapped. const int new_tab_id = ExtensionTabUtil::GetTabId(new_contents); const int old_tab_id = ExtensionTabUtil::GetTabId(old_contents); - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(Value::CreateIntegerValue(new_tab_id)); args->Append(Value::CreateIntegerValue(old_tab_id)); @@ -559,7 +559,7 @@ void BrowserEventRouter::DispatchOldPageActionEvent( int tab_id, const std::string& url, int button) { - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(Value::CreateStringValue(page_action_id)); DictionaryValue* data = new DictionaryValue(); @@ -632,7 +632,7 @@ void BrowserEventRouter::ExtensionActionExecuted( } if (event_name) { - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); DictionaryValue* tab_value = ExtensionTabUtil::CreateTabValue( web_contents); args->Append(tab_value); diff --git a/chrome/browser/extensions/convert_user_script.cc b/chrome/browser/extensions/convert_user_script.cc index 752e6a3..e823819 100644 --- a/chrome/browser/extensions/convert_user_script.cc +++ b/chrome/browser/extensions/convert_user_script.cc @@ -101,12 +101,12 @@ scoped_refptr<Extension> ConvertUserScriptToExtension( root->SetString(keys::kPublicKey, key); root->SetBoolean(keys::kConvertedFromUserScript, true); - ListValue* js_files = new ListValue(); + base::ListValue* js_files = new base::ListValue(); js_files->Append(Value::CreateStringValue("script.js")); // If the script provides its own match patterns, we use those. Otherwise, we // generate some using the include globs. - ListValue* matches = new ListValue(); + base::ListValue* matches = new base::ListValue(); if (!script.url_patterns().is_empty()) { for (URLPatternSet::const_iterator i = script.url_patterns().begin(); i != script.url_patterns().end(); ++i) { @@ -119,7 +119,7 @@ scoped_refptr<Extension> ConvertUserScriptToExtension( } // Read the exclude matches, if any are present. - ListValue* exclude_matches = new ListValue(); + base::ListValue* exclude_matches = new base::ListValue(); if (!script.exclude_url_patterns().is_empty()) { for (URLPatternSet::const_iterator i = script.exclude_url_patterns().begin(); @@ -128,11 +128,11 @@ scoped_refptr<Extension> ConvertUserScriptToExtension( } } - ListValue* includes = new ListValue(); + base::ListValue* includes = new base::ListValue(); for (size_t i = 0; i < script.globs().size(); ++i) includes->Append(Value::CreateStringValue(script.globs().at(i))); - ListValue* excludes = new ListValue(); + base::ListValue* excludes = new base::ListValue(); for (size_t i = 0; i < script.exclude_globs().size(); ++i) excludes->Append(Value::CreateStringValue(script.exclude_globs().at(i))); @@ -151,7 +151,7 @@ scoped_refptr<Extension> ConvertUserScriptToExtension( // This is the default, but store it just in case we change that. content_script->SetString(keys::kRunAt, values::kRunAtDocumentIdle); - ListValue* content_scripts = new ListValue(); + base::ListValue* content_scripts = new base::ListValue(); content_scripts->Append(content_script); root->Set(keys::kContentScripts, content_scripts); diff --git a/chrome/browser/extensions/convert_web_app.cc b/chrome/browser/extensions/convert_web_app.cc index 9d61a86..b7f2b38 100644 --- a/chrome/browser/extensions/convert_web_app.cc +++ b/chrome/browser/extensions/convert_web_app.cc @@ -130,14 +130,14 @@ scoped_refptr<Extension> ConvertWebAppToExtension( } // Add the permissions. - ListValue* permissions = new ListValue(); + base::ListValue* permissions = new base::ListValue(); root->Set(keys::kPermissions, permissions); for (size_t i = 0; i < web_app.permissions.size(); ++i) { permissions->Append(Value::CreateStringValue(web_app.permissions[i])); } // Add the URLs. - ListValue* urls = new ListValue(); + base::ListValue* urls = new base::ListValue(); root->Set(keys::kWebURLs, urls); for (size_t i = 0; i < web_app.urls.size(); ++i) { urls->Append(Value::CreateStringValue(web_app.urls[i].spec())); diff --git a/chrome/browser/extensions/event_listener_map.cc b/chrome/browser/extensions/event_listener_map.cc index 5843714..2ea49e9 100644 --- a/chrome/browser/extensions/event_listener_map.cc +++ b/chrome/browser/extensions/event_listener_map.cc @@ -168,7 +168,7 @@ void EventListenerMap::LoadFilteredLazyListeners( const DictionaryValue& filtered) { for (DictionaryValue::Iterator it(filtered); !it.IsAtEnd(); it.Advance()) { // We skip entries if they are malformed. - const ListValue* filter_list = NULL; + const base::ListValue* filter_list = NULL; if (!it.value().GetAsList(&filter_list)) continue; for (size_t i = 0; i < filter_list->GetSize(); i++) { diff --git a/chrome/browser/extensions/event_listener_map_unittest.cc b/chrome/browser/extensions/event_listener_map_unittest.cc index da4eb24..d1b657f 100644 --- a/chrome/browser/extensions/event_listener_map_unittest.cc +++ b/chrome/browser/extensions/event_listener_map_unittest.cc @@ -9,6 +9,10 @@ #include "content/public/test/mock_render_process_host.h" #include "content/public/test/test_browser_context.h" +using base::DictionaryValue; +using base::ListValue; +using base::StringValue; + namespace extensions { namespace { diff --git a/chrome/browser/extensions/event_router.h b/chrome/browser/extensions/event_router.h index ad8b72b..32a079c 100644 --- a/chrome/browser/extensions/event_router.h +++ b/chrome/browser/extensions/event_router.h @@ -165,7 +165,7 @@ class EventRouter : public content::NotificationObserver, static void LogExtensionEventMessage(void* profile_id, const std::string& extension_id, const std::string& event_name, - scoped_ptr<ListValue> event_args); + scoped_ptr<base::ListValue> event_args); // TODO(gdk): Document this. static void DispatchExtensionMessage( diff --git a/chrome/browser/extensions/event_router_forwarder.cc b/chrome/browser/extensions/event_router_forwarder.cc index 50b0d8f..f04c16e 100644 --- a/chrome/browser/extensions/event_router_forwarder.cc +++ b/chrome/browser/extensions/event_router_forwarder.cc @@ -69,7 +69,7 @@ void EventRouterForwarder::DispatchEventToExtension( void EventRouterForwarder::HandleEvent(const std::string& extension_id, const std::string& event_name, - scoped_ptr<ListValue> event_args, + scoped_ptr<base::ListValue> event_args, void* profile_ptr, bool use_profile_to_restrict_events, const GURL& event_url) { @@ -98,7 +98,8 @@ void EventRouterForwarder::HandleEvent(const std::string& extension_id, } else { std::vector<Profile*> profiles(profile_manager->GetLoadedProfiles()); for (size_t i = 0; i < profiles.size(); ++i) { - scoped_ptr<ListValue> per_profile_event_args(event_args->DeepCopy()); + scoped_ptr<base::ListValue> per_profile_event_args( + event_args->DeepCopy()); CallEventRouter( profiles[i], extension_id, event_name, per_profile_event_args.Pass(), use_profile_to_restrict_events ? profiles[i] : NULL, event_url); @@ -106,12 +107,13 @@ void EventRouterForwarder::HandleEvent(const std::string& extension_id, } } -void EventRouterForwarder::CallEventRouter(Profile* profile, - const std::string& extension_id, - const std::string& event_name, - scoped_ptr<ListValue> event_args, - Profile* restrict_to_profile, - const GURL& event_url) { +void EventRouterForwarder::CallEventRouter( + Profile* profile, + const std::string& extension_id, + const std::string& event_name, + scoped_ptr<base::ListValue> event_args, + Profile* restrict_to_profile, + const GURL& event_url) { // We may not have an extension in cases like chromeos login // (crosbug.com/12856), chrome_frame_net_tests.exe which reuses the chrome // browser single process framework. diff --git a/chrome/browser/extensions/event_router_forwarder_unittest.cc b/chrome/browser/extensions/event_router_forwarder_unittest.cc index ee2bf3e..c3c1056 100644 --- a/chrome/browser/extensions/event_router_forwarder_unittest.cc +++ b/chrome/browser/extensions/event_router_forwarder_unittest.cc @@ -47,7 +47,7 @@ class MockEventRouterForwarder : public EventRouterForwarder { static void BroadcastEventToRenderers(EventRouterForwarder* event_router, const std::string& event_name, const GURL& url) { - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); event_router->BroadcastEventToRenderers(event_name, args.Pass(), url); } @@ -56,7 +56,7 @@ static void DispatchEventToRenderers(EventRouterForwarder* event_router, void* profile, bool use_profile_to_restrict_events, const GURL& url) { - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); event_router->DispatchEventToRenderers(event_name, args.Pass(), profile, use_profile_to_restrict_events, url); } @@ -65,7 +65,7 @@ static void BroadcastEventToExtension(EventRouterForwarder* event_router, const std::string& extension, const std::string& event_name, const GURL& url) { - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); event_router->BroadcastEventToExtension(extension, event_name, args.Pass(), url); } @@ -76,7 +76,7 @@ static void DispatchEventToExtension(EventRouterForwarder* event_router, void* profile, bool use_profile_to_restrict_events, const GURL& url) { - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); event_router->DispatchEventToExtension( extension, event_name, args.Pass(), profile, use_profile_to_restrict_events, url); diff --git a/chrome/browser/extensions/extension_function.cc b/chrome/browser/extensions/extension_function.cc index 484abd7..3e6a397 100644 --- a/chrome/browser/extensions/extension_function.cc +++ b/chrome/browser/extensions/extension_function.cc @@ -88,7 +88,7 @@ void ExtensionFunction::SetResult(base::Value* result) { results_->Append(result); } -const ListValue* ExtensionFunction::GetResultList() { +const base::ListValue* ExtensionFunction::GetResultList() { return results_.get(); } @@ -128,7 +128,7 @@ void ExtensionFunction::SendResponseImpl(bool success) { // If results were never set, we send an empty argument list. if (!results_) - results_.reset(new ListValue()); + results_.reset(new base::ListValue()); response_callback_.Run(type, *results_, GetError()); } diff --git a/chrome/browser/extensions/extension_function_dispatcher.cc b/chrome/browser/extensions/extension_function_dispatcher.cc index a7ff244..232c31c 100644 --- a/chrome/browser/extensions/extension_function_dispatcher.cc +++ b/chrome/browser/extensions/extension_function_dispatcher.cc @@ -48,7 +48,7 @@ namespace { void LogSuccess(const std::string& extension_id, const std::string& api_name, - scoped_ptr<ListValue> args, + scoped_ptr<base::ListValue> args, Profile* profile) { // The ActivityLog can only be accessed from the main (UI) thread. If we're // running on the wrong thread, re-dispatch from the main thread. @@ -70,7 +70,7 @@ void LogSuccess(const std::string& extension_id, void LogFailure(const std::string& extension_id, const std::string& api_name, - scoped_ptr<ListValue> args, + scoped_ptr<base::ListValue> args, extensions::BlockedAction::Reason reason, Profile* profile) { // The ActivityLog can only be accessed from the main (UI) thread. If we're diff --git a/chrome/browser/extensions/extension_keybinding_registry.cc b/chrome/browser/extensions/extension_keybinding_registry.cc index e5cf544..9cc3cfb 100644 --- a/chrome/browser/extensions/extension_keybinding_registry.cc +++ b/chrome/browser/extensions/extension_keybinding_registry.cc @@ -70,7 +70,7 @@ void ExtensionKeybindingRegistry::CommandExecuted( if (granter) granter->GrantIfRequested(extension); - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(Value::CreateStringValue(command)); scoped_ptr<Event> event(new Event("commands.onCommand", args.Pass())); diff --git a/chrome/browser/extensions/extension_messages_apitest.cc b/chrome/browser/extensions/extension_messages_apitest.cc index e2a605c..d561dfa 100644 --- a/chrome/browser/extensions/extension_messages_apitest.cc +++ b/chrome/browser/extensions/extension_messages_apitest.cc @@ -36,18 +36,19 @@ class MessageSender : public content::NotificationObserver { } private: - static scoped_ptr<ListValue> BuildEventArguments(const bool last_message, - const std::string& data) { + static scoped_ptr<base::ListValue> BuildEventArguments( + const bool last_message, + const std::string& data) { DictionaryValue* event = new DictionaryValue(); event->SetBoolean("lastMessage", last_message); event->SetString("data", data); - scoped_ptr<ListValue> arguments(new ListValue()); + scoped_ptr<base::ListValue> arguments(new base::ListValue()); arguments->Append(event); return arguments.Pass(); } static scoped_ptr<extensions::Event> BuildEvent( - scoped_ptr<ListValue> event_args, + scoped_ptr<base::ListValue> event_args, Profile* profile, GURL event_url) { scoped_ptr<extensions::Event> event(new extensions::Event( diff --git a/chrome/browser/extensions/extension_override_apitest.cc b/chrome/browser/extensions/extension_override_apitest.cc index d0989a6..dcaa3cd 100644 --- a/chrome/browser/extensions/extension_override_apitest.cc +++ b/chrome/browser/extensions/extension_override_apitest.cc @@ -27,7 +27,7 @@ class ExtensionOverrideTest : public ExtensionApiTest { browser()->profile()->GetPrefs()->GetDictionary( ExtensionWebUI::kExtensionURLOverrides); - const ListValue* values = NULL; + const base::ListValue* values = NULL; if (!overrides->GetList("history", &values)) return false; @@ -125,7 +125,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionOverrideTest, ShouldCleanUpDuplicateEntries) { // a preferences file without corresponding UnloadExtension() calls. This is // the same as the above test, except for that it is testing the case where // the file already contains dupes when an extension is loaded. - ListValue* list = new ListValue(); + base::ListValue* list = new base::ListValue(); for (size_t i = 0; i < 3; ++i) list->Append(Value::CreateStringValue("http://www.google.com/")); diff --git a/chrome/browser/extensions/extension_prefs_unittest.cc b/chrome/browser/extensions/extension_prefs_unittest.cc index a7f7c17..08d07d6 100644 --- a/chrome/browser/extensions/extension_prefs_unittest.cc +++ b/chrome/browser/extensions/extension_prefs_unittest.cc @@ -168,7 +168,7 @@ class ExtensionPrefsGrantedPermissions : public ExtensionPrefsTest { scoped_ptr<APIPermission> permission( permission_info->CreateAPIPermission()); { - scoped_ptr<ListValue> value(new ListValue()); + scoped_ptr<base::ListValue> value(new base::ListValue()); value->Append(Value::CreateStringValue("tcp-connect:*.example.com:80")); value->Append(Value::CreateStringValue("udp-bind::8080")); value->Append(Value::CreateStringValue("udp-send-to::8888")); diff --git a/chrome/browser/extensions/extension_protocols_unittest.cc b/chrome/browser/extensions/extension_protocols_unittest.cc index acffeeb..b096d98 100644 --- a/chrome/browser/extensions/extension_protocols_unittest.cc +++ b/chrome/browser/extensions/extension_protocols_unittest.cc @@ -67,7 +67,7 @@ scoped_refptr<Extension> CreateTestResponseHeaderExtension() { manifest.SetString("name", "An extension with web-accessible resources"); manifest.SetString("version", "2"); - ListValue* web_accessible_list = new ListValue(); + base::ListValue* web_accessible_list = new base::ListValue(); web_accessible_list->AppendString("test.dat"); manifest.Set("web_accessible_resources", web_accessible_list); diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc index 89f9a78..b3087ca 100644 --- a/chrome/browser/extensions/extension_service_unittest.cc +++ b/chrome/browser/extensions/extension_service_unittest.cc @@ -116,6 +116,9 @@ #include "chrome/browser/chromeos/settings/device_settings_service.h" #endif +using base::DictionaryValue; +using base::ListValue; +using base::Value; using content::BrowserContext; using content::BrowserThread; using content::DOMStorageContext; diff --git a/chrome/browser/extensions/extension_special_storage_policy_unittest.cc b/chrome/browser/extensions/extension_special_storage_policy_unittest.cc index 3ae4143..7e07052 100644 --- a/chrome/browser/extensions/extension_special_storage_policy_unittest.cc +++ b/chrome/browser/extensions/extension_special_storage_policy_unittest.cc @@ -104,7 +104,7 @@ class ExtensionSpecialStoragePolicyTest : public testing::Test { manifest.SetString(keys::kName, "Protected"); manifest.SetString(keys::kVersion, "1"); manifest.SetString(keys::kLaunchWebURL, "http://explicit/protected/start"); - ListValue* list = new ListValue(); + base::ListValue* list = new base::ListValue(); list->Append(Value::CreateStringValue("http://explicit/protected")); list->Append(Value::CreateStringValue("*://*.wildcards/protected")); manifest.Set(keys::kWebURLs, list); @@ -126,10 +126,10 @@ class ExtensionSpecialStoragePolicyTest : public testing::Test { manifest.SetString(keys::kName, "Unlimited"); manifest.SetString(keys::kVersion, "1"); manifest.SetString(keys::kLaunchWebURL, "http://explicit/unlimited/start"); - ListValue* list = new ListValue(); + base::ListValue* list = new base::ListValue(); list->Append(Value::CreateStringValue("unlimitedStorage")); manifest.Set(keys::kPermissions, list); - list = new ListValue(); + list = new base::ListValue(); list->Append(Value::CreateStringValue("http://explicit/unlimited")); list->Append(Value::CreateStringValue("*://*.wildcards/unlimited")); manifest.Set(keys::kWebURLs, list); diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc index e86607f..02985e0 100644 --- a/chrome/browser/extensions/extension_tab_util.cc +++ b/chrome/browser/extensions/extension_tab_util.cc @@ -99,10 +99,10 @@ DictionaryValue* ExtensionTabUtil::CreateTabValue( return result; } -ListValue* ExtensionTabUtil::CreateTabList( +base::ListValue* ExtensionTabUtil::CreateTabList( const Browser* browser, const Extension* extension) { - ListValue* tab_list = new ListValue(); + base::ListValue* tab_list = new base::ListValue(); TabStripModel* tab_strip = browser->tab_strip_model(); for (int i = 0; i < tab_strip->count(); ++i) { tab_list->Append(CreateTabValue(tab_strip->GetWebContentsAt(i), diff --git a/chrome/browser/extensions/extension_web_ui.cc b/chrome/browser/extensions/extension_web_ui.cc index fc851b9..b62af29 100644 --- a/chrome/browser/extensions/extension_web_ui.cc +++ b/chrome/browser/extensions/extension_web_ui.cc @@ -45,7 +45,7 @@ using extensions::URLOverrides; namespace { // De-dupes the items in |list|. Assumes the values are strings. -void CleanUpDuplicates(ListValue* list) { +void CleanUpDuplicates(base::ListValue* list) { std::set<std::string> seen_values; // Loop backwards as we may be removing items. @@ -178,10 +178,10 @@ bool ExtensionWebUI::HandleChromeURLOverride( return false; Profile* profile = Profile::FromBrowserContext(browser_context); - const DictionaryValue* overrides = + const base::DictionaryValue* overrides = profile->GetPrefs()->GetDictionary(kExtensionURLOverrides); std::string page = url->host(); - const ListValue* url_list = NULL; + const base::ListValue* url_list = NULL; if (!overrides || !overrides->GetList(page, &url_list)) return false; @@ -244,7 +244,7 @@ bool ExtensionWebUI::HandleChromeURLOverride( bool ExtensionWebUI::HandleChromeURLOverrideReverse( GURL* url, content::BrowserContext* browser_context) { Profile* profile = Profile::FromBrowserContext(browser_context); - const DictionaryValue* overrides = + const base::DictionaryValue* overrides = profile->GetPrefs()->GetDictionary(kExtensionURLOverrides); if (!overrides) return false; @@ -253,12 +253,13 @@ bool ExtensionWebUI::HandleChromeURLOverrideReverse( // internal URL // chrome-extension://eemcgdkfndhakfknompkggombfjjjeno/main.html#1 to // chrome://bookmarks/#1 for display in the omnibox. - for (DictionaryValue::Iterator it(*overrides); !it.IsAtEnd(); it.Advance()) { - const ListValue* url_list = NULL; + for (base::DictionaryValue::Iterator it(*overrides); !it.IsAtEnd(); + it.Advance()) { + const base::ListValue* url_list = NULL; if (!it.value().GetAsList(&url_list)) continue; - for (ListValue::const_iterator it2 = url_list->begin(); + for (base::ListValue::const_iterator it2 = url_list->begin(); it2 != url_list->end(); ++it2) { std::string override; if (!(*it2)->GetAsString(&override)) @@ -283,22 +284,22 @@ void ExtensionWebUI::RegisterChromeURLOverrides( PrefService* prefs = profile->GetPrefs(); DictionaryPrefUpdate update(prefs, kExtensionURLOverrides); - DictionaryValue* all_overrides = update.Get(); + base::DictionaryValue* all_overrides = update.Get(); // For each override provided by the extension, add it to the front of // the override list if it's not already in the list. URLOverrides::URLOverrideMap::const_iterator iter = overrides.begin(); for (; iter != overrides.end(); ++iter) { const std::string& key = iter->first; - ListValue* page_overrides = NULL; + base::ListValue* page_overrides = NULL; if (!all_overrides->GetList(key, &page_overrides)) { - page_overrides = new ListValue(); + page_overrides = new base::ListValue(); all_overrides->Set(key, page_overrides); } else { CleanUpDuplicates(page_overrides); // Verify that the override isn't already in the list. - ListValue::iterator i = page_overrides->begin(); + base::ListValue::iterator i = page_overrides->begin(); for (; i != page_overrides->end(); ++i) { std::string override_val; if (!(*i)->GetAsString(&override_val)) { @@ -321,7 +322,7 @@ void ExtensionWebUI::RegisterChromeURLOverrides( // static void ExtensionWebUI::UnregisterAndReplaceOverride(const std::string& page, Profile* profile, - ListValue* list, + base::ListValue* list, const Value* override) { size_t index = 0; bool found = list->Remove(*override, &index); @@ -342,8 +343,8 @@ void ExtensionWebUI::UnregisterChromeURLOverride(const std::string& page, return; PrefService* prefs = profile->GetPrefs(); DictionaryPrefUpdate update(prefs, kExtensionURLOverrides); - DictionaryValue* all_overrides = update.Get(); - ListValue* page_overrides = NULL; + base::DictionaryValue* all_overrides = update.Get(); + base::ListValue* page_overrides = NULL; if (!all_overrides->GetList(page, &page_overrides)) { // If it's being unregistered, it should already be in the list. NOTREACHED(); @@ -360,11 +361,11 @@ void ExtensionWebUI::UnregisterChromeURLOverrides( return; PrefService* prefs = profile->GetPrefs(); DictionaryPrefUpdate update(prefs, kExtensionURLOverrides); - DictionaryValue* all_overrides = update.Get(); + base::DictionaryValue* all_overrides = update.Get(); URLOverrides::URLOverrideMap::const_iterator iter = overrides.begin(); for (; iter != overrides.end(); ++iter) { const std::string& page = iter->first; - ListValue* page_overrides = NULL; + base::ListValue* page_overrides = NULL; if (!all_overrides->GetList(page, &page_overrides)) { // If it's being unregistered, it should already be in the list. NOTREACHED(); diff --git a/chrome/browser/extensions/extensions_quota_service.cc b/chrome/browser/extensions/extensions_quota_service.cc index bd34b1f..f776c40 100644 --- a/chrome/browser/extensions/extensions_quota_service.cc +++ b/chrome/browser/extensions/extensions_quota_service.cc @@ -37,7 +37,7 @@ ExtensionsQuotaService::~ExtensionsQuotaService() { std::string ExtensionsQuotaService::Assess( const std::string& extension_id, ExtensionFunction* function, - const ListValue* args, + const base::ListValue* args, const base::TimeTicks& event_time) { DCHECK(CalledOnValidThread()); @@ -106,7 +106,7 @@ void QuotaLimitHeuristic::Bucket::Reset(const Config& config, } void QuotaLimitHeuristic::SingletonBucketMapper::GetBucketsForArgs( - const ListValue* args, + const base::ListValue* args, BucketList* buckets) { buckets->push_back(&bucket_); } @@ -119,7 +119,7 @@ QuotaLimitHeuristic::QuotaLimitHeuristic(const Config& config, QuotaLimitHeuristic::~QuotaLimitHeuristic() {} -bool QuotaLimitHeuristic::ApplyToArgs(const ListValue* args, +bool QuotaLimitHeuristic::ApplyToArgs(const base::ListValue* args, const base::TimeTicks& event_time) { BucketList buckets; bucket_mapper_->GetBucketsForArgs(args, &buckets); diff --git a/chrome/browser/extensions/extensions_quota_service.h b/chrome/browser/extensions/extensions_quota_service.h index e29300e..ea12584 100644 --- a/chrome/browser/extensions/extensions_quota_service.h +++ b/chrome/browser/extensions/extensions_quota_service.h @@ -56,7 +56,7 @@ class ExtensionsQuotaService : public base::NonThreadSafe { // or empty-string if the request is fine and can proceed. std::string Assess(const std::string& extension_id, ExtensionFunction* function, - const ListValue* args, + const base::ListValue* args, const base::TimeTicks& event_time); private: @@ -152,7 +152,7 @@ class QuotaLimitHeuristic { // occurs while parsing |args|, the function aborts - buckets may be non- // empty). The expectation is that invalid args and associated errors are // handled by the ExtensionFunction itself so we don't concern ourselves. - virtual void GetBucketsForArgs(const ListValue* args, + virtual void GetBucketsForArgs(const base::ListValue* args, BucketList* buckets) = 0; }; @@ -162,7 +162,7 @@ class QuotaLimitHeuristic { public: SingletonBucketMapper() {} virtual ~SingletonBucketMapper() {} - virtual void GetBucketsForArgs(const ListValue* args, + virtual void GetBucketsForArgs(const base::ListValue* args, BucketList* buckets) OVERRIDE; private: @@ -180,7 +180,8 @@ class QuotaLimitHeuristic { // implementation of a derived class) to perform an operation with |args|, // based on the history of similar operations with similar arguments (which // is retrieved using the BucketMapper). - bool ApplyToArgs(const ListValue* args, const base::TimeTicks& event_time); + bool ApplyToArgs(const base::ListValue* args, + const base::TimeTicks& event_time); // Returns an error formatted according to this heuristic. std::string GetError() const; diff --git a/chrome/browser/extensions/extensions_quota_service_unittest.cc b/chrome/browser/extensions/extensions_quota_service_unittest.cc index e8eefd0..4ebbf5a 100644 --- a/chrome/browser/extensions/extensions_quota_service_unittest.cc +++ b/chrome/browser/extensions/extensions_quota_service_unittest.cc @@ -34,7 +34,7 @@ class Mapper : public QuotaLimitHeuristic::BucketMapper { public: Mapper() {} virtual ~Mapper() { STLDeleteValues(&buckets_); } - virtual void GetBucketsForArgs(const ListValue* args, + virtual void GetBucketsForArgs(const base::ListValue* args, BucketList* buckets) OVERRIDE { for (size_t i = 0; i < args->GetSize(); i++) { int id; @@ -52,7 +52,7 @@ class Mapper : public QuotaLimitHeuristic::BucketMapper { class MockMapper : public QuotaLimitHeuristic::BucketMapper { public: - virtual void GetBucketsForArgs(const ListValue* args, + virtual void GetBucketsForArgs(const base::ListValue* args, BucketList* buckets) OVERRIDE { } }; @@ -61,7 +61,7 @@ class MockFunction : public ExtensionFunction { public: explicit MockFunction(const std::string& name) { set_name(name); } - virtual void SetArgs(const ListValue* args) OVERRIDE {} + virtual void SetArgs(const base::ListValue* args) OVERRIDE {} virtual const std::string GetError() OVERRIDE { return std::string(); } virtual void SetError(const std::string& error) OVERRIDE {} virtual void Run() OVERRIDE {} @@ -217,20 +217,20 @@ TEST_F(QuotaLimitHeuristicTest, Sustained) { TEST_F(ExtensionsQuotaServiceTest, NoHeuristic) { scoped_refptr<MockFunction> f(new MockFunction("foo")); - ListValue args; + base::ListValue args; EXPECT_EQ("", service_->Assess(extension_a_, f.get(), &args, kStartTime)); } TEST_F(ExtensionsQuotaServiceTest, FrozenHeuristic) { scoped_refptr<MockFunction> f(new FrozenMockFunction("foo")); - ListValue args; + base::ListValue args; args.Append(new base::FundamentalValue(1)); EXPECT_NE("", service_->Assess(extension_a_, f.get(), &args, kStartTime)); } TEST_F(ExtensionsQuotaServiceTest, SingleHeuristic) { scoped_refptr<MockFunction> f(new TimedLimitMockFunction("foo")); - ListValue args; + base::ListValue args; args.Append(new base::FundamentalValue(1)); EXPECT_EQ("", service_->Assess(extension_a_, f.get(), &args, kStartTime)); EXPECT_EQ("", @@ -244,7 +244,7 @@ TEST_F(ExtensionsQuotaServiceTest, SingleHeuristic) { &args, kStartTime + TimeDelta::FromSeconds(15))); - ListValue args2; + base::ListValue args2; args2.Append(new base::FundamentalValue(1)); args2.Append(new base::FundamentalValue(2)); EXPECT_EQ("", service_->Assess(extension_b_, f.get(), &args2, kStartTime)); @@ -269,7 +269,7 @@ TEST_F(ExtensionsQuotaServiceTest, SingleHeuristic) { kStartTime + peace + TimeDelta::FromSeconds(15))); // Test that items are independent. - ListValue args3; + base::ListValue args3; args3.Append(new base::FundamentalValue(3)); EXPECT_EQ("", service_->Assess(extension_c_, f.get(), &args, kStartTime)); EXPECT_EQ("", @@ -301,7 +301,7 @@ TEST_F(ExtensionsQuotaServiceTest, SingleHeuristic) { TEST_F(ExtensionsQuotaServiceTest, ChainedHeuristics) { scoped_refptr<MockFunction> f(new ChainedLimitsMockFunction("foo")); - ListValue args; + base::ListValue args; args.Append(new base::FundamentalValue(1)); // First, test that the low limit can be avoided but the higher one is hit. @@ -356,8 +356,8 @@ TEST_F(ExtensionsQuotaServiceTest, MultipleFunctionsDontInterfere) { scoped_refptr<MockFunction> f(new TimedLimitMockFunction("foo")); scoped_refptr<MockFunction> g(new TimedLimitMockFunction("bar")); - ListValue args_f; - ListValue args_g; + base::ListValue args_f; + base::ListValue args_g; args_f.Append(new base::FundamentalValue(1)); args_g.Append(new base::FundamentalValue(2)); @@ -388,7 +388,7 @@ TEST_F(ExtensionsQuotaServiceTest, MultipleFunctionsDontInterfere) { TEST_F(ExtensionsQuotaServiceTest, ViolatorsWillBeViolators) { scoped_refptr<MockFunction> f(new TimedLimitMockFunction("foo")); scoped_refptr<MockFunction> g(new TimedLimitMockFunction("bar")); - ListValue arg; + base::ListValue arg; arg.Append(new base::FundamentalValue(1)); EXPECT_EQ("", service_->Assess(extension_a_, f.get(), &arg, kStartTime)); EXPECT_EQ("", diff --git a/chrome/browser/extensions/external_provider_impl.cc b/chrome/browser/extensions/external_provider_impl.cc index 08efd2e..b5f3dc5 100644 --- a/chrome/browser/extensions/external_provider_impl.cc +++ b/chrome/browser/extensions/external_provider_impl.cc @@ -90,7 +90,7 @@ void ExternalProviderImpl::VisitRegisteredExtension() { loader_->StartLoading(); } -void ExternalProviderImpl::SetPrefs(DictionaryValue* prefs) { +void ExternalProviderImpl::SetPrefs(base::DictionaryValue* prefs) { CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); // Check if the service is still alive. It is possible that it went @@ -104,9 +104,9 @@ void ExternalProviderImpl::SetPrefs(DictionaryValue* prefs) { std::set<std::string> unsupported_extensions; // Notify ExtensionService about all the extensions this provider has. - for (DictionaryValue::Iterator i(*prefs_); !i.IsAtEnd(); i.Advance()) { + for (base::DictionaryValue::Iterator i(*prefs_); !i.IsAtEnd(); i.Advance()) { const std::string& extension_id = i.key(); - const DictionaryValue* extension = NULL; + const base::DictionaryValue* extension = NULL; if (!Extension::IdIsValid(extension_id)) { LOG(WARNING) << "Malformed extension dictionary: key " @@ -159,7 +159,7 @@ void ExternalProviderImpl::SetPrefs(DictionaryValue* prefs) { } // Check that extension supports current browser locale. - const ListValue* supported_locales = NULL; + const base::ListValue* supported_locales = NULL; if (extension->GetList(kSupportedLocales, &supported_locales)) { std::vector<std::string> browser_locales; l10n_util::GetParentLocales(g_browser_process->GetApplicationLocale(), @@ -307,7 +307,7 @@ bool ExternalProviderImpl::GetExtensionDetails( CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); CHECK(prefs_.get()); CHECK(ready_); - DictionaryValue* extension = NULL; + base::DictionaryValue* extension = NULL; if (!prefs_->GetDictionary(id, &extension)) return false; diff --git a/chrome/browser/extensions/media_galleries_handler.cc b/chrome/browser/extensions/media_galleries_handler.cc index d2349a8..a1a361a 100644 --- a/chrome/browser/extensions/media_galleries_handler.cc +++ b/chrome/browser/extensions/media_galleries_handler.cc @@ -78,10 +78,10 @@ MediaGalleriesHandler* LoadMediaGalleriesHandler( // |result|. bool LoadMediaGalleriesHandlers( const std::string& extension_id, - const ListValue* extension_actions, + const base::ListValue* extension_actions, MediaGalleriesHandler::List* result, string16* error) { - for (ListValue::const_iterator iter = extension_actions->begin(); + for (base::ListValue::const_iterator iter = extension_actions->begin(); iter != extension_actions->end(); ++iter) { if (!(*iter)->IsType(Value::TYPE_DICTIONARY)) { @@ -124,7 +124,7 @@ MediaGalleriesHandlerParser::~MediaGalleriesHandlerParser() { bool MediaGalleriesHandlerParser::Parse(extensions::Extension* extension, string16* error) { - const ListValue* media_galleries_handlers_value = NULL; + const base::ListValue* media_galleries_handlers_value = NULL; if (!extension->manifest()->GetList(keys::kMediaGalleriesHandlers, &media_galleries_handlers_value)) { *error = ASCIIToUTF16(errors::kInvalidMediaGalleriesHandler); diff --git a/chrome/browser/extensions/menu_manager.cc b/chrome/browser/extensions/menu_manager.cc index b11b3e5..cb2ce0e 100644 --- a/chrome/browser/extensions/menu_manager.cc +++ b/chrome/browser/extensions/menu_manager.cc @@ -82,7 +82,7 @@ MenuItem::List MenuItemsFromValue(const std::string& extension_id, } scoped_ptr<base::Value> MenuItemsToValue(const MenuItem::List& items) { - scoped_ptr<base::ListValue> list(new ListValue()); + scoped_ptr<base::ListValue> list(new base::ListValue()); for (size_t i = 0; i < items.size(); ++i) list->Append(items[i]->ToValue().release()); return scoped_ptr<Value>(list.release()); @@ -94,7 +94,7 @@ bool GetStringList(const DictionaryValue& dict, if (!dict.HasKey(key)) return true; - const ListValue* list = NULL; + const base::ListValue* list = NULL; if (!dict.GetListWithoutPathExpansion(key, &list)) return false; @@ -606,7 +606,7 @@ void MenuManager::ExecuteCommand(Profile* profile, if (item->type() == MenuItem::RADIO) RadioItemSelected(item); - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); DictionaryValue* properties = new DictionaryValue(); SetIdKeyValue(properties, "menuItemId", item->id()); @@ -673,8 +673,9 @@ void MenuManager::ExecuteCommand(Profile* profile, } { - scoped_ptr<Event> event(new Event(event_names::kOnContextMenus, - scoped_ptr<ListValue>(args->DeepCopy()))); + scoped_ptr<Event> event(new Event( + event_names::kOnContextMenus, + scoped_ptr<base::ListValue>(args->DeepCopy()))); event->restrict_to_profile = profile; event->user_gesture = EventRouter::USER_GESTURE_ENABLED; event_router->DispatchEventToExtension(item->extension_id(), event.Pass()); diff --git a/chrome/browser/extensions/menu_manager.h b/chrome/browser/extensions/menu_manager.h index c4e56ac..764e861 100644 --- a/chrome/browser/extensions/menu_manager.h +++ b/chrome/browser/extensions/menu_manager.h @@ -109,11 +109,11 @@ class MenuItem { value_ |= context; } - scoped_ptr<Value> ToValue() const { - return scoped_ptr<Value>(Value::CreateIntegerValue(value_)); + scoped_ptr<base::Value> ToValue() const { + return scoped_ptr<base::Value>(base::Value::CreateIntegerValue(value_)); } - bool Populate(const Value& value) { + bool Populate(const base::Value& value) { int int_value; if (!value.GetAsInteger(&int_value) || int_value < 0) return false; @@ -178,7 +178,7 @@ class MenuItem { // Returns a new MenuItem created from |value|, or NULL if there is // an error. The caller takes ownership of the MenuItem. static MenuItem* Populate(const std::string& extension_id, - const DictionaryValue& value, + const base::DictionaryValue& value, std::string* error); // Sets any document and target URL patterns from |properties|. diff --git a/chrome/browser/extensions/menu_manager_unittest.cc b/chrome/browser/extensions/menu_manager_unittest.cc index f9adbd9..73c8357 100644 --- a/chrome/browser/extensions/menu_manager_unittest.cc +++ b/chrome/browser/extensions/menu_manager_unittest.cc @@ -214,13 +214,13 @@ TEST_F(MenuManagerTest, PopulateFromValue) { int contexts_value = 0; ASSERT_TRUE(contexts.ToValue()->GetAsInteger(&contexts_value)); - ListValue* document_url_patterns(new ListValue()); + base::ListValue* document_url_patterns(new base::ListValue()); document_url_patterns->Append( Value::CreateStringValue("http://www.google.com/*")); document_url_patterns->Append( Value::CreateStringValue("http://www.reddit.com/*")); - ListValue* target_url_patterns(new ListValue()); + base::ListValue* target_url_patterns(new base::ListValue()); target_url_patterns->Append( Value::CreateStringValue("http://www.yahoo.com/*")); target_url_patterns->Append( diff --git a/chrome/browser/extensions/permissions_updater.cc b/chrome/browser/extensions/permissions_updater.cc index 46bb60f..a985332 100644 --- a/chrome/browser/extensions/permissions_updater.cc +++ b/chrome/browser/extensions/permissions_updater.cc @@ -101,7 +101,7 @@ void PermissionsUpdater::DispatchEvent( !ExtensionSystem::Get(profile_)->event_router()) return; - scoped_ptr<ListValue> value(new ListValue()); + scoped_ptr<base::ListValue> value(new base::ListValue()); scoped_ptr<api::permissions::Permissions> permissions = PackPermissionSet(changed_permissions); value->Append(permissions->ToValue().release()); diff --git a/chrome/browser/extensions/webstore_install_helper.cc b/chrome/browser/extensions/webstore_install_helper.cc index 67bbbf1..323cba4 100644 --- a/chrome/browser/extensions/webstore_install_helper.cc +++ b/chrome/browser/extensions/webstore_install_helper.cc @@ -149,7 +149,8 @@ void WebstoreInstallHelper::OnDecodeImageFailed() { ReportResultsIfComplete(); } -void WebstoreInstallHelper::OnJSONParseSucceeded(const ListValue& wrapper) { +void WebstoreInstallHelper::OnJSONParseSucceeded( + const base::ListValue& wrapper) { CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); manifest_parse_complete_ = true; const Value* value = NULL; |