diff options
Diffstat (limited to 'chrome/browser/extensions/api')
57 files changed, 252 insertions, 246 deletions
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 7fa2492..97b52f2 100644 --- a/chrome/browser/extensions/api/app_window/app_window_api.cc +++ b/chrome/browser/extensions/api/app_window/app_window_api.cc @@ -164,7 +164,7 @@ bool AppWindowCreateFunction::RunImpl() { window->GetBaseWindow()->Show(); base::DictionaryValue* result = new base::DictionaryValue; - result->Set("viewId", base::Value::CreateIntegerValue(view_id)); + result->Set("viewId", new base::FundamentalValue(view_id)); SetCreateResultFromShellWindow(window, result); result->SetBoolean("existingWindow", true); result->SetBoolean("injectTitlebar", false); @@ -311,10 +311,10 @@ bool AppWindowCreateFunction::RunImpl() { view_id = created_view->GetRoutingID(); base::DictionaryValue* result = new base::DictionaryValue; - result->Set("viewId", base::Value::CreateIntegerValue(view_id)); + result->Set("viewId", new base::FundamentalValue(view_id)); result->Set("injectTitlebar", - base::Value::CreateBooleanValue(inject_html_titlebar)); - result->Set("id", base::Value::CreateStringValue(shell_window->window_key())); + new base::FundamentalValue(inject_html_titlebar)); + result->Set("id", new base::StringValue(shell_window->window_key())); SetCreateResultFromShellWindow(shell_window, result); SetResult(result); diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_api.cc b/chrome/browser/extensions/api/bluetooth/bluetooth_api.cc index 0055d9b0..1d71950 100644 --- a/chrome/browser/extensions/api/bluetooth/bluetooth_api.cc +++ b/chrome/browser/extensions/api/bluetooth/bluetooth_api.cc @@ -505,7 +505,7 @@ void BluetoothWriteFunction::Work() { success_ = socket_->Send(drainable_io_buffer.get()); if (success_) { if (drainable_io_buffer->BytesConsumed() > 0) - SetResult(base::Value::CreateIntegerValue( + SetResult(new base::FundamentalValue( drainable_io_buffer->BytesConsumed())); else results_.reset(); diff --git a/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_api.cc b/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_api.cc index f4025f2..e44a17d 100644 --- a/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_api.cc +++ b/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_api.cc @@ -71,7 +71,7 @@ CloudPrintPrivateGetHostNameFunction::~CloudPrintPrivateGetHostNameFunction() { } bool CloudPrintPrivateGetHostNameFunction::RunImpl() { - SetResult(Value::CreateStringValue( + SetResult(new base::StringValue( CloudPrintTestsDelegate::instance() ? CloudPrintTestsDelegate::instance()->GetHostName() : net::GetHostName())); @@ -115,7 +115,7 @@ CloudPrintPrivateGetClientIdFunction::~CloudPrintPrivateGetClientIdFunction() { } bool CloudPrintPrivateGetClientIdFunction::RunImpl() { - SetResult(Value::CreateStringValue( + SetResult(new base::StringValue( CloudPrintTestsDelegate::instance() ? CloudPrintTestsDelegate::instance()->GetClientId() : google_apis::GetOAuth2ClientID(google_apis::CLIENT_CLOUD_PRINT))); diff --git a/chrome/browser/extensions/api/commands/command_service.cc b/chrome/browser/extensions/api/commands/command_service.cc index 13c70e1..2978a1f 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, - base::Value::CreateBooleanValue(true)); + new base::FundamentalValue(true)); } bool InitialBindingsHaveBeenAssigned( diff --git a/chrome/browser/extensions/api/content_settings/content_settings_store.cc b/chrome/browser/extensions/api/content_settings/content_settings_store.cc index ff58296..3b0c008 100644 --- a/chrome/browser/extensions/api/content_settings/content_settings_store.cc +++ b/chrome/browser/extensions/api/content_settings/content_settings_store.cc @@ -105,7 +105,7 @@ void ContentSettingsStore::SetExtensionContentSetting( map->DeleteValue(primary_pattern, secondary_pattern, type, identifier); } else { map->SetValue(primary_pattern, secondary_pattern, type, identifier, - base::Value::CreateIntegerValue(setting)); + new base::FundamentalValue(setting)); } } diff --git a/chrome/browser/extensions/api/cookies/cookies_helpers.cc b/chrome/browser/extensions/api/cookies/cookies_helpers.cc index fc578e8..b68146b 100644 --- a/chrome/browser/extensions/api/cookies/cookies_helpers.cc +++ b/chrome/browser/extensions/api/cookies/cookies_helpers.cc @@ -151,7 +151,7 @@ void AppendToTabIdList(Browser* browser, base::ListValue* tab_ids) { DCHECK(tab_ids); TabStripModel* tab_strip = browser->tab_strip_model(); for (int i = 0; i < tab_strip->count(); ++i) { - tab_ids->Append(Value::CreateIntegerValue( + tab_ids->Append(new base::FundamentalValue( ExtensionTabUtil::GetTabId(tab_strip->GetWebContentsAt(i)))); } } @@ -206,4 +206,4 @@ bool MatchFilter::MatchesDomain(const std::string& domain) { } } // namespace cookies_helpers -} // namespace extension +} // namespace extensions diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc index 68123b9..07c1b1b 100644 --- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc +++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc @@ -37,7 +37,7 @@ TEST(WebRequestConditionAttributeTest, CreateConditionAttribute) { scoped_refptr<const WebRequestConditionAttribute> result; StringValue string_value("main_frame"); ListValue resource_types; - resource_types.Append(Value::CreateStringValue("main_frame")); + resource_types.Append(new base::StringValue("main_frame")); // Test wrong condition name passed. error.clear(); @@ -78,7 +78,7 @@ TEST(WebRequestConditionAttributeTest, ResourceType) { ListValue resource_types; // The 'sub_frame' value is chosen arbitrarily, so as the corresponding // ResourceType::Type is not 0, the default value. - resource_types.Append(Value::CreateStringValue("sub_frame")); + resource_types.Append(new base::StringValue("sub_frame")); scoped_refptr<const WebRequestConditionAttribute> attribute = WebRequestConditionAttribute::Create( @@ -125,7 +125,7 @@ TEST(WebRequestConditionAttributeTest, ContentType) { base::MessageLoop::current()->Run(); ListValue content_types; - content_types.Append(Value::CreateStringValue("text/plain")); + content_types.Append(new base::StringValue("text/plain")); scoped_refptr<const WebRequestConditionAttribute> attribute_include = WebRequestConditionAttribute::Create( keys::kContentTypeKey, &content_types, &error); @@ -149,7 +149,7 @@ TEST(WebRequestConditionAttributeTest, ContentType) { url_request.response_headers()))); content_types.Clear(); - content_types.Append(Value::CreateStringValue("something/invalid")); + content_types.Append(new base::StringValue("something/invalid")); scoped_refptr<const WebRequestConditionAttribute> attribute_unincluded = WebRequestConditionAttribute::Create( keys::kContentTypeKey, &content_types, &error); @@ -358,12 +358,12 @@ scoped_ptr<DictionaryValue> GetDictionaryFromArray( // Ignoring return value, we already verified the entry is there. dictionary->RemoveWithoutPathExpansion(*name, &entry_owned); list->Append(entry_owned.release()); - list->Append(Value::CreateStringValue(*value)); + list->Append(new base::StringValue(*value)); dictionary->SetWithoutPathExpansion(*name, list); break; case Value::TYPE_LIST: // Just append to the list. CHECK(entry->GetAsList(&list)); - list->Append(Value::CreateStringValue(*value)); + list->Append(new base::StringValue(*value)); break; default: NOTREACHED(); // We never put other Values here. 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 aa9bf22..2b34514 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 @@ -95,7 +95,7 @@ class WebRequestRulesRegistryTest : public testing::Test { // https://www.example.com and cancels it linked_ptr<RulesRegistry::Rule> CreateRule1() { base::ListValue* scheme_http = new base::ListValue(); - scheme_http->Append(Value::CreateStringValue("http")); + scheme_http->Append(new base::StringValue("http")); base::DictionaryValue* http_condition_dict = new base::DictionaryValue(); http_condition_dict->Set(keys2::kSchemesKey, scheme_http); http_condition_dict->SetString(keys2::kHostSuffixKey, "example.com"); @@ -105,7 +105,7 @@ class WebRequestRulesRegistryTest : public testing::Test { keys::kRequestMatcherType); base::ListValue* scheme_https = new base::ListValue(); - scheme_http->Append(Value::CreateStringValue("https")); + scheme_http->Append(new base::StringValue("https")); base::DictionaryValue* https_condition_dict = new base::DictionaryValue(); https_condition_dict->Set(keys2::kSchemesKey, scheme_https); https_condition_dict->SetString(keys2::kHostSuffixKey, "example.com"); 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 a7d8732..b12a16c 100644 --- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc +++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc @@ -250,7 +250,7 @@ bool DeveloperPrivateAutoUpdateFunction::RunImpl() { ExtensionUpdater* updater = GetExtensionUpdater(profile()); if (updater) updater->CheckNow(ExtensionUpdater::CheckParams()); - SetResult(Value::CreateBooleanValue(true)); + SetResult(new base::FundamentalValue(true)); return true; } @@ -1095,7 +1095,7 @@ void DeveloperPrivateLoadProjectFunction::GetUnpackedExtension( const Extension* extension = GetExtensionByPath(extensions, path); bool success = true; if (extension) { - SetResult(base::Value::CreateStringValue(extension->id())); + SetResult(new base::StringValue(extension->id())); } else { SetError("unable to load the project"); success = false; @@ -1154,7 +1154,7 @@ bool DeveloperPrivateChoosePathFunction::RunImpl() { void DeveloperPrivateChoosePathFunction::FileSelected( const base::FilePath& path) { - SetResult(base::Value::CreateStringValue( + SetResult(new base::StringValue( UTF16ToUTF8(path.LossyDisplayName()))); SendResponse(true); Release(); diff --git a/chrome/browser/extensions/api/dial/dial_api.cc b/chrome/browser/extensions/api/dial/dial_api.cc index 2a30d9a..02f6d82 100644 --- a/chrome/browser/extensions/api/dial/dial_api.cc +++ b/chrome/browser/extensions/api/dial/dial_api.cc @@ -167,7 +167,7 @@ bool DialDiscoverNowFunction::Respond() { if (!result_) error_ = kDialServiceError; - SetResult(base::Value::CreateBooleanValue(result_)); + SetResult(new base::FundamentalValue(result_)); return true; } diff --git a/chrome/browser/extensions/api/discovery/discovery_api_unittest.cc b/chrome/browser/extensions/api/discovery/discovery_api_unittest.cc index 223bc16..c01a226 100644 --- a/chrome/browser/extensions/api/discovery/discovery_api_unittest.cc +++ b/chrome/browser/extensions/api/discovery/discovery_api_unittest.cc @@ -58,7 +58,7 @@ std::string SuggestParamsToJSON(const std::string& link_url, std::string RemoveSuggestionParamsToJSON(const std::string& link_url) { std::string result; base::ListValue params; - params.Append(base::Value::CreateStringValue(link_url)); + params.Append(new base::StringValue(link_url)); base::JSONWriter::Write(¶ms, &result); return result; } diff --git a/chrome/browser/extensions/api/downloads/downloads_api.cc b/chrome/browser/extensions/api/downloads/downloads_api.cc index 9f7dc63..7cc8a48 100644 --- a/chrome/browser/extensions/api/downloads/downloads_api.cc +++ b/chrome/browser/extensions/api/downloads/downloads_api.cc @@ -1043,7 +1043,7 @@ void DownloadsDownloadFunction::OnStarted( VLOG(1) << __FUNCTION__ << " " << item << " " << error; if (item) { DCHECK_EQ(net::OK, error); - SetResult(base::Value::CreateIntegerValue(item->GetId())); + SetResult(new base::FundamentalValue(static_cast<int>(item->GetId()))); if (!creator_suggested_filename.empty()) { ExtensionDownloadsEventRouterData* data = ExtensionDownloadsEventRouterData::Get(item); @@ -1187,7 +1187,8 @@ bool DownloadsEraseFunction::RunImpl() { base::ListValue* json_results = new base::ListValue(); for (DownloadManager::DownloadVector::const_iterator it = results.begin(); it != results.end(); ++it) { - json_results->Append(base::Value::CreateIntegerValue((*it)->GetId())); + json_results->Append( + new base::FundamentalValue(static_cast<int>((*it)->GetId()))); (*it)->Remove(); } SetResult(json_results); @@ -1479,7 +1480,7 @@ void DownloadsGetFileIconFunction::OnIconURLExtracted(const std::string& url) { return; } RecordApiFunctions(DOWNLOADS_FUNCTION_GET_FILE_ICON); - SetResult(base::Value::CreateStringValue(url)); + SetResult(new base::StringValue(url)); SendResponse(true); } @@ -1819,7 +1820,8 @@ void ExtensionDownloadsEventRouter::OnDownloadRemoved( DispatchEvent(events::kOnDownloadErased, true, extensions::Event::WillDispatchCallback(), - base::Value::CreateIntegerValue(download_item->GetId())); + new base::FundamentalValue( + static_cast<int>(download_item->GetId()))); } void ExtensionDownloadsEventRouter::DispatchEvent( 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 a4c5a2c..e528f9b 100644 --- a/chrome/browser/extensions/api/extension_action/extension_action_api.cc +++ b/chrome/browser/extensions/api/extension_action/extension_action_api.cc @@ -253,7 +253,7 @@ void ExtensionActionAPI::SetBrowserActionVisibility( prefs->UpdateExtensionPref(extension_id, kBrowserActionVisible, - Value::CreateBooleanValue(visible)); + new base::FundamentalValue(visible)); content::NotificationService::current()->Notify( chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED, content::Source<ExtensionPrefs>(prefs), @@ -655,28 +655,32 @@ bool ExtensionActionSetBadgeBackgroundColorFunction::RunExtensionAction() { } bool ExtensionActionGetTitleFunction::RunExtensionAction() { - SetResult(Value::CreateStringValue(extension_action_->GetTitle(tab_id_))); + SetResult(new base::StringValue(extension_action_->GetTitle(tab_id_))); return true; } bool ExtensionActionGetPopupFunction::RunExtensionAction() { SetResult( - Value::CreateStringValue(extension_action_->GetPopupUrl(tab_id_).spec())); + new base::StringValue(extension_action_->GetPopupUrl(tab_id_).spec())); return true; } bool ExtensionActionGetBadgeTextFunction::RunExtensionAction() { - SetResult(Value::CreateStringValue(extension_action_->GetBadgeText(tab_id_))); + SetResult(new base::StringValue(extension_action_->GetBadgeText(tab_id_))); return true; } bool ExtensionActionGetBadgeBackgroundColorFunction::RunExtensionAction() { 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))); - list->Append(Value::CreateIntegerValue(SkColorGetB(color))); - list->Append(Value::CreateIntegerValue(SkColorGetA(color))); + list->Append( + new base::FundamentalValue(static_cast<int>(SkColorGetR(color)))); + list->Append( + new base::FundamentalValue(static_cast<int>(SkColorGetG(color)))); + list->Append( + new base::FundamentalValue(static_cast<int>(SkColorGetB(color)))); + list->Append( + new base::FundamentalValue(static_cast<int>(SkColorGetA(color)))); SetResult(list); return true; } diff --git a/chrome/browser/extensions/api/feedback_private/feedback_private_api.cc b/chrome/browser/extensions/api/feedback_private/feedback_private_api.cc index d9db466..dc3b493 100644 --- a/chrome/browser/extensions/api/feedback_private/feedback_private_api.cc +++ b/chrome/browser/extensions/api/feedback_private/feedback_private_api.cc @@ -71,7 +71,7 @@ bool FeedbackPrivateGetUserEmailFunction::RunImpl() { FeedbackPrivateAPI::GetFactoryInstance()->GetForProfile( profile())->GetService(); DCHECK(service); - SetResult(base::Value::CreateStringValue(service->GetUserEmail())); + SetResult(new base::StringValue(service->GetUserEmail())); return true; } 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 7ebf9e2..99e761d 100644 --- a/chrome/browser/extensions/api/file_system/file_system_api.cc +++ b/chrome/browser/extensions/api/file_system/file_system_api.cc @@ -490,7 +490,7 @@ bool FileSystemGetDisplayPathFunction::RunImpl() { return false; file_path = PrettifyPath(file_path); - SetResult(base::Value::CreateStringValue(file_path.value())); + SetResult(new base::StringValue(file_path.value())); return true; } @@ -613,7 +613,7 @@ bool FileSystemIsWritableEntryFunction::RunImpl() { bool is_writable = policy->CanReadWriteFileSystem(renderer_id, filesystem_id); - SetResult(base::Value::CreateBooleanValue(is_writable)); + SetResult(new base::FundamentalValue(is_writable)); return true; } 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 b5498a1..476adcb 100644 --- a/chrome/browser/extensions/api/font_settings/font_settings_api.cc +++ b/chrome/browser/extensions/api/font_settings/font_settings_api.cc @@ -303,7 +303,7 @@ bool FontSettingsSetFontFunction::RunImpl() { extension_id(), pref_path.c_str(), kExtensionPrefsScopeRegular, - Value::CreateStringValue(params->details.font_id)); + new base::StringValue(params->details.font_id)); return true; } @@ -343,8 +343,8 @@ bool FontSettingsGetFontListFunction::CopyFontsToResult( } base::DictionaryValue* font_name = new base::DictionaryValue(); - font_name->Set(kFontIdKey, Value::CreateStringValue(name)); - font_name->Set(kDisplayNameKey, Value::CreateStringValue(localized_name)); + font_name->Set(kFontIdKey, new base::StringValue(name)); + font_name->Set(kDisplayNameKey, new base::StringValue(localized_name)); result->Append(font_name); } diff --git a/chrome/browser/extensions/api/identity/experimental_identity_api.cc b/chrome/browser/extensions/api/identity/experimental_identity_api.cc index 2e01c4e..11e2408 100644 --- a/chrome/browser/extensions/api/identity/experimental_identity_api.cc +++ b/chrome/browser/extensions/api/identity/experimental_identity_api.cc @@ -102,7 +102,7 @@ bool ExperimentalIdentityGetAuthTokenFunction::RunImpl() { void ExperimentalIdentityGetAuthTokenFunction::CompleteFunctionWithResult( const std::string& access_token) { - SetResult(Value::CreateStringValue(access_token)); + SetResult(new base::StringValue(access_token)); SendResponse(true); Release(); // Balanced in RunImpl. } @@ -385,7 +385,7 @@ void ExperimentalIdentityLaunchWebAuthFlowFunction::OnAuthFlowFailure( void ExperimentalIdentityLaunchWebAuthFlowFunction::OnAuthFlowURLChange( const GURL& redirect_url) { if (IsFinalRedirectURL(redirect_url)) { - SetResult(Value::CreateStringValue(redirect_url.spec())); + SetResult(new base::StringValue(redirect_url.spec())); SendResponse(true); Release(); // Balanced in RunImpl. } diff --git a/chrome/browser/extensions/api/identity/identity_api.cc b/chrome/browser/extensions/api/identity/identity_api.cc index 6a8beb7..128fb6e 100644 --- a/chrome/browser/extensions/api/identity/identity_api.cc +++ b/chrome/browser/extensions/api/identity/identity_api.cc @@ -129,7 +129,7 @@ bool IdentityGetAuthTokenFunction::RunImpl() { void IdentityGetAuthTokenFunction::CompleteFunctionWithResult( const std::string& access_token) { - SetResult(Value::CreateStringValue(access_token)); + SetResult(new base::StringValue(access_token)); SendResponse(true); Release(); // Balanced in RunImpl. } @@ -599,7 +599,7 @@ void IdentityLaunchWebAuthFlowFunction::OnAuthFlowFailure( void IdentityLaunchWebAuthFlowFunction::OnAuthFlowURLChange( const GURL& redirect_url) { if (redirect_url.GetWithEmptyPath() == final_url_prefix_) { - SetResult(Value::CreateStringValue(redirect_url.spec())); + SetResult(new base::StringValue(redirect_url.spec())); SendResponse(true); Release(); // Balanced in RunImpl. } diff --git a/chrome/browser/extensions/api/idltest/idltest_api.cc b/chrome/browser/extensions/api/idltest/idltest_api.cc index 98ef9b3..63e1efe 100644 --- a/chrome/browser/extensions/api/idltest/idltest_api.cc +++ b/chrome/browser/extensions/api/idltest/idltest_api.cc @@ -14,12 +14,12 @@ 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])); + output->Append(new base::FundamentalValue(input_buffer[i])); } return output; } -} +} // namespace bool IdltestSendArrayBufferFunction::RunImpl() { BinaryValue* input = NULL; 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 e14c620..20d89e6 100644 --- a/chrome/browser/extensions/api/input_ime/input_ime_api.cc +++ b/chrome/browser/extensions/api/input_ime/input_ime_api.cc @@ -111,7 +111,7 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer { return; scoped_ptr<base::ListValue> args(new base::ListValue()); - args->Append(Value::CreateStringValue(engine_id)); + args->Append(new base::StringValue(engine_id)); DispatchEventToExtension(profile_, extension_id_, events::kOnActivate, args.Pass()); @@ -122,7 +122,7 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer { return; scoped_ptr<base::ListValue> args(new base::ListValue()); - args->Append(Value::CreateStringValue(engine_id)); + args->Append(new base::StringValue(engine_id)); DispatchEventToExtension(profile_, extension_id_, events::kOnDeactivated, args.Pass()); @@ -149,7 +149,7 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer { return; scoped_ptr<base::ListValue> args(new base::ListValue()); - args->Append(Value::CreateIntegerValue(context_id)); + args->Append(new base::FundamentalValue(context_id)); DispatchEventToExtension(profile_, extension_id_, events::kOnBlur, args.Pass()); @@ -193,7 +193,7 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer { dict->SetBoolean("capsLock", event.caps_lock); scoped_ptr<base::ListValue> args(new base::ListValue()); - args->Append(Value::CreateStringValue(engine_id)); + args->Append(new base::StringValue(engine_id)); args->Append(dict); DispatchEventToExtension(profile_, extension_id_, @@ -208,21 +208,21 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer { return; scoped_ptr<base::ListValue> args(new base::ListValue()); - args->Append(Value::CreateStringValue(engine_id)); - args->Append(Value::CreateIntegerValue(candidate_id)); + args->Append(new base::StringValue(engine_id)); + args->Append(new base::FundamentalValue(candidate_id)); switch (button) { case chromeos::InputMethodEngine::MOUSE_BUTTON_MIDDLE: - args->Append(Value::CreateStringValue("middle")); + args->Append(new base::StringValue("middle")); break; case chromeos::InputMethodEngine::MOUSE_BUTTON_RIGHT: - args->Append(Value::CreateStringValue("right")); + args->Append(new base::StringValue("right")); break; case chromeos::InputMethodEngine::MOUSE_BUTTON_LEFT: // Default to left. default: - args->Append(Value::CreateStringValue("left")); + args->Append(new base::StringValue("left")); break; } @@ -236,8 +236,8 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer { return; scoped_ptr<base::ListValue> args(new base::ListValue()); - args->Append(Value::CreateStringValue(engine_id)); - args->Append(Value::CreateStringValue(menu_id)); + args->Append(new base::StringValue(engine_id)); + args->Append(new base::StringValue(menu_id)); DispatchEventToExtension(profile_, extension_id_, events::kOnMenuItemActivated, args.Pass()); @@ -255,7 +255,7 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer { dict->SetInteger("anchor", anchor_pos); scoped_ptr<ListValue> args(new base::ListValue); - args->Append(Value::CreateStringValue(engine_id)); + args->Append(new base::StringValue(engine_id)); args->Append(dict); DispatchEventToExtension(profile_, extension_id_, @@ -266,7 +266,7 @@ class ImeObserver : public chromeos::InputMethodEngine::Observer { if (profile_ == NULL || extension_id_.empty()) return; scoped_ptr<base::ListValue> args(new base::ListValue()); - args->Append(Value::CreateStringValue(engine_id)); + args->Append(new base::StringValue(engine_id)); DispatchEventToExtension(profile_, extension_id_, events::kOnReset, args.Pass()); @@ -436,7 +436,7 @@ bool InputImeSetCompositionFunction::RunImpl() { chromeos::InputMethodEngine* engine = InputImeEventRouter::GetInstance()->GetActiveEngine(extension_id()); if (!engine) { - SetResult(Value::CreateBooleanValue(false)); + SetResult(new base::FundamentalValue(false)); return true; } @@ -471,7 +471,7 @@ bool InputImeSetCompositionFunction::RunImpl() { int selection_end = params.selection_end ? *params.selection_end : params.cursor; - SetResult(Value::CreateBooleanValue( + SetResult(new base::FundamentalValue( engine->SetComposition(params.context_id, params.text.c_str(), selection_start, selection_end, params.cursor, segments, &error_))); @@ -482,7 +482,7 @@ bool InputImeClearCompositionFunction::RunImpl() { chromeos::InputMethodEngine* engine = InputImeEventRouter::GetInstance()->GetActiveEngine(extension_id()); if (!engine) { - SetResult(Value::CreateBooleanValue(false)); + SetResult(new base::FundamentalValue(false)); return true; } @@ -491,7 +491,7 @@ bool InputImeClearCompositionFunction::RunImpl() { const ClearComposition::Params::Parameters& params = parent_params->parameters; - SetResult(Value::CreateBooleanValue( + SetResult(new base::FundamentalValue( engine->ClearComposition(params.context_id, &error_))); return true; } @@ -501,7 +501,7 @@ bool InputImeCommitTextFunction::RunImpl() { chromeos::InputMethodEngine* engine = InputImeEventRouter::GetInstance()->GetActiveEngine(extension_id()); if (!engine) { - SetResult(Value::CreateBooleanValue(false)); + SetResult(new base::FundamentalValue(false)); return true; } @@ -510,7 +510,7 @@ bool InputImeCommitTextFunction::RunImpl() { const CommitText::Params::Parameters& params = parent_params->parameters; - SetResult(Value::CreateBooleanValue( + SetResult(new base::FundamentalValue( engine->CommitText(params.context_id, params.text.c_str(), &error_))); return true; } @@ -526,7 +526,7 @@ bool InputImeSetCandidateWindowPropertiesFunction::RunImpl() { params.engine_id); if (!engine) { - SetResult(Value::CreateBooleanValue(false)); + SetResult(new base::FundamentalValue(false)); return true; } @@ -535,7 +535,7 @@ bool InputImeSetCandidateWindowPropertiesFunction::RunImpl() { if (properties.visible && !engine->SetCandidateWindowVisible(*properties.visible, &error_)) { - SetResult(Value::CreateBooleanValue(false)); + SetResult(new base::FundamentalValue(false)); return true; } @@ -568,7 +568,7 @@ bool InputImeSetCandidateWindowPropertiesFunction::RunImpl() { chromeos::InputMethodEngine::WINDOW_POS_CURSOR); } - SetResult(Value::CreateBooleanValue(true)); + SetResult(new base::FundamentalValue(true)); return true; } @@ -578,7 +578,7 @@ bool InputImeSetCandidatesFunction::RunImpl() { chromeos::InputMethodEngine* engine = InputImeEventRouter::GetInstance()->GetActiveEngine(extension_id()); if (!engine) { - SetResult(Value::CreateBooleanValue(false)); + SetResult(new base::FundamentalValue(false)); return true; } @@ -605,7 +605,7 @@ bool InputImeSetCandidatesFunction::RunImpl() { } } - SetResult(Value::CreateBooleanValue( + SetResult(new base::FundamentalValue( engine->SetCandidates(params.context_id, candidates_out, &error_))); return true; } @@ -614,7 +614,7 @@ bool InputImeSetCursorPositionFunction::RunImpl() { chromeos::InputMethodEngine* engine = InputImeEventRouter::GetInstance()->GetActiveEngine(extension_id()); if (!engine) { - SetResult(Value::CreateBooleanValue(false)); + SetResult(new base::FundamentalValue(false)); return true; } @@ -623,7 +623,7 @@ bool InputImeSetCursorPositionFunction::RunImpl() { const SetCursorPosition::Params::Parameters& params = parent_params->parameters; - SetResult(Value::CreateBooleanValue( + SetResult(new base::FundamentalValue( engine->SetCursorPosition(params.context_id, params.candidate_id, &error_))); return true; diff --git a/chrome/browser/extensions/api/management/management_api.cc b/chrome/browser/extensions/api/management/management_api.cc index 3e6b19e..b322cb6 100644 --- a/chrome/browser/extensions/api/management/management_api.cc +++ b/chrome/browser/extensions/api/management/management_api.cc @@ -678,7 +678,7 @@ void ManagementEventRouter::Observe( scoped_ptr<base::ListValue> args(new base::ListValue()); if (event_name == events::kOnExtensionUninstalled) { - args->Append(Value::CreateStringValue(extension->id())); + args->Append(new base::StringValue(extension->id())); } else { scoped_ptr<management::ExtensionInfo> info = CreateExtensionInfo( *extension, ExtensionSystem::Get(profile)); diff --git a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.cc b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.cc index e3e974d..7e8436cc 100644 --- a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.cc +++ b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.cc @@ -414,7 +414,7 @@ void MediaGalleriesPrivateEjectDeviceFunction::HandleResponse( if (status == chrome::StorageMonitor::EJECT_NO_SUCH_DEVICE) result = EJECT_DEVICE_RESULT_CODE_NO_SUCH_DEVICE; - SetResult(base::StringValue::CreateStringValue( + SetResult(new base::StringValue( api::media_galleries_private::ToString(result))); SendResponse(true); } diff --git a/chrome/browser/extensions/api/module/module.cc b/chrome/browser/extensions/api/module/module.cc index d9c11b7..b1295d1 100644 --- a/chrome/browser/extensions/api/module/module.cc +++ b/chrome/browser/extensions/api/module/module.cc @@ -41,7 +41,7 @@ bool ExtensionSetUpdateUrlDataFunction::RunImpl() { ExtensionPrefs::Get(profile())->UpdateExtensionPref( extension_id(), extension::kUpdateURLData, - base::Value::CreateStringValue(data)); + new base::StringValue(data)); return true; } @@ -50,7 +50,7 @@ bool ExtensionIsAllowedIncognitoAccessFunction::RunImpl() { ExtensionSystem::Get(profile())->extension_service(); const Extension* extension = GetExtension(); - SetResult(Value::CreateBooleanValue( + SetResult(new base::FundamentalValue( ext_service->IsIncognitoEnabled(extension->id()))); return true; } @@ -60,7 +60,7 @@ bool ExtensionIsAllowedFileSchemeAccessFunction::RunImpl() { ExtensionSystem::Get(profile())->extension_service(); const Extension* extension = GetExtension(); - SetResult(Value::CreateBooleanValue( + SetResult(new base::FundamentalValue( ext_service->AllowFileAccess(extension))); return true; } diff --git a/chrome/browser/extensions/api/music_manager_private/music_manager_private_api.cc b/chrome/browser/extensions/api/music_manager_private/music_manager_private_api.cc index 26d989c..5cca660 100644 --- a/chrome/browser/extensions/api/music_manager_private/music_manager_private_api.cc +++ b/chrome/browser/extensions/api/music_manager_private/music_manager_private_api.cc @@ -44,7 +44,7 @@ void MusicManagerPrivateGetDeviceIdFunction::DeviceIdCallback( SetError(kDeviceIdNotSupported); response = false; } else { - SetResult(Value::CreateStringValue(device_id)); + SetResult(new base::StringValue(device_id)); response = true; } diff --git a/chrome/browser/extensions/api/networking_private/networking_private_apitest.cc b/chrome/browser/extensions/api/networking_private/networking_private_apitest.cc index 3971278..ff5fe1a 100644 --- a/chrome/browser/extensions/api/networking_private/networking_private_apitest.cc +++ b/chrome/browser/extensions/api/networking_private/networking_private_apitest.cc @@ -324,7 +324,7 @@ IN_PROC_BROWSER_TEST_P(ExtensionNetworkingPrivateApiTest, policy.Set(policy::key::kOpenNetworkConfiguration, policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, - Value::CreateStringValue(user_policy_blob), + new base::StringValue(user_policy_blob), NULL); provider_.UpdateChromePolicy(policy); diff --git a/chrome/browser/extensions/api/notifications/notifications_api.cc b/chrome/browser/extensions/api/notifications/notifications_api.cc index 257eb1a..962e162 100644 --- a/chrome/browser/extensions/api/notifications/notifications_api.cc +++ b/chrome/browser/extensions/api/notifications/notifications_api.cc @@ -149,7 +149,7 @@ class NotificationsApiDelegate : public NotificationDelegate { virtual void Close(bool by_user) OVERRIDE { scoped_ptr<base::ListValue> args(CreateBaseEventArgs()); - args->Append(Value::CreateBooleanValue(by_user)); + args->Append(new base::FundamentalValue(by_user)); SendEvent(event_names::kOnNotificationClosed, args.Pass()); } @@ -165,7 +165,7 @@ class NotificationsApiDelegate : public NotificationDelegate { virtual void ButtonClick(int index) OVERRIDE { scoped_ptr<base::ListValue> args(CreateBaseEventArgs()); - args->Append(Value::CreateIntegerValue(index)); + args->Append(new base::FundamentalValue(index)); SendEvent(event_names::kOnNotificationButtonClicked, args.Pass()); } @@ -202,7 +202,7 @@ class NotificationsApiDelegate : public NotificationDelegate { scoped_ptr<base::ListValue> CreateBaseEventArgs() { scoped_ptr<base::ListValue> args(new base::ListValue()); - args->Append(Value::CreateStringValue(id_)); + args->Append(new base::StringValue(id_)); return args.Pass(); } @@ -491,7 +491,7 @@ bool NotificationsCreateFunction::RunNotificationsApi() { else notification_id = kNotificationPrefix + base::Uint64ToString(next_id_++); - SetResult(Value::CreateStringValue(notification_id)); + SetResult(new base::StringValue(notification_id)); // TODO(dewittj): Add more human-readable error strings if this fails. if (!CreateNotification(notification_id, ¶ms_->options)) @@ -518,7 +518,7 @@ bool NotificationsUpdateFunction::RunNotificationsApi() { g_browser_process->notification_ui_manager()->FindById( CreateScopedIdentifier(extension_->id(), params_->notification_id)); if (!matched_notification) { - SetResult(Value::CreateBooleanValue(false)); + SetResult(new base::FundamentalValue(false)); SendResponse(true); return true; } @@ -530,7 +530,7 @@ bool NotificationsUpdateFunction::RunNotificationsApi() { Notification notification = *matched_notification; bool could_update_notification = UpdateNotification( params_->notification_id, ¶ms_->options, ¬ification); - SetResult(Value::CreateBooleanValue(could_update_notification)); + SetResult(new base::FundamentalValue(could_update_notification)); if (!could_update_notification) return false; @@ -553,7 +553,7 @@ bool NotificationsClearFunction::RunNotificationsApi() { bool cancel_result = g_browser_process->notification_ui_manager()->CancelById( CreateScopedIdentifier(extension_->id(), params_->notification_id)); - SetResult(Value::CreateBooleanValue(cancel_result)); + SetResult(new base::FundamentalValue(cancel_result)); SendResponse(true); return true; diff --git a/chrome/browser/extensions/api/omnibox/omnibox_api.cc b/chrome/browser/extensions/api/omnibox/omnibox_api.cc index 06db5b8..18250ad 100644 --- a/chrome/browser/extensions/api/omnibox/omnibox_api.cc +++ b/chrome/browser/extensions/api/omnibox/omnibox_api.cc @@ -127,8 +127,8 @@ bool ExtensionOmniboxEventRouter::OnInputChanged( return false; scoped_ptr<base::ListValue> args(new base::ListValue()); - args->Set(0, Value::CreateStringValue(input)); - args->Set(1, Value::CreateIntegerValue(suggest_id)); + args->Set(0, new base::StringValue(input)); + args->Set(1, new base::FundamentalValue(suggest_id)); scoped_ptr<Event> event(new Event(events::kOnInputChanged, args.Pass())); event->restrict_to_profile = profile; @@ -154,13 +154,13 @@ void ExtensionOmniboxEventRouter::OnInputEntered( active_tab_permission_granter()->GrantIfRequested(extension); scoped_ptr<base::ListValue> args(new base::ListValue()); - args->Set(0, Value::CreateStringValue(input)); + args->Set(0, new base::StringValue(input)); if (disposition == NEW_FOREGROUND_TAB) - args->Set(1, Value::CreateStringValue(kForegroundTabDisposition)); + args->Set(1, new base::StringValue(kForegroundTabDisposition)); else if (disposition == NEW_BACKGROUND_TAB) - args->Set(1, Value::CreateStringValue(kBackgroundTabDisposition)); + args->Set(1, new base::StringValue(kBackgroundTabDisposition)); else - args->Set(1, Value::CreateStringValue(kCurrentTabDisposition)); + args->Set(1, new base::StringValue(kCurrentTabDisposition)); scoped_ptr<Event> event(new Event(events::kOnInputEntered, args.Pass())); event->restrict_to_profile = profile; 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 22e2015..b327840 100644 --- a/chrome/browser/extensions/api/permissions/permissions_api_helpers_unittest.cc +++ b/chrome/browser/extensions/api/permissions/permissions_api_helpers_unittest.cc @@ -52,13 +52,13 @@ TEST(ExtensionPermissionsAPIHelpers, Pack) { std::string expected_apis[] = { "tabs", "webRequest" }; for (size_t i = 0; i < ARRAYSIZE_UNSAFE(expected_apis); ++i) { - scoped_ptr<Value> value(Value::CreateStringValue(expected_apis[i])); + scoped_ptr<Value> value(new base::StringValue(expected_apis[i])); EXPECT_NE(api_list->end(), api_list->Find(*value)); } std::string expected_origins[] = { "http://a.com/*", "http://b.com/*" }; for (size_t i = 0; i < ARRAYSIZE_UNSAFE(expected_origins); ++i) { - scoped_ptr<Value> value(Value::CreateStringValue(expected_origins[i])); + scoped_ptr<Value> value(new base::StringValue(expected_origins[i])); EXPECT_NE(origin_list->end(), origin_list->Find(*value)); } @@ -78,9 +78,9 @@ TEST(ExtensionPermissionsAPIHelpers, Pack) { // into PermissionSets. TEST(ExtensionPermissionsAPIHelpers, Unpack) { scoped_ptr<base::ListValue> apis(new base::ListValue()); - apis->Append(Value::CreateStringValue("tabs")); + apis->Append(new base::StringValue("tabs")); scoped_ptr<base::ListValue> origins(new base::ListValue()); - origins->Append(Value::CreateStringValue("http://a.com/*")); + origins->Append(new base::StringValue("http://a.com/*")); scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); scoped_refptr<PermissionSet> permissions; @@ -114,7 +114,7 @@ TEST(ExtensionPermissionsAPIHelpers, Unpack) { Permissions permissions_object; value->Clear(); scoped_ptr<base::ListValue> invalid_apis(apis->DeepCopy()); - invalid_apis->Append(Value::CreateIntegerValue(3)); + invalid_apis->Append(new base::FundamentalValue(3)); value->Set("permissions", invalid_apis->DeepCopy()); EXPECT_FALSE(Permissions::Populate(*value, &permissions_object)); } @@ -124,7 +124,7 @@ TEST(ExtensionPermissionsAPIHelpers, Unpack) { Permissions permissions_object; value->Clear(); scoped_ptr<base::ListValue> invalid_origins(origins->DeepCopy()); - invalid_origins->Append(Value::CreateIntegerValue(3)); + invalid_origins->Append(new base::FundamentalValue(3)); value->Set("origins", invalid_origins->DeepCopy()); EXPECT_FALSE(Permissions::Populate(*value, &permissions_object)); } @@ -133,14 +133,14 @@ TEST(ExtensionPermissionsAPIHelpers, Unpack) { { Permissions permissions_object; value->Clear(); - value->Set("origins", Value::CreateIntegerValue(2)); + value->Set("origins", new base::FundamentalValue(2)); EXPECT_FALSE(Permissions::Populate(*value, &permissions_object)); } { Permissions permissions_object; value->Clear(); - value->Set("permissions", Value::CreateIntegerValue(2)); + value->Set("permissions", new base::FundamentalValue(2)); EXPECT_FALSE(Permissions::Populate(*value, &permissions_object)); } @@ -149,7 +149,7 @@ TEST(ExtensionPermissionsAPIHelpers, Unpack) { Permissions permissions_object; value->Clear(); value->Set("origins", origins->DeepCopy()); - value->Set("random", Value::CreateIntegerValue(3)); + value->Set("random", new base::FundamentalValue(3)); EXPECT_TRUE(Permissions::Populate(*value, &permissions_object)); permissions = UnpackPermissionSet(permissions_object, true, &error); EXPECT_TRUE(permissions.get()); @@ -162,7 +162,7 @@ TEST(ExtensionPermissionsAPIHelpers, Unpack) { Permissions permissions_object; value->Clear(); scoped_ptr<base::ListValue> invalid_apis(apis->DeepCopy()); - invalid_apis->Append(Value::CreateStringValue("unknown_permission")); + invalid_apis->Append(new base::StringValue("unknown_permission")); value->Set("permissions", invalid_apis->DeepCopy()); EXPECT_TRUE(Permissions::Populate(*value, &permissions_object)); permissions = UnpackPermissionSet(permissions_object, true, &error); diff --git a/chrome/browser/extensions/api/preference/preference_api.cc b/chrome/browser/extensions/api/preference/preference_api.cc index b792fd4..f5cc200 100644 --- a/chrome/browser/extensions/api/preference/preference_api.cc +++ b/chrome/browser/extensions/api/preference/preference_api.cc @@ -139,7 +139,7 @@ class InvertBooleanTransformer : public PrefTransformerInterface { bool bool_value = false; bool result = value->GetAsBoolean(&bool_value); DCHECK(result); - return Value::CreateBooleanValue(!bool_value); + return new base::FundamentalValue(!bool_value); } }; diff --git a/chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc b/chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc index 8a69ab3..e187224 100644 --- a/chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc +++ b/chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc @@ -182,7 +182,7 @@ class ControlledPrefsInstallOneExtension virtual void Initialize() OVERRIDE { InstallExtensionControlledPref(extension1(), kPref1, - Value::CreateStringValue("val1")); + new base::StringValue("val1")); } virtual void Verify() OVERRIDE { std::string actual = prefs()->pref_service()->GetString(kPref1); @@ -198,9 +198,9 @@ class ControlledPrefsInstallIncognitoPersistent public: virtual void Initialize() OVERRIDE { InstallExtensionControlledPref( - extension1(), kPref1, Value::CreateStringValue("val1")); + extension1(), kPref1, new base::StringValue("val1")); InstallExtensionControlledPrefIncognito( - extension1(), kPref1, Value::CreateStringValue("val2")); + extension1(), kPref1, new base::StringValue("val2")); scoped_ptr<PrefService> incog_prefs(prefs_.CreateIncognitoPrefService()); std::string actual = incog_prefs->GetString(kPref1); EXPECT_EQ("val2", actual); @@ -227,9 +227,9 @@ class ControlledPrefsInstallIncognitoSessionOnly virtual void Initialize() OVERRIDE { InstallExtensionControlledPref( - extension1(), kPref1, Value::CreateStringValue("val1")); + extension1(), kPref1, new base::StringValue("val1")); InstallExtensionControlledPrefIncognitoSessionOnly( - extension1(), kPref1, Value::CreateStringValue("val2")); + extension1(), kPref1, new base::StringValue("val2")); scoped_ptr<PrefService> incog_prefs(prefs_.CreateIncognitoPrefService()); std::string actual = incog_prefs->GetString(kPref1); EXPECT_EQ("val2", actual); @@ -258,9 +258,9 @@ TEST_F(ControlledPrefsInstallIncognitoSessionOnly, class ControlledPrefsUninstallExtension : public ExtensionControlledPrefsTest { virtual void Initialize() OVERRIDE { InstallExtensionControlledPref( - extension1(), kPref1, Value::CreateStringValue("val1")); + extension1(), kPref1, new base::StringValue("val1")); InstallExtensionControlledPref( - extension1(), kPref2, Value::CreateStringValue("val2")); + extension1(), kPref2, new base::StringValue("val2")); ContentSettingsStore* store = prefs()->content_settings_store(); ContentSettingsPattern pattern = ContentSettingsPattern::FromString("http://[*.]example.com"); @@ -308,7 +308,7 @@ class ControlledPrefsNotifyWhenNeeded : public ExtensionControlledPrefsTest { EXPECT_CALL(observer, OnPreferenceChanged(_)); EXPECT_CALL(incognito_observer, OnPreferenceChanged(_)); InstallExtensionControlledPref(extension1(), kPref1, - Value::CreateStringValue("https://www.chromium.org")); + new base::StringValue("https://www.chromium.org")); Mock::VerifyAndClearExpectations(&observer); Mock::VerifyAndClearExpectations(&incognito_observer); @@ -316,7 +316,7 @@ class ControlledPrefsNotifyWhenNeeded : public ExtensionControlledPrefsTest { EXPECT_CALL(observer, OnPreferenceChanged(_)).Times(0); EXPECT_CALL(incognito_observer, OnPreferenceChanged(_)).Times(0); InstallExtensionControlledPref(extension1(), kPref1, - Value::CreateStringValue("https://www.chromium.org")); + new base::StringValue("https://www.chromium.org")); Mock::VerifyAndClearExpectations(&observer); Mock::VerifyAndClearExpectations(&incognito_observer); @@ -324,14 +324,14 @@ class ControlledPrefsNotifyWhenNeeded : public ExtensionControlledPrefsTest { EXPECT_CALL(observer, OnPreferenceChanged(_)); EXPECT_CALL(incognito_observer, OnPreferenceChanged(_)); InstallExtensionControlledPref(extension1(), kPref1, - Value::CreateStringValue("chrome://newtab")); + new base::StringValue("chrome://newtab")); Mock::VerifyAndClearExpectations(&observer); Mock::VerifyAndClearExpectations(&incognito_observer); // Change only incognito persistent value. EXPECT_CALL(observer, OnPreferenceChanged(_)).Times(0); EXPECT_CALL(incognito_observer, OnPreferenceChanged(_)); InstallExtensionControlledPrefIncognito(extension1(), kPref1, - Value::CreateStringValue("chrome://newtab2")); + new base::StringValue("chrome://newtab2")); Mock::VerifyAndClearExpectations(&observer); Mock::VerifyAndClearExpectations(&incognito_observer); @@ -339,7 +339,7 @@ class ControlledPrefsNotifyWhenNeeded : public ExtensionControlledPrefsTest { EXPECT_CALL(observer, OnPreferenceChanged(_)).Times(0); EXPECT_CALL(incognito_observer, OnPreferenceChanged(_)); InstallExtensionControlledPrefIncognito(extension1(), kPref1, - Value::CreateStringValue("chrome://newtab3")); + new base::StringValue("chrome://newtab3")); Mock::VerifyAndClearExpectations(&observer); Mock::VerifyAndClearExpectations(&incognito_observer); @@ -365,7 +365,7 @@ TEST_F(ControlledPrefsNotifyWhenNeeded, class ControlledPrefsDisableExtension : public ExtensionControlledPrefsTest { virtual void Initialize() OVERRIDE { InstallExtensionControlledPref( - extension1(), kPref1, Value::CreateStringValue("val1")); + extension1(), kPref1, new base::StringValue("val1")); std::string actual = prefs()->pref_service()->GetString(kPref1); EXPECT_EQ("val1", actual); prefs()->SetExtensionState(extension1()->id(), Extension::DISABLED); @@ -381,7 +381,7 @@ TEST_F(ControlledPrefsDisableExtension, ControlledPrefsDisableExtension) { } class ControlledPrefsReenableExtension : public ExtensionControlledPrefsTest { virtual void Initialize() OVERRIDE { InstallExtensionControlledPref( - extension1(), kPref1, Value::CreateStringValue("val1")); + extension1(), kPref1, new base::StringValue("val1")); prefs()->SetExtensionState(extension1()->id(), Extension::DISABLED); prefs()->SetExtensionState(extension1()->id(), Extension::ENABLED); } @@ -448,7 +448,7 @@ class ControlledPrefsDisableExtensions : public ExtensionControlledPrefsTest { virtual ~ControlledPrefsDisableExtensions() {} virtual void Initialize() OVERRIDE { InstallExtensionControlledPref( - extension1(), kPref1, Value::CreateStringValue("val1")); + extension1(), kPref1, new base::StringValue("val1")); // This becomes only active in the second verification phase. prefs_.set_extensions_disabled(true); } diff --git a/chrome/browser/extensions/api/processes/processes_api.cc b/chrome/browser/extensions/api/processes/processes_api.cc index e1ab2a4..f8c583e 100644 --- a/chrome/browser/extensions/api/processes/processes_api.cc +++ b/chrome/browser/extensions/api/processes/processes_api.cc @@ -125,7 +125,7 @@ base::ListValue* GetTabsForProcess(int process_id) { if (contents) { tab_id = ExtensionTabUtil::GetTabId(contents); if (tab_id != -1) - tabs_list->Append(Value::CreateIntegerValue(tab_id)); + tabs_list->Append(new base::FundamentalValue(tab_id)); } } @@ -401,14 +401,14 @@ void ProcessesEventRouter::OnItemsToBeRemoved(int start, int length) { scoped_ptr<base::ListValue> args(new base::ListValue()); // First arg: The id of the process that was closed. - args->Append(Value::CreateIntegerValue( + args->Append(new base::FundamentalValue( model_->GetUniqueChildProcessId(start))); // Second arg: The exit type for the process. - args->Append(Value::CreateIntegerValue(0)); + args->Append(new base::FundamentalValue(0)); // Third arg: The exit code for the process. - args->Append(Value::CreateIntegerValue(0)); + args->Append(new base::FundamentalValue(0)); DispatchEvent(keys::kOnExited, args.Pass()); #endif // defined(ENABLE_TASK_MANAGER) @@ -452,13 +452,13 @@ void ProcessesEventRouter::ProcessClosedEvent( scoped_ptr<base::ListValue> args(new base::ListValue()); // First arg: The id of the process that was closed. - args->Append(Value::CreateIntegerValue(rph->GetID())); + args->Append(new base::FundamentalValue(rph->GetID())); // Second arg: The exit type for the process. - args->Append(Value::CreateIntegerValue(details->status)); + args->Append(new base::FundamentalValue(details->status)); // Third arg: The exit code for the process. - args->Append(Value::CreateIntegerValue(details->exit_code)); + args->Append(new base::FundamentalValue(details->exit_code)); DispatchEvent(keys::kOnExited, args.Pass()); #endif // defined(ENABLE_TASK_MANAGER) @@ -585,11 +585,11 @@ void GetProcessIdForTabFunction::GetProcessIdForTab() { error_ = ErrorUtils::FormatErrorMessage( extensions::tabs_constants::kTabNotFoundError, base::IntToString(tab_id_)); - SetResult(Value::CreateIntegerValue(-1)); + SetResult(new base::FundamentalValue(-1)); SendResponse(false); } else { int process_id = contents->GetRenderProcessHost()->GetID(); - SetResult(Value::CreateIntegerValue(process_id)); + SetResult(new base::FundamentalValue(process_id)); SendResponse(true); } @@ -664,7 +664,7 @@ void TerminateFunction::TerminateProcess() { base::IntToString(process_id_)); SendResponse(false); } else { - SetResult(Value::CreateBooleanValue(killed)); + SetResult(new base::FundamentalValue(killed)); SendResponse(true); } diff --git a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc index f0fc389..1c0d693 100644 --- a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc +++ b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc @@ -490,7 +490,7 @@ base::ListValue* TokenizeToStringList(const std::string& in, base::ListValue* out = new base::ListValue; base::StringTokenizer entries(in, delims); while (entries.GetNext()) - out->Append(Value::CreateStringValue(entries.token())); + out->Append(new base::StringValue(entries.token())); return out; } 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 f830710..7a92fa4 100644 --- a/chrome/browser/extensions/api/proxy/proxy_api_helpers_unittest.cc +++ b/chrome/browser/extensions/api/proxy/proxy_api_helpers_unittest.cc @@ -204,8 +204,8 @@ TEST(ExtensionProxyApiHelpers, GetBypassListFromExtensionPref) { EXPECT_FALSE(bad_message); base::ListValue* bypass_list = new base::ListValue; - bypass_list->Append(Value::CreateStringValue("host1")); - bypass_list->Append(Value::CreateStringValue("host2")); + bypass_list->Append(new base::StringValue("host1")); + bypass_list->Append(new base::StringValue("host2")); base::DictionaryValue* proxy_rules = new base::DictionaryValue; proxy_rules->Set(keys::kProxyConfigBypassList, bypass_list); proxy_config.Set(keys::kProxyConfigRules, proxy_rules); @@ -323,9 +323,9 @@ TEST(ExtensionProxyApiHelpers, GetProxyServer) { TEST(ExtensionProxyApiHelpers, JoinUrlList) { bool bad_message = false; base::ListValue list; - list.Append(Value::CreateStringValue("s1")); - list.Append(Value::CreateStringValue("s2")); - list.Append(Value::CreateStringValue("s3")); + list.Append(new base::StringValue("s1")); + list.Append(new base::StringValue("s2")); + list.Append(new base::StringValue("s3")); std::string out; std::string error; @@ -355,7 +355,7 @@ TEST(ExtensionProxyApiHelpers, CreateProxyRulesDict) { expected->Set("fallbackProxy", CreateTestProxyServerDict("socks4", "proxy4", 80)); base::ListValue* bypass_list = new base::ListValue; - bypass_list->Append(Value::CreateStringValue("localhost")); + bypass_list->Append(new base::StringValue("localhost")); expected->Set(keys::kProxyConfigBypassList, bypass_list); EXPECT_TRUE(Value::Equals(expected.get(), extension_pref.get())); @@ -383,7 +383,7 @@ TEST(ExtensionProxyApiHelpers, CreateProxyRulesDictMultipleProxies) { expected->Set("fallbackProxy", CreateTestProxyServerDict("socks4", "proxy4", 80)); base::ListValue* bypass_list = new base::ListValue; - bypass_list->Append(Value::CreateStringValue("localhost")); + bypass_list->Append(new base::StringValue("localhost")); expected->Set(keys::kProxyConfigBypassList, bypass_list); EXPECT_TRUE(Value::Equals(expected.get(), extension_pref.get())); @@ -421,9 +421,9 @@ TEST(ExtensionProxyApiHelpers, CreatePacScriptDictWidthData) { TEST(ExtensionProxyApiHelpers, TokenizeToStringList) { base::ListValue expected; - expected.Append(Value::CreateStringValue("s1")); - expected.Append(Value::CreateStringValue("s2")); - expected.Append(Value::CreateStringValue("s3")); + expected.Append(new base::StringValue("s1")); + expected.Append(new base::StringValue("s2")); + expected.Append(new base::StringValue("s3")); scoped_ptr<base::ListValue> out(TokenizeToStringList("s1;s2;s3", ";")); EXPECT_TRUE(Value::Equals(&expected, out.get())); diff --git a/chrome/browser/extensions/api/rtc_private/rtc_private_api.cc b/chrome/browser/extensions/api/rtc_private/rtc_private_api.cc index 642a30a..ac1fe83 100644 --- a/chrome/browser/extensions/api/rtc_private/rtc_private_api.cc +++ b/chrome/browser/extensions/api/rtc_private/rtc_private_api.cc @@ -67,7 +67,7 @@ void GetContactIntentData(const Contact& contact, dict->Set(kPhoneIntentField, phone_list); for (int i = 0; i < contact.phone_numbers_size(); i++) { const Contact_PhoneNumber& phone_number = contact.phone_numbers(i); - StringValue* value = Value::CreateStringValue(phone_number.number()); + StringValue* value = new base::StringValue(phone_number.number()); if (phone_number.primary()) CHECK(phone_list->Insert(0, value)); else @@ -78,7 +78,7 @@ void GetContactIntentData(const Contact& contact, dict->Set(kEmailIntentField, email_list); for (int i = 0; i < contact.email_addresses_size(); i++) { const Contact_EmailAddress& email_address = contact.email_addresses(i); - StringValue* value = Value::CreateStringValue(email_address.address()); + StringValue* value = new base::StringValue(email_address.address()); if (email_address.primary()) CHECK(email_list->Insert(0, value)); else diff --git a/chrome/browser/extensions/api/runtime/runtime_api.cc b/chrome/browser/extensions/api/runtime/runtime_api.cc index 6143f15..e54664e 100644 --- a/chrome/browser/extensions/api/runtime/runtime_api.cc +++ b/chrome/browser/extensions/api/runtime/runtime_api.cc @@ -114,7 +114,7 @@ void SetUninstallUrl(ExtensionPrefs* prefs, const std::string& url_string) { prefs->UpdateExtensionPref(extension_id, kUninstallUrl, - base::Value::CreateStringValue(url_string)); + new base::StringValue(url_string)); } std::string GetUninstallUrl(ExtensionPrefs* prefs, diff --git a/chrome/browser/extensions/api/serial/serial_api.cc b/chrome/browser/extensions/api/serial/serial_api.cc index b0e7925..b958944 100644 --- a/chrome/browser/extensions/api/serial/serial_api.cc +++ b/chrome/browser/extensions/api/serial/serial_api.cc @@ -65,7 +65,7 @@ void SerialGetPortsFunction::Work() { SerialPortEnumerator::GenerateValidSerialPortNames(); SerialPortEnumerator::StringSet::const_iterator i = port_names.begin(); while (i != port_names.end()) { - ports->Append(Value::CreateStringValue(*i++)); + ports->Append(new base::StringValue(*i++)); } SetResult(ports); @@ -182,7 +182,7 @@ void SerialCloseFunction::Work() { close_result = true; } - SetResult(Value::CreateBooleanValue(close_result)); + SetResult(new base::FundamentalValue(close_result)); } bool SerialCloseFunction::Respond() { @@ -294,7 +294,7 @@ void SerialFlushFunction::Work() { flush_result = true; } - SetResult(Value::CreateBooleanValue(flush_result)); + SetResult(new base::FundamentalValue(flush_result)); } bool SerialFlushFunction::Respond() { @@ -369,14 +369,14 @@ void SerialSetControlSignalsFunction::Work() { if (control_signals.should_set_rts) control_signals.rts = *(params_->options.rts); if (serial_connection->SetControlSignals(control_signals)) { - SetResult(Value::CreateBooleanValue(true)); + SetResult(new base::FundamentalValue(true)); } else { error_ = kErrorSetControlSignalsFailed; - SetResult(Value::CreateBooleanValue(false)); + SetResult(new base::FundamentalValue(false)); } } else { error_ = kSerialConnectionNotFoundError; - SetResult(Value::CreateBooleanValue(false)); + SetResult(new base::FundamentalValue(false)); } } diff --git a/chrome/browser/extensions/api/socket/socket_api.cc b/chrome/browser/extensions/api/socket/socket_api.cc index 6a43ce7..83f1e4e 100644 --- a/chrome/browser/extensions/api/socket/socket_api.cc +++ b/chrome/browser/extensions/api/socket/socket_api.cc @@ -186,7 +186,7 @@ void SocketConnectFunction::AsyncWorkStart() { socket_ = GetSocket(socket_id_); if (!socket_) { error_ = kSocketNotFoundError; - SetResult(Value::CreateIntegerValue(-1)); + SetResult(new base::FundamentalValue(-1)); AsyncWorkCompleted(); return; } @@ -209,7 +209,7 @@ void SocketConnectFunction::AsyncWorkStart() { if (!PermissionsData::CheckAPIPermissionWithParam( GetExtension(), APIPermission::kSocket, ¶m)) { error_ = kPermissionError; - SetResult(Value::CreateIntegerValue(-1)); + SetResult(new base::FundamentalValue(-1)); AsyncWorkCompleted(); return; } @@ -221,7 +221,7 @@ void SocketConnectFunction::AfterDnsLookup(int lookup_result) { if (lookup_result == net::OK) { StartConnect(); } else { - SetResult(Value::CreateIntegerValue(lookup_result)); + SetResult(new base::FundamentalValue(lookup_result)); AsyncWorkCompleted(); } } @@ -232,7 +232,7 @@ void SocketConnectFunction::StartConnect() { } void SocketConnectFunction::OnConnect(int result) { - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); AsyncWorkCompleted(); } @@ -263,7 +263,7 @@ void SocketBindFunction::Work() { if (!socket) { error_ = kSocketNotFoundError; - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); return; } @@ -275,17 +275,17 @@ void SocketBindFunction::Work() { APIPermission::kSocket, ¶m)) { error_ = kPermissionError; - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); return; } } else if (socket->GetSocketType() == Socket::TYPE_TCP) { error_ = kTCPSocketBindError; - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); return; } result = socket->Bind(address_, port_); - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); } SocketListenFunction::SocketListenFunction() {} @@ -310,7 +310,7 @@ void SocketListenFunction::Work() { APIPermission::kSocket, ¶m)) { error_ = kPermissionError; - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); return; } @@ -323,7 +323,7 @@ void SocketListenFunction::Work() { error_ = kSocketNotFoundError; } - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); } SocketAcceptFunction::SocketAcceptFunction() {} @@ -504,7 +504,7 @@ void SocketSendToFunction::AsyncWorkStart() { socket_ = GetSocket(socket_id_); if (!socket_) { error_ = kSocketNotFoundError; - SetResult(Value::CreateIntegerValue(-1)); + SetResult(new base::FundamentalValue(-1)); AsyncWorkCompleted(); return; } @@ -517,7 +517,7 @@ void SocketSendToFunction::AsyncWorkStart() { APIPermission::kSocket, ¶m)) { error_ = kPermissionError; - SetResult(Value::CreateIntegerValue(-1)); + SetResult(new base::FundamentalValue(-1)); AsyncWorkCompleted(); return; } @@ -530,7 +530,7 @@ void SocketSendToFunction::AfterDnsLookup(int lookup_result) { if (lookup_result == net::OK) { StartSendTo(); } else { - SetResult(Value::CreateIntegerValue(lookup_result)); + SetResult(new base::FundamentalValue(lookup_result)); AsyncWorkCompleted(); } } @@ -569,7 +569,7 @@ void SocketSetKeepAliveFunction::Work() { } else { error_ = kSocketNotFoundError; } - SetResult(Value::CreateBooleanValue(result)); + SetResult(new base::FundamentalValue(result)); } SocketSetNoDelayFunction::SocketSetNoDelayFunction() {} @@ -589,7 +589,7 @@ void SocketSetNoDelayFunction::Work() { result = socket->SetNoDelay(params_->no_delay); else error_ = kSocketNotFoundError; - SetResult(Value::CreateBooleanValue(result)); + SetResult(new base::FundamentalValue(result)); } SocketGetInfoFunction::SocketGetInfoFunction() {} @@ -701,13 +701,13 @@ void SocketJoinGroupFunction::Work() { Socket* socket = GetSocket(params_->socket_id); if (!socket) { error_ = kSocketNotFoundError; - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); return; } if (socket->GetSocketType() != Socket::TYPE_UDP) { error_ = kMulticastSocketTypeError; - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); return; } @@ -719,7 +719,7 @@ void SocketJoinGroupFunction::Work() { if (!PermissionsData::CheckAPIPermissionWithParam( GetExtension(), APIPermission::kSocket, ¶m)) { error_ = kPermissionError; - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); return; } @@ -727,7 +727,7 @@ void SocketJoinGroupFunction::Work() { if (result != 0) { error_ = net::ErrorToString(result); } - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); } SocketLeaveGroupFunction::SocketLeaveGroupFunction() {} @@ -746,13 +746,13 @@ void SocketLeaveGroupFunction::Work() { if (!socket) { error_ = kSocketNotFoundError; - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); return; } if (socket->GetSocketType() != Socket::TYPE_UDP) { error_ = kMulticastSocketTypeError; - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); return; } @@ -764,14 +764,14 @@ void SocketLeaveGroupFunction::Work() { APIPermission::kSocket, ¶m)) { error_ = kPermissionError; - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); return; } result = static_cast<UDPSocket*>(socket)->LeaveGroup(params_->address); if (result != 0) error_ = net::ErrorToString(result); - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); } SocketSetMulticastTimeToLiveFunction::SocketSetMulticastTimeToLiveFunction() {} @@ -788,13 +788,13 @@ void SocketSetMulticastTimeToLiveFunction::Work() { Socket* socket = GetSocket(params_->socket_id); if (!socket) { error_ = kSocketNotFoundError; - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); return; } if (socket->GetSocketType() != Socket::TYPE_UDP) { error_ = kMulticastSocketTypeError; - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); return; } @@ -802,7 +802,7 @@ void SocketSetMulticastTimeToLiveFunction::Work() { params_->ttl); if (result != 0) error_ = net::ErrorToString(result); - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); } SocketSetMulticastLoopbackModeFunction:: @@ -822,13 +822,13 @@ void SocketSetMulticastLoopbackModeFunction::Work() { Socket* socket = GetSocket(params_->socket_id); if (!socket) { error_ = kSocketNotFoundError; - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); return; } if (socket->GetSocketType() != Socket::TYPE_UDP) { error_ = kMulticastSocketTypeError; - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); return; } @@ -836,7 +836,7 @@ void SocketSetMulticastLoopbackModeFunction::Work() { SetMulticastLoopbackMode(params_->enabled); if (result != 0) error_ = net::ErrorToString(result); - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); } SocketGetJoinedGroupsFunction::SocketGetJoinedGroupsFunction() {} @@ -854,13 +854,13 @@ void SocketGetJoinedGroupsFunction::Work() { Socket* socket = GetSocket(params_->socket_id); if (!socket) { error_ = kSocketNotFoundError; - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); return; } if (socket->GetSocketType() != Socket::TYPE_UDP) { error_ = kMulticastSocketTypeError; - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); return; } @@ -873,7 +873,7 @@ void SocketGetJoinedGroupsFunction::Work() { APIPermission::kSocket, ¶m)) { error_ = kPermissionError; - SetResult(Value::CreateIntegerValue(result)); + SetResult(new base::FundamentalValue(result)); return; } diff --git a/chrome/browser/extensions/api/storage/policy_value_store_unittest.cc b/chrome/browser/extensions/api/storage/policy_value_store_unittest.cc index 56f473e..e554b32 100644 --- a/chrome/browser/extensions/api/storage/policy_value_store_unittest.cc +++ b/chrome/browser/extensions/api/storage/policy_value_store_unittest.cc @@ -124,7 +124,7 @@ TEST_F(PolicyValueStoreTest, DontProvideRecommendedPolicies) { policy::POLICY_SCOPE_USER, expected.DeepCopy(), NULL); policies.Set("may", policy::POLICY_LEVEL_RECOMMENDED, policy::POLICY_SCOPE_USER, - base::Value::CreateIntegerValue(456), NULL); + new base::FundamentalValue(456), NULL); store_->SetCurrentPolicy(policies, false); ValueStore::ReadResult result = store_->Get(); ASSERT_FALSE(result->HasError()); @@ -155,7 +155,7 @@ TEST_F(PolicyValueStoreTest, ReadOnly) { TEST_F(PolicyValueStoreTest, NotifyOnChanges) { policy::PolicyMap policies; policies.Set("aaa", policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, - base::Value::CreateStringValue("111"), NULL); + new base::StringValue("111"), NULL); EXPECT_CALL(observer_, OnSettingsChanged(_, _, _)).Times(0); // No notification when setting the initial policy. store_->SetCurrentPolicy(policies, false); @@ -164,9 +164,9 @@ TEST_F(PolicyValueStoreTest, NotifyOnChanges) { // And no notifications on changes when not asked for. policies.Set("aaa", policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, - base::Value::CreateStringValue("222"), NULL); + new base::StringValue("222"), NULL); policies.Set("bbb", policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, - base::Value::CreateStringValue("223"), NULL); + new base::StringValue("223"), NULL); EXPECT_CALL(observer_, OnSettingsChanged(_, _, _)).Times(0); store_->SetCurrentPolicy(policies, false); loop_.RunUntilIdle(); diff --git a/chrome/browser/extensions/api/storage/settings_frontend.cc b/chrome/browser/extensions/api/storage/settings_frontend.cc index a14ed69..05dc82d 100644 --- a/chrome/browser/extensions/api/storage/settings_frontend.cc +++ b/chrome/browser/extensions/api/storage/settings_frontend.cc @@ -46,7 +46,7 @@ class DefaultObserver : public SettingsObserver { // string-based event payloads is removed. http://crbug.com/136045 scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(base::JSONReader::Read(change_json)); - args->Append(Value::CreateStringValue(settings_namespace::ToString( + args->Append(new base::StringValue(settings_namespace::ToString( settings_namespace))); scoped_ptr<Event> event(new Event( event_names::kOnSettingsChanged, args.Pass())); diff --git a/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc b/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc index 55bbaeb..9eb8e45 100644 --- a/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc +++ b/chrome/browser/extensions/api/storage/settings_frontend_unittest.cc @@ -35,7 +35,7 @@ scoped_ptr<Value> CreateKilobyte() { for (int i = 0; i < 1024; ++i) { kilobyte_string += "a"; } - return scoped_ptr<Value>(Value::CreateStringValue(kilobyte_string)); + return scoped_ptr<Value>(new base::StringValue(kilobyte_string)); } // Creates a megabyte of data. @@ -47,7 +47,7 @@ scoped_ptr<Value> CreateMegabyte() { return scoped_ptr<Value>(megabyte); } -} +} // namespace class ExtensionSettingsFrontendTest : public testing::Test { public: diff --git a/chrome/browser/extensions/api/storage/settings_quota_unittest.cc b/chrome/browser/extensions/api/storage/settings_quota_unittest.cc index 0e4ea79..d64c42c 100644 --- a/chrome/browser/extensions/api/storage/settings_quota_unittest.cc +++ b/chrome/browser/extensions/api/storage/settings_quota_unittest.cc @@ -25,12 +25,12 @@ const ValueStore::WriteOptions IGNORE_QUOTA = class ExtensionSettingsQuotaTest : public testing::Test { public: ExtensionSettingsQuotaTest() - : byte_value_1_(Value::CreateIntegerValue(1)), - byte_value_16_(Value::CreateStringValue("sixteen bytes.")), + : byte_value_1_(new base::FundamentalValue(1)), + byte_value_16_(new base::StringValue("sixteen bytes.")), byte_value_256_(new ListValue()), delegate_(new TestingValueStore()) { for (int i = 1; i < 89; ++i) { - byte_value_256_->Append(Value::CreateIntegerValue(i)); + byte_value_256_->Append(new base::FundamentalValue(i)); } ValidateByteValues(); } diff --git a/chrome/browser/extensions/api/storage/settings_sync_unittest.cc b/chrome/browser/extensions/api/storage/settings_sync_unittest.cc index 9d55bdb..903ede8 100644 --- a/chrome/browser/extensions/api/storage/settings_sync_unittest.cc +++ b/chrome/browser/extensions/api/storage/settings_sync_unittest.cc @@ -307,7 +307,7 @@ TEST_F(ExtensionSettingsSyncTest, InSyncDataDoesNotInvokeSync) { StringValue value1("fooValue"); ListValue value2; - value2.Append(StringValue::CreateStringValue("barValue")); + value2.Append(new base::StringValue("barValue")); ValueStore* storage1 = AddExtensionAndGetStorage("s1", type); ValueStore* storage2 = AddExtensionAndGetStorage("s2", type); @@ -357,7 +357,7 @@ TEST_F(ExtensionSettingsSyncTest, LocalDataWithNoSyncDataIsPushedToSync) { StringValue value1("fooValue"); ListValue value2; - value2.Append(StringValue::CreateStringValue("barValue")); + value2.Append(new base::StringValue("barValue")); ValueStore* storage1 = AddExtensionAndGetStorage("s1", type); ValueStore* storage2 = AddExtensionAndGetStorage("s2", type); @@ -389,7 +389,7 @@ TEST_F(ExtensionSettingsSyncTest, AnySyncDataOverwritesLocalData) { StringValue value1("fooValue"); ListValue value2; - value2.Append(StringValue::CreateStringValue("barValue")); + value2.Append(new base::StringValue("barValue")); // Maintain dictionaries mirrored to the expected values of the settings in // each storage area. @@ -429,7 +429,7 @@ TEST_F(ExtensionSettingsSyncTest, ProcessSyncChanges) { StringValue value1("fooValue"); ListValue value2; - value2.Append(StringValue::CreateStringValue("barValue")); + value2.Append(new base::StringValue("barValue")); // Maintain dictionaries mirrored to the expected values of the settings in // each storage area. @@ -502,7 +502,7 @@ TEST_F(ExtensionSettingsSyncTest, PushToSync) { StringValue value1("fooValue"); ListValue value2; - value2.Append(StringValue::CreateStringValue("barValue")); + value2.Append(new base::StringValue("barValue")); // Make storage1/2 initialised from local data, storage3/4 initialised from // sync. @@ -641,7 +641,7 @@ TEST_F(ExtensionSettingsSyncTest, PushToSync) { TEST_F(ExtensionSettingsSyncTest, ExtensionAndAppSettingsSyncSeparately) { StringValue value1("fooValue"); ListValue value2; - value2.Append(StringValue::CreateStringValue("barValue")); + value2.Append(new base::StringValue("barValue")); // storage1 is an extension, storage2 is an app. ValueStore* storage1 = AddExtensionAndGetStorage( @@ -1390,7 +1390,7 @@ TEST_F(ExtensionSettingsSyncTest, Dots) { { syncer::SyncDataList sync_data_list; - scoped_ptr<Value> string_value(Value::CreateStringValue("value")); + scoped_ptr<Value> string_value(new base::StringValue("value")); sync_data_list.push_back(settings_sync_util::CreateData( "ext", "key.with.dot", *string_value, model_type)); @@ -1410,13 +1410,13 @@ TEST_F(ExtensionSettingsSyncTest, Dots) { DictionaryValue expected_data; expected_data.SetWithoutPathExpansion( "key.with.dot", - Value::CreateStringValue("value")); + new base::StringValue("value")); EXPECT_TRUE(Value::Equals(&expected_data, data->settings().get())); } // Test dots in keys going to sync. { - scoped_ptr<Value> string_value(Value::CreateStringValue("spot")); + scoped_ptr<Value> string_value(new base::StringValue("spot")); storage->Set(DEFAULTS, "key.with.spot", *string_value); ASSERT_EQ(1u, sync_processor_->changes().size()); diff --git a/chrome/browser/extensions/api/storage/settings_test_util.cc b/chrome/browser/extensions/api/storage/settings_test_util.cc index 07b635e..82c1845 100644 --- a/chrome/browser/extensions/api/storage/settings_test_util.cc +++ b/chrome/browser/extensions/api/storage/settings_test_util.cc @@ -68,7 +68,7 @@ void MockExtensionService::AddExtensionWithIdAndPermissions( 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)); + permissions->Append(new base::StringValue(*it)); } manifest.Set("permissions", permissions.release()); diff --git a/chrome/browser/extensions/api/storage/storage_api.cc b/chrome/browser/extensions/api/storage/storage_api.cc index d86b763..f9c6831 100644 --- a/chrome/browser/extensions/api/storage/storage_api.cc +++ b/chrome/browser/extensions/api/storage/storage_api.cc @@ -235,7 +235,7 @@ bool StorageStorageAreaGetBytesInUseFunction::RunWithStorage( return false; } - SetResult(base::Value::CreateIntegerValue(bytes_in_use)); + SetResult(new base::FundamentalValue(static_cast<int>(bytes_in_use))); return true; } 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 f318596..a400971 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 @@ -99,12 +99,12 @@ void SyncFileSystemDeleteFileSystemFunction::DidDeleteFileSystem( DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); if (error != base::PLATFORM_FILE_OK) { error_ = base::StringPrintf(kFileError, static_cast<int>(error)); - SetResult(base::Value::CreateBooleanValue(false)); + SetResult(new base::FundamentalValue(false)); SendResponse(false); return; } - SetResult(base::Value::CreateBooleanValue(true)); + SetResult(new base::FundamentalValue(true)); SendResponse(true); } @@ -380,7 +380,7 @@ bool SyncFileSystemGetConflictResolutionPolicyFunction::RunImpl() { api::sync_file_system::ConflictResolutionPolicy policy = ConflictResolutionPolicyToExtensionEnum( service->GetConflictResolutionPolicy()); - SetResult(Value::CreateStringValue( + SetResult(new base::StringValue( api::sync_file_system::ToString(policy))); return true; } 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 55296e3..758f6b7 100644 --- a/chrome/browser/extensions/api/system_private/system_private_api.cc +++ b/chrome/browser/extensions/api/system_private/system_private_api.cc @@ -67,7 +67,7 @@ bool SystemPrivateGetIncognitoModeAvailabilityFunction::RunImpl() { EXTENSION_FUNCTION_VALIDATE( value >= 0 && value < static_cast<int>(arraysize(kIncognitoModeAvailabilityStrings))); - SetResult(Value::CreateStringValue(kIncognitoModeAvailabilityStrings[value])); + SetResult(new base::StringValue(kIncognitoModeAvailabilityStrings[value])); return true; } diff --git a/chrome/browser/extensions/api/system_storage/system_storage_api.cc b/chrome/browser/extensions/api/system_storage/system_storage_api.cc index cf640ab..4c2301e 100644 --- a/chrome/browser/extensions/api/system_storage/system_storage_api.cc +++ b/chrome/browser/extensions/api/system_storage/system_storage_api.cc @@ -87,7 +87,7 @@ void SystemStorageEjectDeviceFunction::HandleResponse( result = api::system_storage::EJECT_DEVICE_RESULT_CODE_FAILURE; } - SetResult(base::StringValue::CreateStringValue( + SetResult(new base::StringValue( api::system_storage::ToString(result))); SendResponse(true); } diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc index d574db9..09f86ab 100644 --- a/chrome/browser/extensions/api/tabs/tabs_api.cc +++ b/chrome/browser/extensions/api/tabs/tabs_api.cc @@ -1951,7 +1951,7 @@ void TabsDetectLanguageFunction::Observe( } void TabsDetectLanguageFunction::GotLanguage(const std::string& language) { - SetResult(Value::CreateStringValue(language.c_str())); + SetResult(new base::StringValue(language.c_str())); SendResponse(true); Release(); // Balanced in Run() diff --git a/chrome/browser/extensions/api/tabs/windows_event_router.cc b/chrome/browser/extensions/api/tabs/windows_event_router.cc index 1138a73..e6a8a57 100644 --- a/chrome/browser/extensions/api/tabs/windows_event_router.cc +++ b/chrome/browser/extensions/api/tabs/windows_event_router.cc @@ -72,7 +72,7 @@ void WindowsEventRouter::OnWindowControllerRemoved( int window_id = window_controller->GetWindowId(); scoped_ptr<base::ListValue> args(new base::ListValue()); - args->Append(Value::CreateIntegerValue(window_id)); + args->Append(new base::FundamentalValue(window_id)); DispatchEvent(event_names::kOnWindowRemoved, window_controller->profile(), args.Pass()); } @@ -117,11 +117,11 @@ static void WillDispatchWindowFocusedEvent(Profile* new_active_profile, !extensions::ExtensionSystem::Get(profile)->extension_service()-> CanCrossIncognito(extension)) { event_args->Clear(); - event_args->Append(Value::CreateIntegerValue( + event_args->Append(new base::FundamentalValue( extension_misc::kUnknownWindowId)); } else { event_args->Clear(); - event_args->Append(Value::CreateIntegerValue(window_id)); + event_args->Append(new base::FundamentalValue(window_id)); } } diff --git a/chrome/browser/extensions/api/test/test_api.cc b/chrome/browser/extensions/api/test/test_api.cc index cd55a58..5cf8051 100644 --- a/chrome/browser/extensions/api/test/test_api.cc +++ b/chrome/browser/extensions/api/test/test_api.cc @@ -117,7 +117,7 @@ bool TestSendMessageFunction::RunImpl() { TestSendMessageFunction::~TestSendMessageFunction() {} void TestSendMessageFunction::Reply(const std::string& message) { - SetResult(Value::CreateStringValue(message)); + SetResult(new base::StringValue(message)); SendResponse(true); Release(); // balanced in RunImpl } diff --git a/chrome/browser/extensions/api/usb/usb_api.cc b/chrome/browser/extensions/api/usb/usb_api.cc index 878e362..6fa3aa2 100644 --- a/chrome/browser/extensions/api/usb/usb_api.cc +++ b/chrome/browser/extensions/api/usb/usb_api.cc @@ -65,7 +65,7 @@ static const char kErrorCannotClaimInterface[] = "Error claiming interface."; static const char kErrorCannotReleaseInterface[] = "Error releasing interface."; static const char kErrorCannotSetInterfaceAlternateSetting[] = "Error setting alternate interface setting."; -static const char kErrorConvertDirection[] = "Invalid transfer direction."; +static const char kErrorConvertDirection[] = "Invalid transsfer direction."; static const char kErrorConvertRecipient[] = "Invalid transfer recipient."; static const char kErrorConvertRequestType[] = "Invalid request type."; static const char kErrorConvertSynchronizationType[] = @@ -1041,14 +1041,14 @@ void UsbResetDeviceFunction::OnCompleted(bool success) { base::Bind(&UsbResetDeviceFunction::OnError, this)); return; } - SetResult(Value::CreateBooleanValue(true)); + SetResult(new base::FundamentalValue(true)); AsyncWorkCompleted(); } void UsbResetDeviceFunction::OnError() { RemoveUsbDeviceResource(parameters_->device.handle); SetError(kErrorResetDevice); - SetResult(Value::CreateBooleanValue(false)); + SetResult(new base::FundamentalValue(false)); AsyncWorkCompleted(); } 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 86213ee..b684650 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 @@ -102,13 +102,13 @@ void DispatchOnCommitted(const char* event_name, content::PageTransitionGetCoreTransitionString(transition_type)); base::ListValue* qualifiers = new base::ListValue(); if (transition_type & content::PAGE_TRANSITION_CLIENT_REDIRECT) - qualifiers->Append(Value::CreateStringValue("client_redirect")); + qualifiers->Append(new base::StringValue("client_redirect")); if (transition_type & content::PAGE_TRANSITION_SERVER_REDIRECT) - qualifiers->Append(Value::CreateStringValue("server_redirect")); + qualifiers->Append(new base::StringValue("server_redirect")); if (transition_type & content::PAGE_TRANSITION_FORWARD_BACK) - qualifiers->Append(Value::CreateStringValue("forward_back")); + qualifiers->Append(new base::StringValue("forward_back")); if (transition_type & content::PAGE_TRANSITION_FROM_ADDRESS_BAR) - qualifiers->Append(Value::CreateStringValue("from_address_bar")); + qualifiers->Append(new base::StringValue("from_address_bar")); dict->Set(keys::kTransitionQualifiersKey, qualifiers); dict->SetDouble(keys::kTimeStampKey, MilliSecondsFromTime(base::Time::Now())); args->Append(dict); diff --git a/chrome/browser/extensions/api/web_request/upload_data_presenter.cc b/chrome/browser/extensions/api/web_request/upload_data_presenter.cc index 8b34012..2870bc6 100644 --- a/chrome/browser/extensions/api/web_request/upload_data_presenter.cc +++ b/chrome/browser/extensions/api/web_request/upload_data_presenter.cc @@ -97,7 +97,7 @@ void RawDataPresenter::FeedNextBytes(const char* bytes, size_t size) { void RawDataPresenter::FeedNextFile(const std::string& filename) { // Insert the file path instead of the contents, which may be too large. subtle::AppendKeyValuePair(keys::kRequestBodyRawFileKey, - Value::CreateStringValue(filename), + new base::StringValue(filename), list_.get()); } 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 c445982..2309d1a 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 @@ -23,7 +23,7 @@ TEST(WebRequestUploadDataPresenterTest, ParsedData) { // Expected output. scoped_ptr<base::ListValue> values(new base::ListValue); - values->Append(base::Value::CreateStringValue("value")); + values->Append(new base::StringValue("value")); base::DictionaryValue expected_form; expected_form.SetWithoutPathExpansion("key.with.dots", values.release()); @@ -52,7 +52,7 @@ TEST(WebRequestUploadDataPresenterTest, RawData) { base::BinaryValue::CreateWithCopiedBuffer(block1, block1_size)); ASSERT_TRUE(expected_a.get() != NULL); scoped_ptr<base::StringValue> expected_b( - base::Value::CreateStringValue(kFilename)); + new base::StringValue(kFilename)); ASSERT_TRUE(expected_b.get() != NULL); scoped_ptr<base::BinaryValue> expected_c( base::BinaryValue::CreateWithCopiedBuffer(block2, block2_size)); 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 5c10c8d..19638b7 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 @@ -224,7 +224,7 @@ Value* NetLogModificationCallback( delta->modified_request_headers); while (modification.GetNext()) { std::string line = modification.name() + ": " + modification.value(); - modified_headers->Append(Value::CreateStringValue(line)); + modified_headers->Append(new base::StringValue(line)); } dict->Set("modified_headers", modified_headers); @@ -233,7 +233,7 @@ Value* NetLogModificationCallback( delta->deleted_request_headers.begin(); key != delta->deleted_request_headers.end(); ++key) { - deleted_headers->Append(Value::CreateStringValue(*key)); + deleted_headers->Append(new base::StringValue(*key)); } dict->Set("deleted_headers", deleted_headers); return dict; @@ -249,7 +249,7 @@ 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( + new base::FundamentalValue( *reinterpret_cast<const unsigned char*>(&s[i]))); } return result; diff --git a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc index 6648611..1a71294 100644 --- a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc +++ b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc @@ -584,7 +584,7 @@ TEST_F(ExtensionWebRequestTest, AccessRequestBodyData) { &raw); extensions::subtle::AppendKeyValuePair( keys::kRequestBodyRawFileKey, - Value::CreateStringValue(std::string()), + new base::StringValue(std::string()), &raw); extensions::subtle::AppendKeyValuePair( keys::kRequestBodyRawBytesKey, @@ -1165,11 +1165,11 @@ TEST(ExtensionWebRequestHelpersTest, TEST(ExtensionWebRequestHelpersTest, TestStringToCharList) { ListValue list_value; - list_value.Append(Value::CreateIntegerValue('1')); - list_value.Append(Value::CreateIntegerValue('2')); - list_value.Append(Value::CreateIntegerValue('3')); - list_value.Append(Value::CreateIntegerValue(0xFE)); - list_value.Append(Value::CreateIntegerValue(0xD1)); + list_value.Append(new base::FundamentalValue('1')); + list_value.Append(new base::FundamentalValue('2')); + list_value.Append(new base::FundamentalValue('3')); + list_value.Append(new base::FundamentalValue(0xFE)); + list_value.Append(new base::FundamentalValue(0xD1)); unsigned char char_value[] = {'1', '2', '3', 0xFE, 0xD1}; std::string string_value(reinterpret_cast<char *>(char_value), 5); 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 07cc111..565053e 100644 --- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc +++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc @@ -357,34 +357,34 @@ void WebstorePrivateBeginInstallWithManifest3Function::SetResultCode( ResultCode code) { switch (code) { case ERROR_NONE: - SetResult(Value::CreateStringValue(std::string())); + SetResult(new base::StringValue(std::string())); break; case UNKNOWN_ERROR: - SetResult(Value::CreateStringValue("unknown_error")); + SetResult(new base::StringValue("unknown_error")); break; case USER_CANCELLED: - SetResult(Value::CreateStringValue("user_cancelled")); + SetResult(new base::StringValue("user_cancelled")); break; case MANIFEST_ERROR: - SetResult(Value::CreateStringValue("manifest_error")); + SetResult(new base::StringValue("manifest_error")); break; case ICON_ERROR: - SetResult(Value::CreateStringValue("icon_error")); + SetResult(new base::StringValue("icon_error")); break; case INVALID_ID: - SetResult(Value::CreateStringValue("invalid_id")); + SetResult(new base::StringValue("invalid_id")); break; case PERMISSION_DENIED: - SetResult(Value::CreateStringValue("permission_denied")); + SetResult(new base::StringValue("permission_denied")); break; case INVALID_ICON_URL: - SetResult(Value::CreateStringValue("invalid_icon_url")); + SetResult(new base::StringValue("invalid_icon_url")); break; case SIGNIN_FAILED: - SetResult(Value::CreateStringValue("signin_failed")); + SetResult(new base::StringValue("signin_failed")); break; case ALREADY_INSTALLED: - SetResult(Value::CreateStringValue("already_installed")); + SetResult(new base::StringValue("already_installed")); break; default: CHECK(false); @@ -640,7 +640,7 @@ bool WebstorePrivateGetBrowserLoginFunction::RunImpl() { } bool WebstorePrivateGetStoreLoginFunction::RunImpl() { - SetResult(Value::CreateStringValue(GetWebstoreLogin(profile_))); + SetResult(new base::StringValue(GetWebstoreLogin(profile_))); return true; } @@ -662,7 +662,7 @@ WebstorePrivateGetWebGLStatusFunction:: ~WebstorePrivateGetWebGLStatusFunction() {} void WebstorePrivateGetWebGLStatusFunction::CreateResult(bool webgl_allowed) { - SetResult(Value::CreateStringValue( + SetResult(new base::StringValue( webgl_allowed ? "webgl_allowed" : "webgl_blocked")); } @@ -678,14 +678,14 @@ void WebstorePrivateGetWebGLStatusFunction:: } bool WebstorePrivateGetIsLauncherEnabledFunction::RunImpl() { - SetResult(Value::CreateBooleanValue(apps::IsAppLauncherEnabled())); + SetResult(new base::FundamentalValue(apps::IsAppLauncherEnabled())); SendResponse(true); return true; } bool WebstorePrivateIsInIncognitoModeFunction::RunImpl() { SetResult( - Value::CreateBooleanValue(profile_ != profile_->GetOriginalProfile())); + new base::FundamentalValue(profile_ != profile_->GetOriginalProfile())); SendResponse(true); return true; } |