diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 19:42:19 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 19:42:19 +0000 |
commit | 0c6c1e43289fc2e225a6c824aff40c9b63b5df78 (patch) | |
tree | 9ab1034e260c5887ecc7a70cd112cef97458582a | |
parent | ae0c0f6af00c25b6c41c9e37e8cb849de9a9a680 (diff) | |
download | chromium_src-0c6c1e43289fc2e225a6c824aff40c9b63b5df78.zip chromium_src-0c6c1e43289fc2e225a6c824aff40c9b63b5df78.tar.gz chromium_src-0c6c1e43289fc2e225a6c824aff40c9b63b5df78.tar.bz2 |
Add base namespace to more values in sync and elsewhere.
This makes sync and net compile with no "using *Value".
BUG=
Review URL: https://codereview.chromium.org/17034006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207907 0039d316-1c4b-4281-b951-d872f2087c98
78 files changed, 260 insertions, 244 deletions
diff --git a/cc/base/math_util.cc b/cc/base/math_util.cc index c3c7b1c..5443956 100644 --- a/cc/base/math_util.cc +++ b/cc/base/math_util.cc @@ -536,7 +536,7 @@ scoped_ptr<base::Value> MathUtil::AsValue(gfx::Rect r) { } bool MathUtil::FromValue(const base::Value* raw_value, gfx::Rect* out_rect) { - const ListValue* value = NULL; + const base::ListValue* value = NULL; if (!raw_value->GetAsList(&value)) return false; diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc index bc081c9..4c85e7d 100644 --- a/cc/resources/picture.cc +++ b/cc/resources/picture.cc @@ -318,7 +318,7 @@ void Picture::Raster( "num_pixels_rasterized", bounds.width() * bounds.height()); } -scoped_ptr<Value> Picture::AsValue() const { +scoped_ptr<base::Value> Picture::AsValue() const { SkDynamicMemoryWStream stream; // Serialize the picture. diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h index ff788ae..ef8ccfb 100644 --- a/cc/resources/tile_manager.h +++ b/cc/resources/tile_manager.h @@ -142,7 +142,7 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient { void DidTileTreeBinChange(Tile* tile, TileManagerBin new_tree_bin, WhichTree tree); - scoped_ptr<Value> GetMemoryRequirementsAsValue() const; + scoped_ptr<base::Value> GetMemoryRequirementsAsValue() const; void AddRequiredTileForActivation(Tile* tile); TileManagerClient* client_; diff --git a/chrome/browser/policy/policy_map.h b/chrome/browser/policy/policy_map.h index 60524bb..3d12fc3 100644 --- a/chrome/browser/policy/policy_map.h +++ b/chrome/browser/policy/policy_map.h @@ -23,7 +23,7 @@ class PolicyMap { struct Entry { PolicyLevel level; PolicyScope scope; - Value* value; + base::Value* value; Entry() : level(POLICY_LEVEL_RECOMMENDED), @@ -50,14 +50,14 @@ class PolicyMap { // Returns a weak reference to the value currently stored for key |policy|, // or NULL if not found. Ownership is retained by the PolicyMap. // This is equivalent to Get(policy)->value, when it doesn't return NULL. - const Value* GetValue(const std::string& policy) const; + const base::Value* GetValue(const std::string& policy) const; // Takes ownership of |value|. Overwrites any existing value stored in the // map for the key |policy|. void Set(const std::string& policy, PolicyLevel level, PolicyScope scope, - Value* value); + base::Value* value); // Erase the given |policy|, if it exists in this map. void Erase(const std::string& policy); @@ -80,7 +80,7 @@ class PolicyMap { // Loads the values in |policies| into this PolicyMap. All policies loaded // will have |level| and |scope| in their entries. Existing entries are // replaced. - void LoadFrom(const DictionaryValue* policies, + void LoadFrom(const base::DictionaryValue* policies, PolicyLevel level, PolicyScope scope); diff --git a/chrome/installer/util/master_preferences.cc b/chrome/installer/util/master_preferences.cc index 25df264..6e8a94f 100644 --- a/chrome/installer/util/master_preferences.cc +++ b/chrome/installer/util/master_preferences.cc @@ -23,23 +23,23 @@ const char kFirstRunTabs[] = "first_run_tabs"; base::LazyInstance<installer::MasterPreferences> g_master_preferences = LAZY_INSTANCE_INITIALIZER; -bool GetURLFromValue(const Value* in_value, std::string* out_value) { +bool GetURLFromValue(const base::Value* in_value, std::string* out_value) { return in_value && out_value && in_value->GetAsString(out_value); } std::vector<std::string> GetNamedList(const char* name, - const DictionaryValue* prefs) { + const base::DictionaryValue* prefs) { std::vector<std::string> list; if (!prefs) return list; - const ListValue* value_list = NULL; + const base::ListValue* value_list = NULL; if (!prefs->GetList(name, &value_list)) return list; list.reserve(value_list->GetSize()); for (size_t i = 0; i < value_list->GetSize(); ++i) { - const Value* entry; + const base::Value* entry; std::string url_entry; if (!value_list->Get(i, &entry) || !GetURLFromValue(entry, &url_entry)) { NOTREACHED(); @@ -50,20 +50,21 @@ std::vector<std::string> GetNamedList(const char* name, return list; } -DictionaryValue* ParseDistributionPreferences(const std::string& json_data) { +base::DictionaryValue* ParseDistributionPreferences( + const std::string& json_data) { JSONStringValueSerializer json(json_data); std::string error; - scoped_ptr<Value> root(json.Deserialize(NULL, &error)); + scoped_ptr<base::Value> root(json.Deserialize(NULL, &error)); if (!root.get()) { LOG(WARNING) << "Failed to parse master prefs file: " << error; return NULL; } - if (!root->IsType(Value::TYPE_DICTIONARY)) { + if (!root->IsType(base::Value::TYPE_DICTIONARY)) { LOG(WARNING) << "Failed to parse master prefs file: " << "Root item must be a dictionary."; return NULL; } - return static_cast<DictionaryValue*>(root.release()); + return static_cast<base::DictionaryValue*>(root.release()); } } // namespace @@ -128,7 +129,7 @@ void MasterPreferences::InitializeFromCommandLine(const CommandLine& cmd_line) { installer::switches::kInstallerData)); this->MasterPreferences::MasterPreferences(prefs_path); } else { - master_dictionary_.reset(new DictionaryValue()); + master_dictionary_.reset(new base::DictionaryValue()); } DCHECK(master_dictionary_.get()); @@ -216,7 +217,7 @@ bool MasterPreferences::InitializeFromString(const std::string& json_data) { bool data_is_valid = true; if (!master_dictionary_.get()) { - master_dictionary_.reset(new DictionaryValue()); + master_dictionary_.reset(new base::DictionaryValue()); data_is_valid = false; } else { // Cache a pointer to the distribution dictionary. @@ -305,7 +306,8 @@ std::vector<std::string> MasterPreferences::GetFirstRunTabs() const { return GetNamedList(kFirstRunTabs, master_dictionary_.get()); } -bool MasterPreferences::GetExtensionsBlock(DictionaryValue** extensions) const { +bool MasterPreferences::GetExtensionsBlock( + base::DictionaryValue** extensions) const { return master_dictionary_->GetDictionary( master_preferences::kExtensionsBlock, extensions); } diff --git a/chrome/tools/build/generate_policy_source.py b/chrome/tools/build/generate_policy_source.py index 085b874..d387b82 100755 --- a/chrome/tools/build/generate_policy_source.py +++ b/chrome/tools/build/generate_policy_source.py @@ -244,7 +244,7 @@ def _WritePolicyConstantSource(policies, os, f): f.write('const PolicyDefinitionList::Entry kEntries[] = {\n') for policy in policies: if policy.is_supported: - f.write(' { key::k%s, Value::%s, %s, %s },\n' % + f.write(' { key::k%s, base::Value::%s, %s, %s },\n' % (policy.name, policy.value_type, 'true' if policy.is_device_only else 'false', policy.id)) f.write('};\n\n') @@ -424,7 +424,7 @@ namespace policy { namespace em = enterprise_management; -Value* DecodeIntegerValue(google::protobuf::int64 value) { +base::Value* DecodeIntegerValue(google::protobuf::int64 value) { if (value < std::numeric_limits<int>::min() || value > std::numeric_limits<int>::max()) { LOG(WARNING) << "Integer value " << value @@ -432,15 +432,15 @@ Value* DecodeIntegerValue(google::protobuf::int64 value) { return NULL; } - return Value::CreateIntegerValue(static_cast<int>(value)); + return base::Value::CreateIntegerValue(static_cast<int>(value)); } -ListValue* DecodeStringList(const em::StringList& string_list) { - ListValue* list_value = new ListValue; +base::ListValue* DecodeStringList(const em::StringList& string_list) { + base::ListValue* list_value = new base::ListValue; RepeatedPtrField<std::string>::const_iterator entry; for (entry = string_list.entries().begin(); entry != string_list.entries().end(); ++entry) { - list_value->Append(Value::CreateStringValue(*entry)); + list_value->Append(base::Value::CreateStringValue(*entry)); } return list_value; } @@ -457,16 +457,16 @@ CPP_FOOT = '''} def _CreateValue(type, arg): if type == 'TYPE_BOOLEAN': - return 'Value::CreateBooleanValue(%s)' % arg + return 'base::Value::CreateBooleanValue(%s)' % arg elif type == 'TYPE_INTEGER': return 'DecodeIntegerValue(%s)' % arg elif type == 'TYPE_STRING': - return 'Value::CreateStringValue(%s)' % arg + return 'base::Value::CreateStringValue(%s)' % arg elif type == 'TYPE_LIST': return 'DecodeStringList(%s)' % arg elif type == 'TYPE_DICTIONARY': # TODO(joaodasilva): decode 'dict' types. http://crbug.com/108997 - return 'new DictionaryValue()' + return 'new base::DictionaryValue()' else: raise NotImplementedError('Unknown type %s' % type) @@ -496,7 +496,7 @@ def _WritePolicyCode(f, policy): ' }\n' ' }\n' ' if (do_set) {\n') - f.write(' Value* value = %s;\n' % + f.write(' base::Value* value = %s;\n' % (_CreateValue(policy.value_type, 'policy_proto.value()'))) f.write(' map->Set(key::k%s, level, POLICY_SCOPE_USER, value);\n' % policy.name) diff --git a/chromeos/dbus/shill_ipconfig_client_stub.cc b/chromeos/dbus/shill_ipconfig_client_stub.cc index 8bb2884..a4ce27db 100644 --- a/chromeos/dbus/shill_ipconfig_client_stub.cc +++ b/chromeos/dbus/shill_ipconfig_client_stub.cc @@ -73,7 +73,7 @@ void ShillIPConfigClientStub::SetProperty( dict->SetWithoutPathExpansion(name, value.DeepCopy()); } else { // Create a new stub ipconfig object, and update its properties. - DictionaryValue* dvalue = new DictionaryValue; + base::DictionaryValue* dvalue = new base::DictionaryValue; dvalue->SetWithoutPathExpansion(name, value.DeepCopy()); ipconfigs_.SetWithoutPathExpansion(ipconfig_path.value(), dvalue); diff --git a/chromeos/dbus/shill_manager_client_stub.cc b/chromeos/dbus/shill_manager_client_stub.cc index b9950f2..307c589 100644 --- a/chromeos/dbus/shill_manager_client_stub.cc +++ b/chromeos/dbus/shill_manager_client_stub.cc @@ -28,11 +28,11 @@ namespace { // Used to compare values for finding entries to erase in a ListValue. // (ListValue only implements a const_iterator version of Find). struct ValueEquals { - explicit ValueEquals(const Value* first) : first_(first) {} - bool operator()(const Value* second) const { + explicit ValueEquals(const base::Value* first) : first_(first) {} + bool operator()(const base::Value* second) const { return first_->Equals(second); } - const Value* first_; + const base::Value* first_; }; } // namespace diff --git a/chromeos/network/certificate_pattern.cc b/chromeos/network/certificate_pattern.cc index f2048e07..c69ce55 100644 --- a/chromeos/network/certificate_pattern.cc +++ b/chromeos/network/certificate_pattern.cc @@ -42,7 +42,7 @@ base::ListValue* CreateListFromStrings( base::ListValue* new_list = new base::ListValue; for (std::vector<std::string>::const_iterator iter = strings.begin(); iter != strings.end(); ++iter) { - new_list->Append(new StringValue(*iter)); + new_list->Append(new base::StringValue(*iter)); } return new_list; } diff --git a/chromeos/network/cros_network_functions.cc b/chromeos/network/cros_network_functions.cc index d3e52e7..68f3d2e 100644 --- a/chromeos/network/cros_network_functions.cc +++ b/chromeos/network/cros_network_functions.cc @@ -286,7 +286,7 @@ void ListIPConfigsCallback(const NetworkGetIPConfigsCallback& callback, const base::DictionaryValue& properties) { NetworkIPConfigVector ipconfig_vector; std::string hardware_address; - const ListValue* ips = NULL; + const base::ListValue* ips = NULL; if (call_status != DBUS_METHOD_CALL_SUCCESS || !properties.GetListWithoutPathExpansion(flimflam::kIPConfigsProperty, &ips)) { @@ -627,7 +627,7 @@ bool CrosListIPConfigsAndBlock(const std::string& device_path, if (!properties.get()) return false; - ListValue* ips = NULL; + base::ListValue* ips = NULL; if (!properties->GetListWithoutPathExpansion( flimflam::kIPConfigsProperty, &ips)) return false; diff --git a/chromeos/network/device_state.cc b/chromeos/network/device_state.cc index 72567a4..27101d0 100644 --- a/chromeos/network/device_state.cc +++ b/chromeos/network/device_state.cc @@ -35,7 +35,7 @@ bool DeviceState::PropertyChanged(const std::string& key, } else if (key == shill::kProviderRequiresRoamingProperty) { return GetBooleanValue(key, value, &provider_requires_roaming_); } else if (key == flimflam::kHomeProviderProperty) { - const DictionaryValue* dict = NULL; + const base::DictionaryValue* dict = NULL; if (!value.GetAsDictionary(&dict)) return false; std::string home_provider_country; @@ -60,7 +60,7 @@ bool DeviceState::PropertyChanged(const std::string& key, } else if (key == flimflam::kTechnologyFamilyProperty) { return GetStringValue(key, value, &technology_family_); } else if (key == flimflam::kSIMLockStatusProperty) { - const DictionaryValue* dict = NULL; + const base::DictionaryValue* dict = NULL; if (!value.GetAsDictionary(&dict)) return false; if (!dict->GetStringWithoutPathExpansion(flimflam::kSIMLockTypeProperty, diff --git a/chromeos/network/network_connection_handler.cc b/chromeos/network/network_connection_handler.cc index ec75b01..094625c 100644 --- a/chromeos/network/network_connection_handler.cc +++ b/chromeos/network/network_connection_handler.cc @@ -64,7 +64,7 @@ bool NetworkRequiresActivation(const NetworkState* network) { bool VPNIsConfigured(const std::string& service_path, const base::DictionaryValue& service_properties) { - const DictionaryValue* properties; + const base::DictionaryValue* properties; if (!service_properties.GetDictionary(flimflam::kProviderProperty, &properties)) { NET_LOG_ERROR("VPN Provider Dictionary not present", service_path); diff --git a/chromeos/network/network_state.cc b/chromeos/network/network_state.cc index f9342f9..f48ea0e 100644 --- a/chromeos/network/network_state.cc +++ b/chromeos/network/network_state.cc @@ -218,10 +218,10 @@ void NetworkState::GetProperties(base::DictionaryValue* dictionary) const { error_); dictionary->SetStringWithoutPathExpansion(shill::kErrorDetailsProperty, error_details_); - base::DictionaryValue* ipconfig_properties = new DictionaryValue; + base::DictionaryValue* ipconfig_properties = new base::DictionaryValue; ipconfig_properties->SetStringWithoutPathExpansion(flimflam::kAddressProperty, ip_address_); - base::ListValue* name_servers = new ListValue; + base::ListValue* name_servers = new base::ListValue; name_servers->AppendStrings(dns_servers_); ipconfig_properties->SetWithoutPathExpansion(flimflam::kNameServersProperty, name_servers); diff --git a/chromeos/network/network_ui_data.cc b/chromeos/network/network_ui_data.cc index 2eeac35..b63bb81 100644 --- a/chromeos/network/network_ui_data.cc +++ b/chromeos/network/network_ui_data.cc @@ -83,7 +83,7 @@ NetworkUIData& NetworkUIData::operator=(const NetworkUIData& other) { return *this; } -NetworkUIData::NetworkUIData(const DictionaryValue& dict) { +NetworkUIData::NetworkUIData(const base::DictionaryValue& dict) { std::string source; dict.GetString(kKeyONCSource, &source); onc_source_ = StringToEnum(kONCSourceTable, source, onc::ONC_SOURCE_NONE); @@ -94,7 +94,7 @@ NetworkUIData::NetworkUIData(const DictionaryValue& dict) { StringToEnum(kClientCertTable, type_string, CLIENT_CERT_TYPE_NONE); if (certificate_type_ == CLIENT_CERT_TYPE_PATTERN) { - const DictionaryValue* cert_dict = NULL; + const base::DictionaryValue* cert_dict = NULL; dict.GetDictionary(kKeyCertificatePattern, &cert_dict); if (cert_dict) certificate_pattern_.CopyFromDictionary(*cert_dict); @@ -104,7 +104,7 @@ NetworkUIData::NetworkUIData(const DictionaryValue& dict) { } } - const DictionaryValue* user_settings = NULL; + const base::DictionaryValue* user_settings = NULL; if (dict.GetDictionary(kKeyUserSettings, &user_settings)) user_settings_.reset(user_settings->DeepCopy()); } diff --git a/chromeos/network/onc/onc_merger.cc b/chromeos/network/onc/onc_merger.cc index e7703d3..57d40a1 100644 --- a/chromeos/network/onc/onc_merger.cc +++ b/chromeos/network/onc/onc_merger.cc @@ -24,10 +24,10 @@ typedef scoped_ptr<base::DictionaryValue> DictionaryPtr; // |policy|. void MarkRecommendedFieldnames(const base::DictionaryValue& policy, base::DictionaryValue* result) { - const ListValue* recommended_value = NULL; + const base::ListValue* recommended_value = NULL; if (!policy.GetListWithoutPathExpansion(kRecommended, &recommended_value)) return; - for (ListValue::const_iterator it = recommended_value->begin(); + for (base::ListValue::const_iterator it = recommended_value->begin(); it != recommended_value->end(); ++it) { std::string entry; if ((*it)->GetAsString(&entry)) diff --git a/chromeos/network/onc/onc_validator.cc b/chromeos/network/onc/onc_validator.cc index 48cc183..30a1bc7 100644 --- a/chromeos/network/onc/onc_validator.cc +++ b/chromeos/network/onc/onc_validator.cc @@ -28,7 +28,7 @@ std::string ValueToString(const base::Value& value) { // Copied from policy/configuration_policy_handler.cc. // TODO(pneubeck): move to a common place like base/. -std::string ValueTypeToString(Value::Type type) { +std::string ValueTypeToString(base::Value::Type type) { static const char* strings[] = { "null", "boolean", diff --git a/chromeos/network/shill_property_handler.cc b/chromeos/network/shill_property_handler.cc index e739822..43483b8 100644 --- a/chromeos/network/shill_property_handler.cc +++ b/chromeos/network/shill_property_handler.cc @@ -282,7 +282,7 @@ bool ShillPropertyHandler::ManagerPropertyChanged(const std::string& key, UpdateObserved(ManagedState::MANAGED_TYPE_NETWORK, *vlist); } } else if (key == flimflam::kDevicesProperty) { - const ListValue* vlist = GetListValue(key, value); + const base::ListValue* vlist = GetListValue(key, value); if (vlist) { listener_->UpdateManagedList(ManagedState::MANAGED_TYPE_DEVICE, *vlist); UpdateObserved(ManagedState::MANAGED_TYPE_DEVICE, *vlist); diff --git a/google_apis/gaia/gaia_auth_fetcher.cc b/google_apis/gaia/gaia_auth_fetcher.cc index 5f98a28..67756de 100644 --- a/google_apis/gaia/gaia_auth_fetcher.cc +++ b/google_apis/gaia/gaia_auth_fetcher.cc @@ -36,7 +36,7 @@ static bool CookiePartsContains(const std::vector<std::string>& parts, return std::find(parts.begin(), parts.end(), part) != parts.end(); } -bool ExtractOAuth2TokenPairResponse(DictionaryValue* dict, +bool ExtractOAuth2TokenPairResponse(base::DictionaryValue* dict, std::string* refresh_token, std::string* access_token, int* expires_in_secs) { @@ -820,7 +820,8 @@ void GaiaAuthFetcher::OnOAuth2TokenPairFetched( if (status.is_success() && response_code == net::HTTP_OK) { scoped_ptr<base::Value> value(base::JSONReader::Read(data)); if (value.get() && value->GetType() == base::Value::TYPE_DICTIONARY) { - DictionaryValue* dict = static_cast<DictionaryValue*>(value.get()); + base::DictionaryValue* dict = + static_cast<base::DictionaryValue*>(value.get()); success = ExtractOAuth2TokenPairResponse(dict, &refresh_token, &access_token, &expires_in_secs); } diff --git a/google_apis/gaia/gaia_oauth_client.cc b/google_apis/gaia/gaia_oauth_client.cc index 7b543db..f748fdb 100644 --- a/google_apis/gaia/gaia_oauth_client.cc +++ b/google_apis/gaia/gaia_oauth_client.cc @@ -186,15 +186,15 @@ void GaiaOAuthClient::Core::HandleResponse( return; } - scoped_ptr<DictionaryValue> response_dict; + scoped_ptr<base::DictionaryValue> response_dict; if (source->GetResponseCode() == net::HTTP_OK) { std::string data; source->GetResponseAsString(&data); - scoped_ptr<Value> message_value(base::JSONReader::Read(data)); + scoped_ptr<base::Value> message_value(base::JSONReader::Read(data)); if (message_value.get() && - message_value->IsType(Value::TYPE_DICTIONARY)) { + message_value->IsType(base::Value::TYPE_DICTIONARY)) { response_dict.reset( - static_cast<DictionaryValue*>(message_value.release())); + static_cast<base::DictionaryValue*>(message_value.release())); } } diff --git a/google_apis/gaia/google_service_auth_error.cc b/google_apis/gaia/google_service_auth_error.cc index 59569c7..ab3d9c0 100644 --- a/google_apis/gaia/google_service_auth_error.cc +++ b/google_apis/gaia/google_service_auth_error.cc @@ -154,8 +154,8 @@ const std::string& GoogleServiceAuthError::error_message() const { return error_message_; } -DictionaryValue* GoogleServiceAuthError::ToValue() const { - DictionaryValue* value = new DictionaryValue(); +base::DictionaryValue* GoogleServiceAuthError::ToValue() const { + base::DictionaryValue* value = new base::DictionaryValue(); std::string state_str; switch (state_) { #define STATE_CASE(x) case x: state_str = #x; break @@ -182,7 +182,7 @@ DictionaryValue* GoogleServiceAuthError::ToValue() const { value->SetString("errorMessage", error_message_); } if (state_ == CAPTCHA_REQUIRED) { - DictionaryValue* captcha_value = new DictionaryValue(); + base::DictionaryValue* captcha_value = new base::DictionaryValue(); value->Set("captcha", captcha_value); captcha_value->SetString("token", captcha_.token); captcha_value->SetString("audioUrl", captcha_.audio_url.spec()); @@ -193,7 +193,7 @@ DictionaryValue* GoogleServiceAuthError::ToValue() const { } else if (state_ == CONNECTION_FAILED) { value->SetString("networkError", net::ErrorToString(network_error_)); } else if (state_ == TWO_FACTOR) { - DictionaryValue* two_factor_value = new DictionaryValue(); + base::DictionaryValue* two_factor_value = new base::DictionaryValue(); value->Set("two_factor", two_factor_value); two_factor_value->SetString("token", second_factor_.token); two_factor_value->SetString("promptText", second_factor_.prompt_text); diff --git a/google_apis/gaia/oauth2_access_token_fetcher.cc b/google_apis/gaia/oauth2_access_token_fetcher.cc index 39efbf0..e5a17f9 100644 --- a/google_apis/gaia/oauth2_access_token_fetcher.cc +++ b/google_apis/gaia/oauth2_access_token_fetcher.cc @@ -226,7 +226,8 @@ bool OAuth2AccessTokenFetcher::ParseGetAccessTokenResponse( if (!value.get() || value->GetType() != base::Value::TYPE_DICTIONARY) return false; - DictionaryValue* dict = static_cast<DictionaryValue*>(value.get()); + base::DictionaryValue* dict = + static_cast<base::DictionaryValue*>(value.get()); return dict->GetString(kAccessTokenKey, access_token) && dict->GetInteger(kExpiresInKey, expires_in); } diff --git a/google_apis/gaia/oauth2_mint_token_flow.cc b/google_apis/gaia/oauth2_mint_token_flow.cc index f8680e3..0fae02e 100644 --- a/google_apis/gaia/oauth2_mint_token_flow.cc +++ b/google_apis/gaia/oauth2_mint_token_flow.cc @@ -178,7 +178,7 @@ void OAuth2MintTokenFlow::ProcessApiCallSuccess( std::string response_body; source->GetResponseAsString(&response_body); scoped_ptr<base::Value> value(base::JSONReader::Read(response_body)); - DictionaryValue* dict = NULL; + base::DictionaryValue* dict = NULL; if (!value.get() || !value->GetAsDictionary(&dict)) { ReportFailure(GoogleServiceAuthError::FromUnexpectedServiceResponse( "Not able to parse a JSON object from a service response.")); diff --git a/gpu/config/gpu_control_list.cc b/gpu/config/gpu_control_list.cc index 98d8233..b7da59b 100644 --- a/gpu/config/gpu_control_list.cc +++ b/gpu/config/gpu_control_list.cc @@ -1189,7 +1189,7 @@ bool GpuControlList::LoadList( return false; base::DictionaryValue* root_dictionary = - static_cast<DictionaryValue*>(root.get()); + static_cast<base::DictionaryValue*>(root.get()); DCHECK(root_dictionary); return LoadList(*root_dictionary, os_filter); } diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc index 3ee37f8..1e356ab 100644 --- a/ipc/ipc_message_utils.cc +++ b/ipc/ipc_message_utils.cc @@ -134,7 +134,7 @@ bool ReadDictionaryValue(const Message* m, PickleIterator* iter, for (int i = 0; i < size; ++i) { std::string key; - Value* subval; + base::Value* subval; if (!ReadParam(m, iter, &key) || !ReadValue(m, iter, &subval, recursion + 1)) return false; @@ -446,7 +446,7 @@ void ParamTraits<base::DictionaryValue>::Write(Message* m, bool ParamTraits<base::DictionaryValue>::Read( const Message* m, PickleIterator* iter, param_type* r) { int type; - if (!ReadParam(m, iter, &type) || type != Value::TYPE_DICTIONARY) + if (!ReadParam(m, iter, &type) || type != base::Value::TYPE_DICTIONARY) return false; return ReadDictionaryValue(m, iter, r, 0); @@ -517,7 +517,7 @@ void ParamTraits<base::ListValue>::Write(Message* m, const param_type& p) { bool ParamTraits<base::ListValue>::Read( const Message* m, PickleIterator* iter, param_type* r) { int type; - if (!ReadParam(m, iter, &type) || type != Value::TYPE_LIST) + if (!ReadParam(m, iter, &type) || type != base::Value::TYPE_LIST) return false; return ReadListValue(m, iter, r, 0); diff --git a/jingle/glue/utils.cc b/jingle/glue/utils.cc index d58fce0..bc548ea 100644 --- a/jingle/glue/utils.cc +++ b/jingle/glue/utils.cc @@ -35,7 +35,7 @@ bool SocketAddressToIPEndPoint(const talk_base::SocketAddress& address, std::string SerializeP2PCandidate(const cricket::Candidate& candidate) { // TODO(sergeyu): Use SDP to format candidates? - DictionaryValue value; + base::DictionaryValue value; value.SetString("ip", candidate.address().ipaddr().ToString()); value.SetInteger("port", candidate.address().port()); value.SetString("type", candidate.type()); @@ -52,13 +52,14 @@ std::string SerializeP2PCandidate(const cricket::Candidate& candidate) { bool DeserializeP2PCandidate(const std::string& candidate_str, cricket::Candidate* candidate) { - scoped_ptr<Value> value( + scoped_ptr<base::Value> value( base::JSONReader::Read(candidate_str, base::JSON_ALLOW_TRAILING_COMMAS)); - if (!value.get() || !value->IsType(Value::TYPE_DICTIONARY)) { + if (!value.get() || !value->IsType(base::Value::TYPE_DICTIONARY)) { return false; } - DictionaryValue* dic_value = static_cast<DictionaryValue*>(value.get()); + base::DictionaryValue* dic_value = + static_cast<base::DictionaryValue*>(value.get()); std::string ip; int port; diff --git a/media/base/media_log_event.h b/media/base/media_log_event.h index f831fe5..9176832 100644 --- a/media/base/media_log_event.h +++ b/media/base/media_log_event.h @@ -20,7 +20,7 @@ struct MediaLogEvent { MediaLogEvent& operator=(const MediaLogEvent& event) { id = event.id; type = event.type; - scoped_ptr<DictionaryValue> event_copy(event.params.DeepCopy()); + scoped_ptr<base::DictionaryValue> event_copy(event.params.DeepCopy()); params.Swap(event_copy.get()); time = event.time; return *this; diff --git a/net/base/net_log.cc b/net/base/net_log.cc index b1ec72f..14f485e 100644 --- a/net/base/net_log.cc +++ b/net/base/net_log.cc @@ -99,7 +99,8 @@ NetLog::ParametersCallback NetLog::Source::ToEventParametersCallback() const { } // static -bool NetLog::Source::FromEventParameters(Value* event_params, Source* source) { +bool NetLog::Source::FromEventParameters(base::Value* event_params, + Source* source) { base::DictionaryValue* dict; base::DictionaryValue* source_dict; int source_id; @@ -136,7 +137,7 @@ base::Value* NetLog::Entry::ToValue() const { // Set the event-specific parameters. if (parameters_callback_) { - Value* value = parameters_callback_->Run(log_level_); + base::Value* value = parameters_callback_->Run(log_level_); if (value) entry_dict->Set("params", value); } diff --git a/net/cert/crl_set.cc b/net/cert/crl_set.cc index 539fd6f..2bdd5f4 100644 --- a/net/cert/crl_set.cc +++ b/net/cert/crl_set.cc @@ -133,12 +133,12 @@ static base::DictionaryValue* ReadHeader(base::StringPiece* data) { const base::StringPiece header_bytes(data->data(), header_len); data->remove_prefix(header_len); - scoped_ptr<Value> header(base::JSONReader::Read( + scoped_ptr<base::Value> header(base::JSONReader::Read( header_bytes, base::JSON_ALLOW_TRAILING_COMMAS)); if (header.get() == NULL) return NULL; - if (!header->IsType(Value::TYPE_DICTIONARY)) + if (!header->IsType(base::Value::TYPE_DICTIONARY)) return NULL; return reinterpret_cast<base::DictionaryValue*>(header.release()); } diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc index 6d37710..fadb578 100644 --- a/net/dns/dns_transaction.cc +++ b/net/dns/dns_transaction.cc @@ -97,7 +97,7 @@ class DnsAttempt { // Returns a Value representing the received response, along with a reference // to the NetLog source source of the UDP socket used. The request must have // completed before this is called. - Value* NetLogResponseCallback(NetLog::LogLevel log_level) const { + base::Value* NetLogResponseCallback(NetLog::LogLevel log_level) const { DCHECK(GetResponse()->IsValid()); base::DictionaryValue* dict = new base::DictionaryValue(); diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc index ba8018c..1f93c03 100644 --- a/net/spdy/spdy_session.cc +++ b/net/spdy/spdy_session.cc @@ -169,7 +169,7 @@ base::Value* NetLogSpdySessionWindowUpdateCallback( int32 delta, int32 window_size, NetLog::LogLevel /* log_level */) { - DictionaryValue* dict = new DictionaryValue(); + base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetInteger("delta", delta); dict->SetInteger("window_size", window_size); return dict; diff --git a/net/url_request/url_request_netlog_params.cc b/net/url_request/url_request_netlog_params.cc index 3e26eec..a247326 100644 --- a/net/url_request/url_request_netlog_params.cc +++ b/net/url_request/url_request_netlog_params.cc @@ -26,7 +26,7 @@ base::Value* NetLogURLRequestStartCallback(const GURL* url, return dict; } -bool StartEventLoadFlagsFromEventParams(const Value* event_params, +bool StartEventLoadFlagsFromEventParams(const base::Value* event_params, int* load_flags) { const base::DictionaryValue* dict; if (!event_params->GetAsDictionary(&dict) || diff --git a/sync/api/sync_change_unittest.cc b/sync/api/sync_change_unittest.cc index b989e41..4c23c77 100644 --- a/sync/api/sync_change_unittest.cc +++ b/sync/api/sync_change_unittest.cc @@ -47,8 +47,8 @@ TEST_F(SyncChangeTest, LocalUpdate) { EXPECT_EQ(tag, e.sync_data().GetTag()); EXPECT_EQ(title, e.sync_data().GetTitle()); EXPECT_EQ(PREFERENCES, e.sync_data().GetDataType()); - scoped_ptr<DictionaryValue> ref_spec(EntitySpecificsToValue(specifics)); - scoped_ptr<DictionaryValue> e_spec(EntitySpecificsToValue( + scoped_ptr<base::DictionaryValue> ref_spec(EntitySpecificsToValue(specifics)); + scoped_ptr<base::DictionaryValue> e_spec(EntitySpecificsToValue( e.sync_data().GetSpecifics())); EXPECT_TRUE(ref_spec->Equals(e_spec.get())); } @@ -67,8 +67,8 @@ TEST_F(SyncChangeTest, LocalAdd) { EXPECT_EQ(tag, e.sync_data().GetTag()); EXPECT_EQ(title, e.sync_data().GetTitle()); EXPECT_EQ(PREFERENCES, e.sync_data().GetDataType()); - scoped_ptr<DictionaryValue> ref_spec(EntitySpecificsToValue(specifics)); - scoped_ptr<DictionaryValue> e_spec(EntitySpecificsToValue( + scoped_ptr<base::DictionaryValue> ref_spec(EntitySpecificsToValue(specifics)); + scoped_ptr<base::DictionaryValue> e_spec(EntitySpecificsToValue( e.sync_data().GetSpecifics())); EXPECT_TRUE(ref_spec->Equals(e_spec.get())); } @@ -110,9 +110,9 @@ TEST_F(SyncChangeTest, SyncerChanges) { SyncChange e = change_list[0]; EXPECT_EQ(SyncChange::ACTION_UPDATE, e.change_type()); EXPECT_EQ(PREFERENCES, e.sync_data().GetDataType()); - scoped_ptr<DictionaryValue> ref_spec(EntitySpecificsToValue( + scoped_ptr<base::DictionaryValue> ref_spec(EntitySpecificsToValue( update_specifics)); - scoped_ptr<DictionaryValue> e_spec(EntitySpecificsToValue( + scoped_ptr<base::DictionaryValue> e_spec(EntitySpecificsToValue( e.sync_data().GetSpecifics())); EXPECT_TRUE(ref_spec->Equals(e_spec.get())); diff --git a/sync/api/sync_data.cc b/sync/api/sync_data.cc index e95a2df..8df5eae 100644 --- a/sync/api/sync_data.cc +++ b/sync/api/sync_data.cc @@ -121,7 +121,8 @@ std::string SyncData::ToString() const { std::string type = ModelTypeToString(GetDataType()); std::string specifics; - scoped_ptr<DictionaryValue> value(EntitySpecificsToValue(GetSpecifics())); + scoped_ptr<base::DictionaryValue> value( + EntitySpecificsToValue(GetSpecifics())); base::JSONWriter::WriteWithOptions(value.get(), base::JSONWriter::OPTIONS_PRETTY_PRINT, &specifics); diff --git a/sync/engine/traffic_logger.cc b/sync/engine/traffic_logger.cc index 740409a..13b1c64 100644 --- a/sync/engine/traffic_logger.cc +++ b/sync/engine/traffic_logger.cc @@ -18,10 +18,10 @@ namespace syncer { namespace { template <class T> void LogData(const T& data, - DictionaryValue* (*to_dictionary_value)(const T&, bool), + base::DictionaryValue* (*to_dictionary_value)(const T&, bool), const std::string& description) { if (::logging::DEBUG_MODE && VLOG_IS_ON(1)) { - scoped_ptr<DictionaryValue> value( + scoped_ptr<base::DictionaryValue> value( (*to_dictionary_value)(data, true /* include_specifics */)); std::string message; base::JSONWriter::WriteWithOptions(value.get(), diff --git a/sync/engine/traffic_recorder.cc b/sync/engine/traffic_recorder.cc index 0e19aaa..d3f2347 100644 --- a/sync/engine/traffic_recorder.cc +++ b/sync/engine/traffic_recorder.cc @@ -61,10 +61,10 @@ const char* GetMessageTypeString(TrafficRecorder::TrafficMessageType type) { } } -DictionaryValue* TrafficRecorder::TrafficRecord::ToValue() const { - scoped_ptr<DictionaryValue> value; +base::DictionaryValue* TrafficRecorder::TrafficRecord::ToValue() const { + scoped_ptr<base::DictionaryValue> value; if (truncated) { - value.reset(new DictionaryValue()); + value.reset(new base::DictionaryValue()); value->SetString("message_type", GetMessageTypeString(message_type)); value->SetBoolean("truncated", true); @@ -90,8 +90,8 @@ DictionaryValue* TrafficRecorder::TrafficRecord::ToValue() const { } -ListValue* TrafficRecorder::ToValue() const { - scoped_ptr<ListValue> value(new ListValue()); +base::ListValue* TrafficRecorder::ToValue() const { + scoped_ptr<base::ListValue> value(new base::ListValue()); std::deque<TrafficRecord>::const_iterator it; for (it = records_.begin(); it != records_.end(); ++it) { const TrafficRecord& record = *it; diff --git a/sync/engine/traffic_recorder.h b/sync/engine/traffic_recorder.h index 65e652e..94639ab 100644 --- a/sync/engine/traffic_recorder.h +++ b/sync/engine/traffic_recorder.h @@ -45,7 +45,7 @@ class SYNC_EXPORT_PRIVATE TrafficRecorder { base::Time time); TrafficRecord(); ~TrafficRecord(); - DictionaryValue* ToValue() const; + base::DictionaryValue* ToValue() const; // Time of record creation. base::Time timestamp; @@ -57,7 +57,7 @@ class SYNC_EXPORT_PRIVATE TrafficRecorder { void RecordClientToServerMessage(const sync_pb::ClientToServerMessage& msg); void RecordClientToServerResponse( const sync_pb::ClientToServerResponse& response); - ListValue* ToValue() const; + base::ListValue* ToValue() const; const std::deque<TrafficRecord>& records() { return records_; diff --git a/sync/engine/traffic_recorder_unittest.cc b/sync/engine/traffic_recorder_unittest.cc index 19d682a..4928604 100644 --- a/sync/engine/traffic_recorder_unittest.cc +++ b/sync/engine/traffic_recorder_unittest.cc @@ -109,10 +109,10 @@ TEST(TrafficRecorderTest, ToValueTimestampTest) { recorder.set_time(sample_time); recorder.RecordClientToServerResponse(response); - scoped_ptr<ListValue> value; + scoped_ptr<base::ListValue> value; value.reset(recorder.ToValue()); - DictionaryValue* record_value; + base::DictionaryValue* record_value; std::string time_str; ASSERT_TRUE(value->GetDictionary(0, &record_value)); diff --git a/sync/internal_api/base_node.cc b/sync/internal_api/base_node.cc index db5f595..633b766 100644 --- a/sync/internal_api/base_node.cc +++ b/sync/internal_api/base_node.cc @@ -227,8 +227,8 @@ int BaseNode::GetPositionIndex() const { return GetEntry()->GetPositionIndex(); } -DictionaryValue* BaseNode::GetSummaryAsValue() const { - DictionaryValue* node_info = new DictionaryValue(); +base::DictionaryValue* BaseNode::GetSummaryAsValue() const { + base::DictionaryValue* node_info = new base::DictionaryValue(); node_info->SetString("id", base::Int64ToString(GetId())); node_info->SetBoolean("isFolder", GetIsFolder()); node_info->SetString("title", GetTitle()); @@ -236,8 +236,8 @@ DictionaryValue* BaseNode::GetSummaryAsValue() const { return node_info; } -DictionaryValue* BaseNode::GetDetailsAsValue() const { - DictionaryValue* node_info = GetSummaryAsValue(); +base::DictionaryValue* BaseNode::GetDetailsAsValue() const { + base::DictionaryValue* node_info = GetSummaryAsValue(); node_info->SetString( "modificationTime", GetTimeDebugString(GetModificationTime())); node_info->SetString("parentId", base::Int64ToString(GetParentId())); diff --git a/sync/internal_api/change_record.cc b/sync/internal_api/change_record.cc index b3aeb99..4894b3c 100644 --- a/sync/internal_api/change_record.cc +++ b/sync/internal_api/change_record.cc @@ -17,8 +17,8 @@ ChangeRecord::ChangeRecord() ChangeRecord::~ChangeRecord() {} -DictionaryValue* ChangeRecord::ToValue() const { - DictionaryValue* value = new DictionaryValue(); +base::DictionaryValue* ChangeRecord::ToValue() const { + base::DictionaryValue* value = new base::DictionaryValue(); std::string action_str; switch (action) { case ACTION_ADD: @@ -55,7 +55,7 @@ ExtraPasswordChangeRecordData::ExtraPasswordChangeRecordData( ExtraPasswordChangeRecordData::~ExtraPasswordChangeRecordData() {} -DictionaryValue* ExtraPasswordChangeRecordData::ToValue() const { +base::DictionaryValue* ExtraPasswordChangeRecordData::ToValue() const { return PasswordSpecificsDataToValue(unencrypted_); } diff --git a/sync/internal_api/js_mutation_event_observer_unittest.cc b/sync/internal_api/js_mutation_event_observer_unittest.cc index b14cb81..4f449cf 100644 --- a/sync/internal_api/js_mutation_event_observer_unittest.cc +++ b/sync/internal_api/js_mutation_event_observer_unittest.cc @@ -70,10 +70,10 @@ TEST_F(JsMutationEventObserverTest, OnChangesApplied) { for (int i = AUTOFILL_PROFILE; i < MODEL_TYPE_COUNT; ++i) { const std::string& model_type_str = ModelTypeToString(ModelTypeFromInt(i)); - DictionaryValue expected_details; + base::DictionaryValue expected_details; expected_details.SetString("modelType", model_type_str); expected_details.SetString("writeTransactionId", "0"); - ListValue* expected_changes = new ListValue(); + base::ListValue* expected_changes = new base::ListValue(); expected_details.Set("changes", expected_changes); for (int j = i; j < MODEL_TYPE_COUNT; ++j) { expected_changes->Append(changes[j].ToValue()); @@ -98,7 +98,7 @@ TEST_F(JsMutationEventObserverTest, OnChangesComplete) { InSequence dummy; for (int i = FIRST_REAL_MODEL_TYPE; i < MODEL_TYPE_COUNT; ++i) { - DictionaryValue expected_details; + base::DictionaryValue expected_details; expected_details.SetString( "modelType", ModelTypeToString(ModelTypeFromInt(i))); diff --git a/sync/internal_api/js_sync_encryption_handler_observer.cc b/sync/internal_api/js_sync_encryption_handler_observer.cc index 2885dd1..d6bd50e 100644 --- a/sync/internal_api/js_sync_encryption_handler_observer.cc +++ b/sync/internal_api/js_sync_encryption_handler_observer.cc @@ -35,7 +35,7 @@ void JsSyncEncryptionHandlerObserver::OnPassphraseRequired( if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; details.SetString("reason", PassphraseRequiredReasonToString(reason)); HandleJsEvent(FROM_HERE, "onPassphraseRequired", JsEventDetails(&details)); @@ -45,7 +45,7 @@ void JsSyncEncryptionHandlerObserver::OnPassphraseAccepted() { if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; HandleJsEvent(FROM_HERE, "onPassphraseAccepted", JsEventDetails(&details)); } @@ -55,7 +55,7 @@ void JsSyncEncryptionHandlerObserver::OnBootstrapTokenUpdated( if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; details.SetString("bootstrapToken", "<redacted>"); details.SetString("type", BootstrapTokenTypeToString(type)); HandleJsEvent(FROM_HERE, "onBootstrapTokenUpdated", JsEventDetails(&details)); @@ -67,7 +67,7 @@ void JsSyncEncryptionHandlerObserver::OnEncryptedTypesChanged( if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; details.Set("encryptedTypes", ModelTypeSetToValue(encrypted_types)); details.SetBoolean("encryptEverything", encrypt_everything); @@ -79,7 +79,7 @@ void JsSyncEncryptionHandlerObserver::OnEncryptionComplete() { if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; HandleJsEvent(FROM_HERE, "onEncryptionComplete", JsEventDetails()); } @@ -88,7 +88,7 @@ void JsSyncEncryptionHandlerObserver::OnCryptographerStateChanged( if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; details.SetBoolean("ready", cryptographer->is_ready()); details.SetBoolean("hasPendingKeys", @@ -104,7 +104,7 @@ void JsSyncEncryptionHandlerObserver::OnPassphraseTypeChanged( if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; details.SetString("passphraseType", PassphraseTypeToString(type)); details.SetInteger("explicitPassphraseTime", diff --git a/sync/internal_api/js_sync_manager_observer.cc b/sync/internal_api/js_sync_manager_observer.cc index cbc9996..01ddda8 100644 --- a/sync/internal_api/js_sync_manager_observer.cc +++ b/sync/internal_api/js_sync_manager_observer.cc @@ -34,7 +34,7 @@ void JsSyncManagerObserver::OnSyncCycleCompleted( if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; details.Set("snapshot", snapshot.ToValue()); HandleJsEvent(FROM_HERE, "onSyncCycleCompleted", JsEventDetails(&details)); } @@ -43,7 +43,7 @@ void JsSyncManagerObserver::OnConnectionStatusChange(ConnectionStatus status) { if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; details.SetString("status", ConnectionStatusToString(status)); HandleJsEvent(FROM_HERE, "onConnectionStatusChange", JsEventDetails(&details)); @@ -53,7 +53,7 @@ void JsSyncManagerObserver::OnUpdatedToken(const std::string& token) { if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; details.SetString("token", "<redacted>"); HandleJsEvent(FROM_HERE, "onUpdatedToken", JsEventDetails(&details)); } @@ -63,7 +63,7 @@ void JsSyncManagerObserver::OnActionableError( if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; details.Set("syncError", sync_error.ToValue()); HandleJsEvent(FROM_HERE, "onActionableError", JsEventDetails(&details)); @@ -79,7 +79,7 @@ void JsSyncManagerObserver::OnInitializationComplete( // Ignore the |js_backend| argument; it's not really convertible to // JSON anyway. - DictionaryValue details; + base::DictionaryValue details; details.Set("restoredTypes", ModelTypeSetToValue(restored_types)); HandleJsEvent(FROM_HERE, diff --git a/sync/internal_api/js_sync_manager_observer_unittest.cc b/sync/internal_api/js_sync_manager_observer_unittest.cc index 40c71be..56580f4 100644 --- a/sync/internal_api/js_sync_manager_observer_unittest.cc +++ b/sync/internal_api/js_sync_manager_observer_unittest.cc @@ -56,7 +56,7 @@ TEST_F(JsSyncManagerObserverTest, NoArgNotifiations) { } TEST_F(JsSyncManagerObserverTest, OnInitializationComplete) { - DictionaryValue expected_details; + base::DictionaryValue expected_details; syncer::ModelTypeSet restored_types; restored_types.Put(BOOKMARKS); restored_types.Put(NIGORI); @@ -88,7 +88,7 @@ TEST_F(JsSyncManagerObserverTest, OnSyncCycleCompleted) { base::Time::Now(), std::vector<int>(MODEL_TYPE_COUNT, 0), std::vector<int>(MODEL_TYPE_COUNT, 0)); - DictionaryValue expected_details; + base::DictionaryValue expected_details; expected_details.Set("snapshot", snapshot.ToValue()); EXPECT_CALL(mock_js_event_handler_, @@ -103,7 +103,7 @@ TEST_F(JsSyncManagerObserverTest, OnActionableError) { SyncProtocolError sync_error; sync_error.action = CLEAR_USER_DATA_AND_RESYNC; sync_error.error_type = TRANSIENT_ERROR; - DictionaryValue expected_details; + base::DictionaryValue expected_details; expected_details.Set("syncError", sync_error.ToValue()); EXPECT_CALL(mock_js_event_handler_, @@ -117,7 +117,7 @@ TEST_F(JsSyncManagerObserverTest, OnActionableError) { TEST_F(JsSyncManagerObserverTest, OnConnectionStatusChange) { const ConnectionStatus kStatus = CONNECTION_AUTH_ERROR; - DictionaryValue expected_details; + base::DictionaryValue expected_details; expected_details.SetString("status", ConnectionStatusToString(kStatus)); @@ -130,9 +130,9 @@ TEST_F(JsSyncManagerObserverTest, OnConnectionStatusChange) { } TEST_F(JsSyncManagerObserverTest, SensitiveNotifiations) { - DictionaryValue redacted_token_details; + base::DictionaryValue redacted_token_details; redacted_token_details.SetString("token", "<redacted>"); - DictionaryValue redacted_bootstrap_token_details; + base::DictionaryValue redacted_bootstrap_token_details; redacted_bootstrap_token_details.SetString("bootstrapToken", "<redacted>"); EXPECT_CALL(mock_js_event_handler_, diff --git a/sync/internal_api/public/base/invalidation.cc b/sync/internal_api/public/base/invalidation.cc index f5f6168..472fad2 100644 --- a/sync/internal_api/public/base/invalidation.cc +++ b/sync/internal_api/public/base/invalidation.cc @@ -33,7 +33,7 @@ bool AckHandle::Equals(const AckHandle& other) const { } scoped_ptr<base::DictionaryValue> AckHandle::ToValue() const { - scoped_ptr<DictionaryValue> value(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); value->SetString("state", state_); value->SetString("timestamp", base::Int64ToString(timestamp_.ToInternalValue())); @@ -76,14 +76,14 @@ bool Invalidation::Equals(const Invalidation& other) const { } scoped_ptr<base::DictionaryValue> Invalidation::ToValue() const { - scoped_ptr<DictionaryValue> value(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); value->SetString("payload", payload); value->Set("ackHandle", ack_handle.ToValue().release()); return value.Pass(); } bool Invalidation::ResetFromValue(const base::DictionaryValue& value) { - const DictionaryValue* ack_handle_value = NULL; + const base::DictionaryValue* ack_handle_value = NULL; return value.GetString("payload", &payload) && value.GetDictionary("ackHandle", &ack_handle_value) && diff --git a/sync/internal_api/public/base/model_type_invalidation_map.cc b/sync/internal_api/public/base/model_type_invalidation_map.cc index 65a125f..7ced0ff 100644 --- a/sync/internal_api/public/base/model_type_invalidation_map.cc +++ b/sync/internal_api/public/base/model_type_invalidation_map.cc @@ -35,16 +35,16 @@ ModelTypeSet ModelTypeInvalidationMapToSet( std::string ModelTypeInvalidationMapToString( const ModelTypeInvalidationMap& invalidation_map) { - scoped_ptr<DictionaryValue> value( + scoped_ptr<base::DictionaryValue> value( ModelTypeInvalidationMapToValue(invalidation_map)); std::string json; base::JSONWriter::Write(value.get(), &json); return json; } -DictionaryValue* ModelTypeInvalidationMapToValue( +base::DictionaryValue* ModelTypeInvalidationMapToValue( const ModelTypeInvalidationMap& invalidation_map) { - DictionaryValue* value = new DictionaryValue(); + base::DictionaryValue* value = new base::DictionaryValue(); for (ModelTypeInvalidationMap::const_iterator it = invalidation_map.begin(); it != invalidation_map.end(); ++it) { std::string printable_payload; diff --git a/sync/internal_api/public/base/model_type_invalidation_map_unittest.cc b/sync/internal_api/public/base/model_type_invalidation_map_unittest.cc index 772ee7e..016e167 100644 --- a/sync/internal_api/public/base/model_type_invalidation_map_unittest.cc +++ b/sync/internal_api/public/base/model_type_invalidation_map_unittest.cc @@ -32,7 +32,8 @@ TEST_F(ModelTypeInvalidationMapTest, TypeInvalidationMapToValue) { states[BOOKMARKS].payload = "bookmarkpayload"; states[APPS].payload = ""; - scoped_ptr<DictionaryValue> value(ModelTypeInvalidationMapToValue(states)); + scoped_ptr<base::DictionaryValue> value( + ModelTypeInvalidationMapToValue(states)); EXPECT_EQ(2u, value->size()); ExpectDictStringValue(states[BOOKMARKS].payload, *value, "Bookmarks"); ExpectDictStringValue(std::string(), *value, "Apps"); diff --git a/sync/internal_api/public/base/progress_marker_map.cc b/sync/internal_api/public/base/progress_marker_map.cc index 20d7ea3..b281013 100644 --- a/sync/internal_api/public/base/progress_marker_map.cc +++ b/sync/internal_api/public/base/progress_marker_map.cc @@ -10,9 +10,9 @@ namespace syncer { -scoped_ptr<DictionaryValue> ProgressMarkerMapToValue( +scoped_ptr<base::DictionaryValue> ProgressMarkerMapToValue( const ProgressMarkerMap& marker_map) { - scoped_ptr<DictionaryValue> value(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); for (ProgressMarkerMap::const_iterator it = marker_map.begin(); it != marker_map.end(); ++it) { std::string printable_payload; diff --git a/sync/internal_api/public/change_record_unittest.cc b/sync/internal_api/public/change_record_unittest.cc index cd54189..201ed65 100644 --- a/sync/internal_api/public/change_record_unittest.cc +++ b/sync/internal_api/public/change_record_unittest.cc @@ -60,7 +60,7 @@ void CheckChangeRecordValue( value.Get("extra", &extra_value)); EXPECT_TRUE(Value::Equals(extra_value, expected_extra_value.get())); - scoped_ptr<DictionaryValue> expected_specifics_value( + scoped_ptr<base::DictionaryValue> expected_specifics_value( EntitySpecificsToValue(record.specifics)); ExpectDictDictionaryValue(*expected_specifics_value, value, "specifics"); @@ -70,7 +70,7 @@ void CheckChangeRecordValue( class MockExtraChangeRecordData : public ExtraPasswordChangeRecordData { public: - MOCK_CONST_METHOD0(ToValue, DictionaryValue*()); + MOCK_CONST_METHOD0(ToValue, base::DictionaryValue*()); }; TEST_F(ChangeRecordTest, ChangeRecordToValue) { @@ -88,7 +88,7 @@ TEST_F(ChangeRecordTest, ChangeRecordToValue) { record.id = kTestId; record.specifics = old_specifics; record.extra.reset(new StrictMock<MockExtraChangeRecordData>()); - scoped_ptr<DictionaryValue> value(record.ToValue()); + scoped_ptr<base::DictionaryValue> value(record.ToValue()); CheckChangeRecordValue(record, *value); } @@ -99,7 +99,7 @@ TEST_F(ChangeRecordTest, ChangeRecordToValue) { record.id = kTestId; record.specifics = old_specifics; record.extra.reset(new StrictMock<MockExtraChangeRecordData>()); - scoped_ptr<DictionaryValue> value(record.ToValue()); + scoped_ptr<base::DictionaryValue> value(record.ToValue()); CheckChangeRecordValue(record, *value); } @@ -109,7 +109,7 @@ TEST_F(ChangeRecordTest, ChangeRecordToValue) { record.action = ChangeRecord::ACTION_DELETE; record.id = kTestId; record.specifics = old_specifics; - scoped_ptr<DictionaryValue> value(record.ToValue()); + scoped_ptr<base::DictionaryValue> value(record.ToValue()); CheckChangeRecordValue(record, *value); } @@ -120,15 +120,15 @@ TEST_F(ChangeRecordTest, ChangeRecordToValue) { record.id = kTestId; record.specifics = old_specifics; - DictionaryValue extra_value; + base::DictionaryValue extra_value; extra_value.SetString("foo", "bar"); scoped_ptr<StrictMock<MockExtraChangeRecordData> > extra( new StrictMock<MockExtraChangeRecordData>()); EXPECT_CALL(*extra, ToValue()).Times(2).WillRepeatedly( - Invoke(&extra_value, &DictionaryValue::DeepCopy)); + Invoke(&extra_value, &base::DictionaryValue::DeepCopy)); record.extra.reset(extra.release()); - scoped_ptr<DictionaryValue> value(record.ToValue()); + scoped_ptr<base::DictionaryValue> value(record.ToValue()); CheckChangeRecordValue(record, *value); } } diff --git a/sync/internal_api/public/engine/model_safe_worker.cc b/sync/internal_api/public/engine/model_safe_worker.cc index a4d142b..44e0a24 100644 --- a/sync/internal_api/public/engine/model_safe_worker.cc +++ b/sync/internal_api/public/engine/model_safe_worker.cc @@ -23,7 +23,8 @@ base::DictionaryValue* ModelSafeRoutingInfoToValue( std::string ModelSafeRoutingInfoToString( const ModelSafeRoutingInfo& routing_info) { - scoped_ptr<DictionaryValue> dict(ModelSafeRoutingInfoToValue(routing_info)); + scoped_ptr<base::DictionaryValue> dict( + ModelSafeRoutingInfoToValue(routing_info)); std::string json; base::JSONWriter::Write(dict.get(), &json); return json; diff --git a/sync/internal_api/public/engine/model_safe_worker_unittest.cc b/sync/internal_api/public/engine/model_safe_worker_unittest.cc index f879109..acddb7a7 100644 --- a/sync/internal_api/public/engine/model_safe_worker_unittest.cc +++ b/sync/internal_api/public/engine/model_safe_worker_unittest.cc @@ -19,11 +19,11 @@ TEST_F(ModelSafeWorkerTest, ModelSafeRoutingInfoToValue) { routing_info[BOOKMARKS] = GROUP_PASSIVE; routing_info[NIGORI] = GROUP_UI; routing_info[PREFERENCES] = GROUP_DB; - DictionaryValue expected_value; + base::DictionaryValue expected_value; expected_value.SetString("Bookmarks", "GROUP_PASSIVE"); expected_value.SetString("Encryption keys", "GROUP_UI"); expected_value.SetString("Preferences", "GROUP_DB"); - scoped_ptr<DictionaryValue> value( + scoped_ptr<base::DictionaryValue> value( ModelSafeRoutingInfoToValue(routing_info)); EXPECT_TRUE(value->Equals(&expected_value)); } diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.cc b/sync/internal_api/public/sessions/sync_session_snapshot.cc index 8c0c2b9..03da223 100644 --- a/sync/internal_api/public/sessions/sync_session_snapshot.cc +++ b/sync/internal_api/public/sessions/sync_session_snapshot.cc @@ -53,8 +53,8 @@ SyncSessionSnapshot::SyncSessionSnapshot( SyncSessionSnapshot::~SyncSessionSnapshot() {} -DictionaryValue* SyncSessionSnapshot::ToValue() const { - scoped_ptr<DictionaryValue> value(new DictionaryValue()); +base::DictionaryValue* SyncSessionSnapshot::ToValue() const { + scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); value->SetInteger("numSuccessfulCommits", model_neutral_state_.num_successful_commits); value->SetInteger("numSuccessfulBookmarkCommits", @@ -86,9 +86,10 @@ DictionaryValue* SyncSessionSnapshot::ToValue() const { value->Set("source", source_.ToValue()); value->SetBoolean("notificationsEnabled", notifications_enabled_); - scoped_ptr<DictionaryValue> counter_entries(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> counter_entries( + new base::DictionaryValue()); for (int i = FIRST_REAL_MODEL_TYPE; i < MODEL_TYPE_COUNT; i++) { - scoped_ptr<DictionaryValue> type_entries(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> type_entries(new base::DictionaryValue()); type_entries->SetInteger("numEntries", num_entries_by_type_[i]); type_entries->SetInteger("numToDeleteEntries", num_to_delete_entries_by_type_[i]); @@ -101,7 +102,7 @@ DictionaryValue* SyncSessionSnapshot::ToValue() const { } std::string SyncSessionSnapshot::ToString() const { - scoped_ptr<DictionaryValue> value(ToValue()); + scoped_ptr<base::DictionaryValue> value(ToValue()); std::string json; base::JSONWriter::WriteWithOptions(value.get(), base::JSONWriter::OPTIONS_PRETTY_PRINT, diff --git a/sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc b/sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc index 1d9f198..36056e3 100644 --- a/sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc +++ b/sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc @@ -36,7 +36,7 @@ TEST_F(SyncSessionSnapshotTest, SyncSessionSnapshotToValue) { ProgressMarkerMap download_progress_markers; download_progress_markers[BOOKMARKS] = "test"; download_progress_markers[APPS] = "apps"; - scoped_ptr<DictionaryValue> expected_download_progress_markers_value( + scoped_ptr<base::DictionaryValue> expected_download_progress_markers_value( ProgressMarkerMapToValue(download_progress_markers)); const bool kIsSilenced = true; @@ -45,7 +45,7 @@ TEST_F(SyncSessionSnapshotTest, SyncSessionSnapshotToValue) { const int kNumServerConflicts = 1057; SyncSourceInfo source; - scoped_ptr<DictionaryValue> expected_source_value(source.ToValue()); + scoped_ptr<base::DictionaryValue> expected_source_value(source.ToValue()); SyncSessionSnapshot snapshot(model_neutral, download_progress_markers, @@ -59,7 +59,7 @@ TEST_F(SyncSessionSnapshotTest, SyncSessionSnapshotToValue) { base::Time::Now(), std::vector<int>(MODEL_TYPE_COUNT,0), std::vector<int>(MODEL_TYPE_COUNT, 0)); - scoped_ptr<DictionaryValue> value(snapshot.ToValue()); + scoped_ptr<base::DictionaryValue> value(snapshot.ToValue()); EXPECT_EQ(17u, value->size()); ExpectDictIntegerValue(model_neutral.num_successful_commits, *value, "numSuccessfulCommits"); diff --git a/sync/internal_api/public/sessions/sync_source_info.cc b/sync/internal_api/public/sessions/sync_source_info.cc index c3b08d1..5c05de6 100644 --- a/sync/internal_api/public/sessions/sync_source_info.cc +++ b/sync/internal_api/public/sessions/sync_source_info.cc @@ -23,8 +23,8 @@ SyncSourceInfo::SyncSourceInfo( SyncSourceInfo::~SyncSourceInfo() {} -DictionaryValue* SyncSourceInfo::ToValue() const { - DictionaryValue* value = new DictionaryValue(); +base::DictionaryValue* SyncSourceInfo::ToValue() const { + base::DictionaryValue* value = new base::DictionaryValue(); value->SetString("updatesSource", GetUpdatesSourceString(updates_source)); value->Set("types", ModelTypeInvalidationMapToValue(types)); diff --git a/sync/internal_api/public/sessions/sync_source_info_unittest.cc b/sync/internal_api/public/sessions/sync_source_info_unittest.cc index 8769e8e..cbdecf17 100644 --- a/sync/internal_api/public/sessions/sync_source_info_unittest.cc +++ b/sync/internal_api/public/sessions/sync_source_info_unittest.cc @@ -26,12 +26,12 @@ TEST_F(SyncSourceInfoTest, SyncSourceInfoToValue) { ModelTypeInvalidationMap types; types[PREFERENCES].payload = "preferencespayload"; types[EXTENSIONS].payload = ""; - scoped_ptr<DictionaryValue> expected_types_value( + scoped_ptr<base::DictionaryValue> expected_types_value( ModelTypeInvalidationMapToValue(types)); SyncSourceInfo source_info(updates_source, types); - scoped_ptr<DictionaryValue> value(source_info.ToValue()); + scoped_ptr<base::DictionaryValue> value(source_info.ToValue()); EXPECT_EQ(2u, value->size()); ExpectDictStringValue("PERIODIC", *value, "updatesSource"); ExpectDictDictionaryValue(*expected_types_value, *value, "types"); diff --git a/sync/internal_api/sync_manager_impl.h b/sync/internal_api/sync_manager_impl.h index a916b30..12636fe 100644 --- a/sync/internal_api/sync_manager_impl.h +++ b/sync/internal_api/sync_manager_impl.h @@ -212,7 +212,7 @@ class SYNC_EXPORT_PRIVATE SyncManagerImpl : std::string payload; // Returned pointer owned by the caller. - DictionaryValue* ToValue() const; + base::DictionaryValue* ToValue() const; }; base::TimeDelta GetNudgeDelayTimeDelta(const ModelType& model_type); @@ -279,7 +279,7 @@ class SYNC_EXPORT_PRIVATE SyncManagerImpl : const std::string& name, UnboundJsMessageHandler unbound_message_handler); // Returned pointer is owned by the caller. - static DictionaryValue* NotificationInfoToValue( + static base::DictionaryValue* NotificationInfoToValue( const NotificationInfoMap& notification_info); static std::string NotificationInfoToString( diff --git a/sync/js/js_arg_list.cc b/sync/js/js_arg_list.cc index 8eec0aa..e3317e5 100644 --- a/sync/js/js_arg_list.cc +++ b/sync/js/js_arg_list.cc @@ -10,11 +10,11 @@ namespace syncer { JsArgList::JsArgList() {} -JsArgList::JsArgList(ListValue* args) : args_(args) {} +JsArgList::JsArgList(base::ListValue* args) : args_(args) {} JsArgList::~JsArgList() {} -const ListValue& JsArgList::Get() const { +const base::ListValue& JsArgList::Get() const { return args_.Get(); } diff --git a/sync/js/js_arg_list.h b/sync/js/js_arg_list.h index 72793e9..34a0cf6 100644 --- a/sync/js/js_arg_list.h +++ b/sync/js/js_arg_list.h @@ -23,18 +23,18 @@ class SYNC_EXPORT JsArgList { JsArgList(); // Takes over the data in |args|, leaving |args| empty. - explicit JsArgList(ListValue* args); + explicit JsArgList(base::ListValue* args); ~JsArgList(); - const ListValue& Get() const; + const base::ListValue& Get() const; std::string ToString() const; // Copy constructor and assignment operator welcome. private: - typedef Immutable<ListValue, HasSwapMemFnByPtr<ListValue> > + typedef Immutable<base::ListValue, HasSwapMemFnByPtr<base::ListValue> > ImmutableListValue; ImmutableListValue args_; }; diff --git a/sync/js/js_event_details.cc b/sync/js/js_event_details.cc index 16e4df7..0517b39 100644 --- a/sync/js/js_event_details.cc +++ b/sync/js/js_event_details.cc @@ -10,11 +10,12 @@ namespace syncer { JsEventDetails::JsEventDetails() {} -JsEventDetails::JsEventDetails(DictionaryValue* details) : details_(details) {} +JsEventDetails::JsEventDetails(base::DictionaryValue* details) + : details_(details) {} JsEventDetails::~JsEventDetails() {} -const DictionaryValue& JsEventDetails::Get() const { +const base::DictionaryValue& JsEventDetails::Get() const { return details_.Get(); } diff --git a/sync/js/js_event_details.h b/sync/js/js_event_details.h index 9ca36db..ae970cc 100644 --- a/sync/js/js_event_details.h +++ b/sync/js/js_event_details.h @@ -23,18 +23,19 @@ class SYNC_EXPORT JsEventDetails { JsEventDetails(); // Takes over the data in |details|, leaving |details| empty. - explicit JsEventDetails(DictionaryValue* details); + explicit JsEventDetails(base::DictionaryValue* details); ~JsEventDetails(); - const DictionaryValue& Get() const; + const base::DictionaryValue& Get() const; std::string ToString() const; // Copy constructor and assignment operator welcome. private: - typedef Immutable<DictionaryValue, HasSwapMemFnByPtr<DictionaryValue> > + typedef Immutable<base::DictionaryValue, + HasSwapMemFnByPtr<base::DictionaryValue> > ImmutableDictionaryValue; ImmutableDictionaryValue details_; diff --git a/sync/js/js_event_details_unittest.cc b/sync/js/js_event_details_unittest.cc index 563def7..d93d521 100644 --- a/sync/js/js_event_details_unittest.cc +++ b/sync/js/js_event_details_unittest.cc @@ -19,11 +19,11 @@ TEST_F(JsEventDetailsTest, EmptyList) { } TEST_F(JsEventDetailsTest, FromDictionary) { - DictionaryValue dict; + base::DictionaryValue dict; dict.SetString("foo", "bar"); - dict.Set("baz", new ListValue()); + dict.Set("baz", new base::ListValue()); - scoped_ptr<DictionaryValue> dict_copy(dict.DeepCopy()); + scoped_ptr<base::DictionaryValue> dict_copy(dict.DeepCopy()); JsEventDetails details(&dict); diff --git a/sync/js/js_test_util.cc b/sync/js/js_test_util.cc index 6d9679f..331efcc 100644 --- a/sync/js/js_test_util.cc +++ b/sync/js/js_test_util.cc @@ -88,8 +88,8 @@ class HasDetailsMatcher } ::testing::Matcher<const JsArgList&> HasArgsAsList( - const ListValue& expected_args) { - scoped_ptr<ListValue> expected_args_copy(expected_args.DeepCopy()); + const base::ListValue& expected_args) { + scoped_ptr<base::ListValue> expected_args_copy(expected_args.DeepCopy()); return HasArgs(JsArgList(expected_args_copy.get())); } @@ -99,8 +99,8 @@ class HasDetailsMatcher } ::testing::Matcher<const JsEventDetails&> HasDetailsAsDictionary( - const DictionaryValue& expected_details) { - scoped_ptr<DictionaryValue> expected_details_copy( + const base::DictionaryValue& expected_details) { + scoped_ptr<base::DictionaryValue> expected_details_copy( expected_details.DeepCopy()); return HasDetails(JsEventDetails(expected_details_copy.get())); } diff --git a/sync/notifier/object_id_invalidation_map.cc b/sync/notifier/object_id_invalidation_map.cc index 5fa253e..47b08e6 100644 --- a/sync/notifier/object_id_invalidation_map.cc +++ b/sync/notifier/object_id_invalidation_map.cc @@ -56,10 +56,10 @@ bool ObjectIdInvalidationMapEquals( scoped_ptr<base::ListValue> ObjectIdInvalidationMapToValue( const ObjectIdInvalidationMap& invalidation_map) { - scoped_ptr<ListValue> value(new ListValue()); + scoped_ptr<base::ListValue> value(new base::ListValue()); for (ObjectIdInvalidationMap::const_iterator it = invalidation_map.begin(); it != invalidation_map.end(); ++it) { - DictionaryValue* entry = new DictionaryValue(); + base::DictionaryValue* entry = new base::DictionaryValue(); entry->Set("objectId", ObjectIdToValue(it->first).release()); entry->Set("state", it->second.ToValue().release()); value->Append(entry); diff --git a/sync/notifier/p2p_invalidator.cc b/sync/notifier/p2p_invalidator.cc index 7825757..8b54c04 100644 --- a/sync/notifier/p2p_invalidator.cc +++ b/sync/notifier/p2p_invalidator.cc @@ -100,7 +100,7 @@ bool P2PNotificationData::Equals(const P2PNotificationData& other) const { } std::string P2PNotificationData::ToString() const { - scoped_ptr<DictionaryValue> dict(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); dict->SetString(kSenderIdKey, sender_id_); dict->SetString(kNotificationTypeKey, P2PNotificationTargetToString(target_)); @@ -112,7 +112,7 @@ std::string P2PNotificationData::ToString() const { } bool P2PNotificationData::ResetFromString(const std::string& str) { - scoped_ptr<Value> data_value(base::JSONReader::Read(str)); + scoped_ptr<base::Value> data_value(base::JSONReader::Read(str)); const base::DictionaryValue* data_dict = NULL; if (!data_value.get() || !data_value->GetAsDictionary(&data_dict)) { LOG(WARNING) << "Could not parse " << str << " as a dictionary"; diff --git a/sync/protocol/proto_value_conversions.cc b/sync/protocol/proto_value_conversions.cc index 39473a7..1b09864 100644 --- a/sync/protocol/proto_value_conversions.cc +++ b/sync/protocol/proto_value_conversions.cc @@ -335,7 +335,7 @@ base::DictionaryValue* DictionarySpecificsToValue( namespace { -DictionaryValue* FaviconSyncFlagsToValue( +base::DictionaryValue* FaviconSyncFlagsToValue( const sync_pb::FaviconSyncFlags& proto) { base::DictionaryValue* value = new base::DictionaryValue(); SET_BOOL(enabled); @@ -378,9 +378,9 @@ base::DictionaryValue* ExtensionSpecificsToValue( } namespace { -DictionaryValue* FaviconDataToValue( +base::DictionaryValue* FaviconDataToValue( const sync_pb::FaviconData& proto) { - DictionaryValue* value = new DictionaryValue(); + base::DictionaryValue* value = new base::DictionaryValue(); SET_BYTES(favicon); SET_INT32(width); SET_INT32(height); @@ -388,9 +388,9 @@ DictionaryValue* FaviconDataToValue( } } // namespace -DictionaryValue* FaviconImageSpecificsToValue( +base::DictionaryValue* FaviconImageSpecificsToValue( const sync_pb::FaviconImageSpecifics& proto) { - DictionaryValue* value = new DictionaryValue(); + base::DictionaryValue* value = new base::DictionaryValue(); SET_STR(favicon_url); SET(favicon_web, FaviconDataToValue); SET(favicon_web_32, FaviconDataToValue); @@ -399,9 +399,9 @@ DictionaryValue* FaviconImageSpecificsToValue( return value; } -DictionaryValue* FaviconTrackingSpecificsToValue( +base::DictionaryValue* FaviconTrackingSpecificsToValue( const sync_pb::FaviconTrackingSpecifics& proto) { - DictionaryValue* value = new DictionaryValue(); + base::DictionaryValue* value = new base::DictionaryValue(); SET_STR(favicon_url); SET_INT64(last_visit_time_ms) SET_BOOL(is_bookmarked); @@ -577,10 +577,10 @@ base::DictionaryValue* EntitySpecificsToValue( namespace { -StringValue* UniquePositionToStringValue( +base::StringValue* UniquePositionToStringValue( const sync_pb::UniquePosition& proto) { UniquePosition pos = UniquePosition::FromProto(proto); - return new StringValue(pos.ToDebugString()); + return new base::StringValue(pos.ToDebugString()); } base::DictionaryValue* SyncEntityToValue(const sync_pb::SyncEntity& proto, diff --git a/sync/protocol/proto_value_conversions_unittest.cc b/sync/protocol/proto_value_conversions_unittest.cc index b33366f..79d4886 100644 --- a/sync/protocol/proto_value_conversions_unittest.cc +++ b/sync/protocol/proto_value_conversions_unittest.cc @@ -42,9 +42,9 @@ class ProtoValueConversionsTest : public testing::Test { protected: template <class T> void TestSpecificsToValue( - DictionaryValue* (*specifics_to_value)(const T&)) { + base::DictionaryValue* (*specifics_to_value)(const T&)) { const T& specifics(T::default_instance()); - scoped_ptr<DictionaryValue> value(specifics_to_value(specifics)); + scoped_ptr<base::DictionaryValue> value(specifics_to_value(specifics)); // We can't do much but make sure that this doesn't crash. } }; @@ -85,7 +85,8 @@ TEST_F(ProtoValueConversionsTest, TabNavigationToValue) { TEST_F(ProtoValueConversionsTest, PasswordSpecificsData) { sync_pb::PasswordSpecificsData specifics; specifics.set_password_value("secret"); - scoped_ptr<DictionaryValue> value(PasswordSpecificsDataToValue(specifics)); + scoped_ptr<base::DictionaryValue> value( + PasswordSpecificsDataToValue(specifics)); EXPECT_FALSE(value->empty()); std::string password_value; EXPECT_TRUE(value->GetString("password_value", &password_value)); @@ -100,7 +101,7 @@ TEST_F(ProtoValueConversionsTest, AppSettingSpecificsToValue) { sync_pb::AppNotificationSettings specifics; specifics.set_disabled(true); specifics.set_oauth_client_id("some_id_value"); - scoped_ptr<DictionaryValue> value(AppSettingsToValue(specifics)); + scoped_ptr<base::DictionaryValue> value(AppSettingsToValue(specifics)); EXPECT_FALSE(value->empty()); bool disabled_value = false; std::string oauth_client_id_value; @@ -132,7 +133,7 @@ TEST_F(ProtoValueConversionsTest, BookmarkSpecificsData) { sync_pb::BookmarkSpecifics specifics; specifics.set_creation_time_us(creation_time.ToInternalValue()); specifics.set_icon_url(icon_url); - scoped_ptr<DictionaryValue> value(BookmarkSpecificsToValue(specifics)); + scoped_ptr<base::DictionaryValue> value(BookmarkSpecificsToValue(specifics)); EXPECT_FALSE(value->empty()); std::string encoded_time; EXPECT_TRUE(value->GetString("creation_time_us", &encoded_time)); @@ -254,7 +255,7 @@ TEST_F(ProtoValueConversionsTest, EntitySpecificsToValue) { #undef SET_FIELD - scoped_ptr<DictionaryValue> value(EntitySpecificsToValue(specifics)); + scoped_ptr<base::DictionaryValue> value(EntitySpecificsToValue(specifics)); EXPECT_EQ(MODEL_TYPE_COUNT - FIRST_REAL_MODEL_TYPE - (LAST_PROXY_TYPE - FIRST_PROXY_TYPE + 1), static_cast<int>(value->size())); @@ -263,11 +264,11 @@ TEST_F(ProtoValueConversionsTest, EntitySpecificsToValue) { namespace { // Returns whether the given value has specifics under the entries in the given // path. -bool ValueHasSpecifics(const DictionaryValue& value, +bool ValueHasSpecifics(const base::DictionaryValue& value, const std::string& path) { - const ListValue* entities_list = NULL; - const DictionaryValue* entry_dictionary = NULL; - const DictionaryValue* specifics_dictionary = NULL; + const base::ListValue* entities_list = NULL; + const base::DictionaryValue* entry_dictionary = NULL; + const base::DictionaryValue* specifics_dictionary = NULL; if (!value.GetList(path, &entities_list)) return false; @@ -288,13 +289,13 @@ TEST_F(ProtoValueConversionsTest, ClientToServerMessageToValue) { sync_pb::SyncEntity* entity = commit_message->add_entries(); entity->mutable_specifics(); - scoped_ptr<DictionaryValue> value_with_specifics( + scoped_ptr<base::DictionaryValue> value_with_specifics( ClientToServerMessageToValue(message, true /* include_specifics */)); EXPECT_FALSE(value_with_specifics->empty()); EXPECT_TRUE(ValueHasSpecifics(*(value_with_specifics.get()), "commit.entries")); - scoped_ptr<DictionaryValue> value_without_specifics( + scoped_ptr<base::DictionaryValue> value_without_specifics( ClientToServerMessageToValue(message, false /* include_specifics */)); EXPECT_FALSE(value_without_specifics->empty()); EXPECT_FALSE(ValueHasSpecifics(*(value_without_specifics.get()), @@ -309,13 +310,13 @@ TEST_F(ProtoValueConversionsTest, ClientToServerResponseToValue) { sync_pb::SyncEntity* entity = response->add_entries(); entity->mutable_specifics(); - scoped_ptr<DictionaryValue> value_with_specifics( + scoped_ptr<base::DictionaryValue> value_with_specifics( ClientToServerResponseToValue(message, true /* include_specifics */)); EXPECT_FALSE(value_with_specifics->empty()); EXPECT_TRUE(ValueHasSpecifics(*(value_with_specifics.get()), "get_updates.entries")); - scoped_ptr<DictionaryValue> value_without_specifics( + scoped_ptr<base::DictionaryValue> value_without_specifics( ClientToServerResponseToValue(message, false /* include_specifics */)); EXPECT_FALSE(value_without_specifics->empty()); EXPECT_FALSE(ValueHasSpecifics(*(value_without_specifics.get()), diff --git a/sync/protocol/sync_protocol_error.cc b/sync/protocol/sync_protocol_error.cc index ce55bcd..cd22e9a 100644 --- a/sync/protocol/sync_protocol_error.cc +++ b/sync/protocol/sync_protocol_error.cc @@ -51,8 +51,8 @@ SyncProtocolError::SyncProtocolError() SyncProtocolError::~SyncProtocolError() { } -DictionaryValue* SyncProtocolError::ToValue() const { - DictionaryValue* value = new DictionaryValue(); +base::DictionaryValue* SyncProtocolError::ToValue() const { + base::DictionaryValue* value = new base::DictionaryValue(); value->SetString("ErrorType", GetSyncErrorTypeString(error_type)); value->SetString("ErrorDescription", error_description); diff --git a/sync/protocol/sync_protocol_error.h b/sync/protocol/sync_protocol_error.h index 3fe52ba..be9232d 100644 --- a/sync/protocol/sync_protocol_error.h +++ b/sync/protocol/sync_protocol_error.h @@ -78,7 +78,7 @@ struct SYNC_EXPORT SyncProtocolError { ModelTypeSet error_data_types; SyncProtocolError(); ~SyncProtocolError(); - DictionaryValue* ToValue() const; + base::DictionaryValue* ToValue() const; }; SYNC_EXPORT const char* GetSyncErrorTypeString(SyncProtocolErrorType type); diff --git a/sync/syncable/entry.cc b/sync/syncable/entry.cc index f888392..7739098 100644 --- a/sync/syncable/entry.cc +++ b/sync/syncable/entry.cc @@ -42,8 +42,8 @@ Directory* Entry::dir() const { return basetrans_->directory(); } -DictionaryValue* Entry::ToValue(Cryptographer* cryptographer) const { - DictionaryValue* entry_info = new DictionaryValue(); +base::DictionaryValue* Entry::ToValue(Cryptographer* cryptographer) const { + base::DictionaryValue* entry_info = new base::DictionaryValue(); entry_info->SetBoolean("good", good()); if (good()) { entry_info->Set("kernel", kernel_->ToValue(cryptographer)); diff --git a/sync/syncable/entry_kernel.cc b/sync/syncable/entry_kernel.cc index b65eaa2..d872695 100644 --- a/sync/syncable/entry_kernel.cc +++ b/sync/syncable/entry_kernel.cc @@ -125,8 +125,8 @@ base::StringValue* StringToValue(const std::string& str) { return new base::StringValue(str); } -StringValue* UniquePositionToValue(const UniquePosition& pos) { - return Value::CreateStringValue(pos.ToDebugString()); +base::StringValue* UniquePositionToValue(const UniquePosition& pos) { + return base::Value::CreateStringValue(pos.ToDebugString()); } } // namespace diff --git a/sync/syncable/model_type_unittest.cc b/sync/syncable/model_type_unittest.cc index 5af6dbc..737aea3 100644 --- a/sync/syncable/model_type_unittest.cc +++ b/sync/syncable/model_type_unittest.cc @@ -39,7 +39,7 @@ TEST_F(ModelTypeTest, ModelTypeFromValue) { TEST_F(ModelTypeTest, ModelTypeSetToValue) { const ModelTypeSet model_types(BOOKMARKS, APPS); - scoped_ptr<ListValue> value(ModelTypeSetToValue(model_types)); + scoped_ptr<base::ListValue> value(ModelTypeSetToValue(model_types)); EXPECT_EQ(2u, value->GetSize()); std::string types[2]; EXPECT_TRUE(value->GetString(0, &types[0])); @@ -51,7 +51,7 @@ TEST_F(ModelTypeTest, ModelTypeSetToValue) { TEST_F(ModelTypeTest, ModelTypeSetFromValue) { // Try empty set first. ModelTypeSet model_types; - scoped_ptr<ListValue> value(ModelTypeSetToValue(model_types)); + scoped_ptr<base::ListValue> value(ModelTypeSetToValue(model_types)); EXPECT_TRUE(model_types.Equals(ModelTypeSetFromValue(*value))); // Now try with a few random types. diff --git a/sync/syncable/nigori_util.cc b/sync/syncable/nigori_util.cc index 3e456dd..3da7917 100644 --- a/sync/syncable/nigori_util.cc +++ b/sync/syncable/nigori_util.cc @@ -172,7 +172,7 @@ bool UpdateEntryWithEncryption( } else { // Encrypt new_specifics into generated_specifics. if (VLOG_IS_ON(2)) { - scoped_ptr<DictionaryValue> value(entry->ToValue(NULL)); + scoped_ptr<base::DictionaryValue> value(entry->ToValue(NULL)); std::string info; base::JSONWriter::WriteWithOptions(value.get(), base::JSONWriter::OPTIONS_PRETTY_PRINT, diff --git a/sync/syncable/syncable_unittest.cc b/sync/syncable/syncable_unittest.cc index 3ceb080..0423c41 100644 --- a/sync/syncable/syncable_unittest.cc +++ b/sync/syncable/syncable_unittest.cc @@ -50,7 +50,7 @@ class SyncableKernelTest : public testing::Test {}; TEST_F(SyncableKernelTest, ToValue) { EntryKernel kernel; - scoped_ptr<DictionaryValue> value(kernel.ToValue(NULL)); + scoped_ptr<base::DictionaryValue> value(kernel.ToValue(NULL)); if (value) { // Not much to check without repeating the ToValue() code. EXPECT_TRUE(value->HasKey("isDirty")); @@ -392,7 +392,7 @@ TEST_F(SyncableGeneralTest, ToValue) { Entry e(&rtrans, GET_BY_ID, id); EXPECT_FALSE(e.good()); // Hasn't been written yet. - scoped_ptr<DictionaryValue> value(e.ToValue(NULL)); + scoped_ptr<base::DictionaryValue> value(e.ToValue(NULL)); ExpectDictBooleanValue(false, *value, "good"); EXPECT_EQ(1u, value->size()); } @@ -405,7 +405,7 @@ TEST_F(SyncableGeneralTest, ToValue) { me.Put(ID, id); me.Put(BASE_VERSION, 1); - scoped_ptr<DictionaryValue> value(me.ToValue(NULL)); + scoped_ptr<base::DictionaryValue> value(me.ToValue(NULL)); ExpectDictBooleanValue(true, *value, "good"); EXPECT_TRUE(value->HasKey("kernel")); ExpectDictStringValue("Bookmarks", *value, "modelType"); diff --git a/sync/test/accounts_client/test_accounts_client_unittest.cc b/sync/test/accounts_client/test_accounts_client_unittest.cc index ff405f6..c478cd4 100644 --- a/sync/test/accounts_client/test_accounts_client_unittest.cc +++ b/sync/test/accounts_client/test_accounts_client_unittest.cc @@ -61,7 +61,7 @@ TEST(TestAccountsClientTest, ClaimAccountSuccess) { usernames.push_back("foo2@gmail.com"); NoNetworkTestAccountsClient client(kServer, kAccountSpace, usernames); - DictionaryValue success_dict; + base::DictionaryValue success_dict; success_dict.Set("username", new StringValue(kUsername)); success_dict.Set("account_space", new StringValue(kAccountSpace)); success_dict.Set("session_id", new StringValue(kSessionId)); diff --git a/tools/json_schema_compiler/util.cc b/tools/json_schema_compiler/util.cc index 25f908c..a449509 100644 --- a/tools/json_schema_compiler/util.cc +++ b/tools/json_schema_compiler/util.cc @@ -9,23 +9,23 @@ namespace json_schema_compiler { namespace util { -bool GetItemFromList(const ListValue& from, int index, int* out) { +bool GetItemFromList(const base::ListValue& from, int index, int* out) { return from.GetInteger(index, out); } -bool GetItemFromList(const ListValue& from, int index, bool* out) { +bool GetItemFromList(const base::ListValue& from, int index, bool* out) { return from.GetBoolean(index, out); } -bool GetItemFromList(const ListValue& from, int index, double* out) { +bool GetItemFromList(const base::ListValue& from, int index, double* out) { return from.GetDouble(index, out); } -bool GetItemFromList(const ListValue& from, int index, std::string* out) { +bool GetItemFromList(const base::ListValue& from, int index, std::string* out) { return from.GetString(index, out); } -bool GetItemFromList(const ListValue& from, +bool GetItemFromList(const base::ListValue& from, int index, linked_ptr<base::Value>* out) { const base::Value* value = NULL; @@ -35,9 +35,9 @@ bool GetItemFromList(const ListValue& from, return true; } -bool GetItemFromList(const ListValue& from, int index, +bool GetItemFromList(const base::ListValue& from, int index, linked_ptr<base::DictionaryValue>* out) { - const DictionaryValue* dict = NULL; + const base::DictionaryValue* dict = NULL; if (!from.GetDictionary(index, &dict)) return false; *out = make_linked_ptr(dict->DeepCopy()); @@ -67,7 +67,7 @@ void AddItemToList(const linked_ptr<base::Value>& from, void AddItemToList(const linked_ptr<base::DictionaryValue>& from, base::ListValue* out) { - out->Append(static_cast<Value*>(from->DeepCopy())); + out->Append(static_cast<base::Value*>(from->DeepCopy())); } } // namespace api_util diff --git a/tools/json_schema_compiler/util.h b/tools/json_schema_compiler/util.h index 425487d..7957830 100644 --- a/tools/json_schema_compiler/util.h +++ b/tools/json_schema_compiler/util.h @@ -18,21 +18,23 @@ namespace util { // Creates a new item at |out| from |from|[|index|]. These are used by template // specializations of |Get(Optional)ArrayFromList|. -bool GetItemFromList(const ListValue& from, int index, int* out); -bool GetItemFromList(const ListValue& from, int index, bool* out); -bool GetItemFromList(const ListValue& from, int index, double* out); -bool GetItemFromList(const ListValue& from, int index, std::string* out); -bool GetItemFromList(const ListValue& from, +bool GetItemFromList(const base::ListValue& from, int index, int* out); +bool GetItemFromList(const base::ListValue& from, int index, bool* out); +bool GetItemFromList(const base::ListValue& from, int index, double* out); +bool GetItemFromList(const base::ListValue& from, int index, std::string* out); +bool GetItemFromList(const base::ListValue& from, int index, linked_ptr<base::Value>* out); -bool GetItemFromList(const ListValue& from, +bool GetItemFromList(const base::ListValue& from, int index, linked_ptr<base::DictionaryValue>* out); // This template is used for types generated by tools/json_schema_compiler. template<class T> -bool GetItemFromList(const ListValue& from, int index, linked_ptr<T>* out) { - const DictionaryValue* dict; +bool GetItemFromList(const base::ListValue& from, + int index, + linked_ptr<T>* out) { + const base::DictionaryValue* dict; if (!from.GetDictionary(index, &dict)) return false; scoped_ptr<T> obj(new T()); @@ -45,7 +47,7 @@ bool GetItemFromList(const ListValue& from, int index, linked_ptr<T>* out) { // This is used for getting an enum out of a ListValue, which will happen if an // array of enums is a parameter to a function. template<class T> -bool GetItemFromList(const ListValue& from, int index, T* out) { +bool GetItemFromList(const base::ListValue& from, int index, T* out) { int value; if (!from.GetInteger(index, &value)) return false; @@ -139,7 +141,7 @@ void AddItemToList(const linked_ptr<base::DictionaryValue>& from, // This template is used for types generated by tools/json_schema_compiler. template<class T> -void AddItemToList(const linked_ptr<T>& from, ListValue* out) { +void AddItemToList(const linked_ptr<T>& from, base::ListValue* out) { out->Append(from->ToValue().release()); } @@ -168,18 +170,18 @@ void PopulateListFromOptionalArray( } template <class T> -scoped_ptr<Value> CreateValueFromArray(const std::vector<T>& from) { +scoped_ptr<base::Value> CreateValueFromArray(const std::vector<T>& from) { base::ListValue* list = new base::ListValue(); PopulateListFromArray(from, list); - return scoped_ptr<Value>(list); + return scoped_ptr<base::Value>(list); } template <class T> -scoped_ptr<Value> CreateValueFromOptionalArray( +scoped_ptr<base::Value> CreateValueFromOptionalArray( const scoped_ptr<std::vector<T> >& from) { if (from.get()) return CreateValueFromArray(*from); - return scoped_ptr<Value>(); + return scoped_ptr<base::Value>(); } } // namespace util diff --git a/ui/webui/jstemplate_builder.cc b/ui/webui/jstemplate_builder.cc index a65d538..681afbc 100644 --- a/ui/webui/jstemplate_builder.cc +++ b/ui/webui/jstemplate_builder.cc @@ -33,7 +33,7 @@ UseVersion2::~UseVersion2() { } std::string GetTemplateHtml(const base::StringPiece& html_template, - const DictionaryValue* json, + const base::DictionaryValue* json, const base::StringPiece& template_id) { std::string output(html_template.data(), html_template.size()); AppendJsonHtml(json, &output); @@ -43,7 +43,7 @@ std::string GetTemplateHtml(const base::StringPiece& html_template, } std::string GetI18nTemplateHtml(const base::StringPiece& html_template, - const DictionaryValue* json) { + const base::DictionaryValue* json) { std::string output(html_template.data(), html_template.size()); AppendJsonHtml(json, &output); AppendI18nTemplateSourceHtml(&output); @@ -52,7 +52,7 @@ std::string GetI18nTemplateHtml(const base::StringPiece& html_template, } std::string GetTemplatesHtml(const base::StringPiece& html_template, - const DictionaryValue* json, + const base::DictionaryValue* json, const base::StringPiece& template_id) { std::string output(html_template.data(), html_template.size()); AppendI18nTemplateSourceHtml(&output); @@ -63,7 +63,7 @@ std::string GetTemplatesHtml(const base::StringPiece& html_template, return output; } -void AppendJsonHtml(const DictionaryValue* json, std::string* output) { +void AppendJsonHtml(const base::DictionaryValue* json, std::string* output) { std::string javascript_string; AppendJsonJS(json, &javascript_string); @@ -76,7 +76,7 @@ void AppendJsonHtml(const DictionaryValue* json, std::string* output) { output->append("</script>"); } -void AppendJsonJS(const DictionaryValue* json, std::string* output) { +void AppendJsonJS(const base::DictionaryValue* json, std::string* output) { // Convert the template data to a json string. DCHECK(json) << "must include json data structure"; diff --git a/ui/webui/web_ui_util.cc b/ui/webui/web_ui_util.cc index aeefcc5..4225514 100644 --- a/ui/webui/web_ui_util.cc +++ b/ui/webui/web_ui_util.cc @@ -58,7 +58,7 @@ std::string GetBitmapDataUrlFromResource(int res) { return str_url; } -WindowOpenDisposition GetDispositionFromClick(const ListValue* args, +WindowOpenDisposition GetDispositionFromClick(const base::ListValue* args, int start_index) { double button = 0.0; bool alt_key = false; @@ -127,7 +127,7 @@ void ParsePathAndScale(const GURL& url, } // static -void SetFontAndTextDirection(DictionaryValue* localized_strings) { +void SetFontAndTextDirection(base::DictionaryValue* localized_strings) { int web_font_family_id = IDS_WEB_FONT_FAMILY; int web_font_size_id = IDS_WEB_FONT_SIZE; #if defined(OS_WIN) diff --git a/ui/webui/web_ui_util.h b/ui/webui/web_ui_util.h index c1e3635..a3d297c 100644 --- a/ui/webui/web_ui_util.h +++ b/ui/webui/web_ui_util.h @@ -33,8 +33,9 @@ UI_EXPORT std::string GetBitmapDataUrlFromResource(int resource_id); // Extracts a disposition from click event arguments. |args| should contain // an integer button and booleans alt key, ctrl key, meta key, and shift key // (in that order), starting at |start_index|. -UI_EXPORT WindowOpenDisposition GetDispositionFromClick(const ListValue* args, - int start_index); +UI_EXPORT WindowOpenDisposition GetDispositionFromClick( + const base::ListValue* args, + int start_index); // Given a scale factor such as "1x", "2x" or "1.99x", sets |scale_factor| to // the closest ScaleFactor enum value for this scale factor. If string can not |