diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-17 06:37:40 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-17 06:37:40 +0000 |
commit | 012d1317d2983f3b821632e1008b53cfda135647 (patch) | |
tree | 9ee44e45bac7cd4d5cbf622544b43eef9f3be078 | |
parent | 6e9bfe1e87c80238666d32878e18322e108d8700 (diff) | |
download | chromium_src-012d1317d2983f3b821632e1008b53cfda135647.zip chromium_src-012d1317d2983f3b821632e1008b53cfda135647.tar.gz chromium_src-012d1317d2983f3b821632e1008b53cfda135647.tar.bz2 |
Eliminate CreateBooleanValue from test files
BUG=160586
Review URL: https://codereview.chromium.org/397793002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283665 0039d316-1c4b-4281-b951-d872f2087c98
45 files changed, 404 insertions, 235 deletions
diff --git a/chrome/browser/chromeos/settings/cros_settings_unittest.cc b/chrome/browser/chromeos/settings/cros_settings_unittest.cc index 060f732..0bbe573 100644 --- a/chrome/browser/chromeos/settings/cros_settings_unittest.cc +++ b/chrome/browser/chromeos/settings/cros_settings_unittest.cc @@ -106,8 +106,7 @@ class CrosSettingsTest : public testing::Test { TEST_F(CrosSettingsTest, SetPref) { // Change to something that is not the default. - AddExpectation(kAccountsPrefAllowGuest, - base::Value::CreateBooleanValue(false)); + AddExpectation(kAccountsPrefAllowGuest, new base::FundamentalValue(false)); SetPref(kAccountsPrefAllowGuest, expected_props_[kAccountsPrefAllowGuest]); FetchPref(kAccountsPrefAllowGuest); ASSERT_TRUE(expected_props_.empty()); @@ -115,8 +114,7 @@ TEST_F(CrosSettingsTest, SetPref) { TEST_F(CrosSettingsTest, GetPref) { // We didn't change the default so look for it. - AddExpectation(kAccountsPrefAllowGuest, - base::Value::CreateBooleanValue(true)); + AddExpectation(kAccountsPrefAllowGuest, new base::FundamentalValue(true)); FetchPref(kAccountsPrefAllowGuest); } @@ -125,8 +123,7 @@ TEST_F(CrosSettingsTest, SetWhitelist) { // kAccountsPrefAllowNewUser to false. base::ListValue whitelist; whitelist.Append(new base::StringValue("me@owner")); - AddExpectation(kAccountsPrefAllowNewUser, - base::Value::CreateBooleanValue(false)); + AddExpectation(kAccountsPrefAllowNewUser, new base::FundamentalValue(false)); AddExpectation(kAccountsPrefUsers, whitelist.DeepCopy()); SetPref(kAccountsPrefUsers, &whitelist); FetchPref(kAccountsPrefAllowNewUser); @@ -137,8 +134,7 @@ TEST_F(CrosSettingsTest, SetWhitelistWithListOps) { base::ListValue* whitelist = new base::ListValue(); base::StringValue hacky_user("h@xxor"); whitelist->Append(hacky_user.DeepCopy()); - AddExpectation(kAccountsPrefAllowNewUser, - base::Value::CreateBooleanValue(false)); + AddExpectation(kAccountsPrefAllowNewUser, new base::FundamentalValue(false)); AddExpectation(kAccountsPrefUsers, whitelist); // Add some user to the whitelist. settings_.AppendToList(kAccountsPrefUsers, &hacky_user); @@ -153,8 +149,7 @@ TEST_F(CrosSettingsTest, SetWhitelistWithListOps2) { whitelist.Append(hacky_user.DeepCopy()); base::ListValue* expected_list = whitelist.DeepCopy(); whitelist.Append(lamy_user.DeepCopy()); - AddExpectation(kAccountsPrefAllowNewUser, - base::Value::CreateBooleanValue(false)); + AddExpectation(kAccountsPrefAllowNewUser, new base::FundamentalValue(false)); AddExpectation(kAccountsPrefUsers, whitelist.DeepCopy()); SetPref(kAccountsPrefUsers, &whitelist); FetchPref(kAccountsPrefAllowNewUser); @@ -171,8 +166,7 @@ TEST_F(CrosSettingsTest, SetEmptyWhitelist) { // Setting the whitelist empty should switch the value of // kAccountsPrefAllowNewUser to true. base::ListValue whitelist; - AddExpectation(kAccountsPrefAllowNewUser, - base::Value::CreateBooleanValue(true)); + AddExpectation(kAccountsPrefAllowNewUser, new base::FundamentalValue(true)); SetPref(kAccountsPrefUsers, &whitelist); FetchPref(kAccountsPrefAllowNewUser); FetchPref(kAccountsPrefUsers); @@ -184,8 +178,7 @@ TEST_F(CrosSettingsTest, SetEmptyWhitelistAndNoNewUsers) { base::ListValue whitelist; base::FundamentalValue disallow_new(false); AddExpectation(kAccountsPrefUsers, whitelist.DeepCopy()); - AddExpectation(kAccountsPrefAllowNewUser, - base::Value::CreateBooleanValue(false)); + AddExpectation(kAccountsPrefAllowNewUser, new base::FundamentalValue(false)); SetPref(kAccountsPrefUsers, &whitelist); SetPref(kAccountsPrefAllowNewUser, &disallow_new); FetchPref(kAccountsPrefAllowNewUser); @@ -198,8 +191,7 @@ TEST_F(CrosSettingsTest, SetWhitelistAndNoNewUsers) { base::ListValue whitelist; whitelist.Append(new base::StringValue("me@owner")); AddExpectation(kAccountsPrefUsers, whitelist.DeepCopy()); - AddExpectation(kAccountsPrefAllowNewUser, - base::Value::CreateBooleanValue(false)); + AddExpectation(kAccountsPrefAllowNewUser, new base::FundamentalValue(false)); SetPref(kAccountsPrefUsers, &whitelist); SetPref(kAccountsPrefAllowNewUser, expected_props_[kAccountsPrefAllowNewUser]); @@ -209,8 +201,7 @@ TEST_F(CrosSettingsTest, SetWhitelistAndNoNewUsers) { TEST_F(CrosSettingsTest, SetAllowNewUsers) { // Setting kAccountsPrefAllowNewUser to true with no whitelist should be ok. - AddExpectation(kAccountsPrefAllowNewUser, - base::Value::CreateBooleanValue(true)); + AddExpectation(kAccountsPrefAllowNewUser, new base::FundamentalValue(true)); SetPref(kAccountsPrefAllowNewUser, expected_props_[kAccountsPrefAllowNewUser]); FetchPref(kAccountsPrefAllowNewUser); @@ -219,7 +210,7 @@ TEST_F(CrosSettingsTest, SetAllowNewUsers) { TEST_F(CrosSettingsTest, SetEphemeralUsersEnabled) { base::FundamentalValue ephemeral_users_enabled(true); AddExpectation(kAccountsPrefEphemeralUsersEnabled, - base::Value::CreateBooleanValue(true)); + new base::FundamentalValue(true)); SetPref(kAccountsPrefEphemeralUsersEnabled, &ephemeral_users_enabled); FetchPref(kAccountsPrefEphemeralUsersEnabled); } diff --git a/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc b/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc index 5f309c7..d726218 100644 --- a/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc +++ b/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc @@ -393,9 +393,8 @@ void AutomaticRebootManagerBasicTest::SetRebootAfterUpdate( bool reboot_after_update, bool expect_reboot) { reboot_after_update_ = reboot_after_update; - local_state_.SetManagedPref( - prefs::kRebootAfterUpdate, - base::Value::CreateBooleanValue(reboot_after_update)); + local_state_.SetManagedPref(prefs::kRebootAfterUpdate, + new base::FundamentalValue(reboot_after_update)); task_runner_->RunUntilIdle(); EXPECT_EQ(expect_reboot ? 1 : 0, power_manager_client_->num_request_restart_calls()); diff --git a/chrome/browser/chromeos/system/tray_accessibility_browsertest.cc b/chrome/browser/chromeos/system/tray_accessibility_browsertest.cc index 586e73f..7da7af0 100644 --- a/chrome/browser/chromeos/system/tray_accessibility_browsertest.cc +++ b/chrome/browser/chromeos/system/tray_accessibility_browsertest.cc @@ -104,7 +104,7 @@ class TrayAccessibilityTest policy_map.Set(policy::key::kShowAccessibilityOptionsInSystemTrayMenu, policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(value), + new base::FundamentalValue(value), NULL); provider_.UpdateChromePolicy(policy_map); base::RunLoop().RunUntilIdle(); diff --git a/chrome/browser/download/download_query_unittest.cc b/chrome/browser/download/download_query_unittest.cc index a11446b..c8f5330 100644 --- a/chrome/browser/download/download_query_unittest.cc +++ b/chrome/browser/download/download_query_unittest.cc @@ -100,7 +100,7 @@ class DownloadQueryTest : public testing::Test { template<> void DownloadQueryTest::AddFilter( DownloadQuery::FilterType name, bool cpp_value) { - scoped_ptr<base::Value> value(base::Value::CreateBooleanValue(cpp_value)); + scoped_ptr<base::Value> value(new base::FundamentalValue(cpp_value)); CHECK(query_.AddFilter(name, *value.get())); } diff --git a/chrome/browser/net/disk_cache_dir_policy_handler_unittest.cc b/chrome/browser/net/disk_cache_dir_policy_handler_unittest.cc index f3a4a2e..b8b1412 100644 --- a/chrome/browser/net/disk_cache_dir_policy_handler_unittest.cc +++ b/chrome/browser/net/disk_cache_dir_policy_handler_unittest.cc @@ -31,7 +31,7 @@ TEST_F(DiskCacheDirPolicyTest, SetPolicyInvalid) { policy_.Set(key::kDiskCacheDir, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), + new base::FundamentalValue(false), NULL); handler_.ApplyPolicySettings(policy_, &prefs_); EXPECT_FALSE(prefs_.GetValue(prefs::kDiskCacheDir, NULL)); diff --git a/chrome/browser/policy/cloud/cloud_policy_browsertest.cc b/chrome/browser/policy/cloud/cloud_policy_browsertest.cc index 658926a..60795d2 100644 --- a/chrome/browser/policy/cloud/cloud_policy_browsertest.cc +++ b/chrome/browser/policy/cloud/cloud_policy_browsertest.cc @@ -145,8 +145,11 @@ void GetExpectedDefaultPolicy(PolicyMap* policy_map) { } void GetExpectedTestPolicy(PolicyMap* expected, const char* homepage) { - expected->Set(key::kShowHomeButton, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(true), NULL); + expected->Set(key::kShowHomeButton, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); expected->Set(key::kRestoreOnStartup, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, base::Value::CreateIntegerValue(4), NULL); base::ListValue list; diff --git a/chrome/browser/policy/file_selection_dialogs_policy_handler_unittest.cc b/chrome/browser/policy/file_selection_dialogs_policy_handler_unittest.cc index 4cb28ba..8392ff9 100644 --- a/chrome/browser/policy/file_selection_dialogs_policy_handler_unittest.cc +++ b/chrome/browser/policy/file_selection_dialogs_policy_handler_unittest.cc @@ -30,7 +30,7 @@ TEST_F(FileSelectionDialogsPolicyTest, EnableFileSelectionDialogs) { policy_.Set(key::kAllowFileSelectionDialogs, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(true), + new base::FundamentalValue(true), NULL); handler_.ApplyPolicySettings(policy_, &prefs_); @@ -43,7 +43,7 @@ TEST_F(FileSelectionDialogsPolicyTest, DisableFileSelectionDialogs) { policy_.Set(key::kAllowFileSelectionDialogs, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), + new base::FundamentalValue(false), NULL); handler_.ApplyPolicySettings(policy_, &prefs_); diff --git a/chrome/browser/policy/javascript_policy_handler_unittest.cc b/chrome/browser/policy/javascript_policy_handler_unittest.cc index 1e7564a..fe85789 100644 --- a/chrome/browser/policy/javascript_policy_handler_unittest.cc +++ b/chrome/browser/policy/javascript_policy_handler_unittest.cc @@ -27,14 +27,14 @@ TEST_F(JavascriptPolicyHandlerTest, JavascriptEnabled) { policy.Set(key::kJavascriptEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(true), + new base::FundamentalValue(true), NULL); UpdateProviderPolicy(policy); EXPECT_FALSE(store_->GetValue(prefs::kManagedDefaultJavaScriptSetting, NULL)); policy.Set(key::kJavascriptEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), + new base::FundamentalValue(false), NULL); UpdateProviderPolicy(policy); const base::Value* value = NULL; @@ -49,7 +49,7 @@ TEST_F(JavascriptPolicyHandlerTest, JavascriptEnabledOverridden) { policy.Set(key::kJavascriptEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), + new base::FundamentalValue(false), NULL); UpdateProviderPolicy(policy); const base::Value* value = NULL; diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc index f147160..1121e20 100644 --- a/chrome/browser/policy/policy_browsertest.cc +++ b/chrome/browser/policy/policy_browsertest.cc @@ -614,8 +614,10 @@ class PolicyTest : public InProcessBrowserTest { void SetScreenshotPolicy(bool enabled) { PolicyMap policies; policies.Set(key::kDisableScreenshots, - POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(!enabled), NULL); + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(!enabled), + NULL); UpdateProviderPolicy(policies); } @@ -796,8 +798,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, BookmarkBarEnabled) { EXPECT_EQ(BookmarkBar::HIDDEN, browser()->bookmark_bar_state()); PolicyMap policies; - policies.Set(key::kBookmarkBarEnabled, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true), NULL); + policies.Set(key::kBookmarkBarEnabled, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); UpdateProviderPolicy(policies); EXPECT_TRUE(prefs->IsManagedPreference(prefs::kShowBookmarkBar)); EXPECT_TRUE(prefs->GetBoolean(prefs::kShowBookmarkBar)); @@ -807,8 +812,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, BookmarkBarEnabled) { ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUINewTabURL)); EXPECT_EQ(BookmarkBar::SHOW, browser()->bookmark_bar_state()); - policies.Set(key::kBookmarkBarEnabled, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(false), NULL); + policies.Set(key::kBookmarkBarEnabled, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); UpdateProviderPolicy(policies); EXPECT_TRUE(prefs->IsManagedPreference(prefs::kShowBookmarkBar)); EXPECT_FALSE(prefs->GetBoolean(prefs::kShowBookmarkBar)); @@ -888,8 +896,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DefaultSearchProvider) { // Override the default search provider using policies. PolicyMap policies; - policies.Set(key::kDefaultSearchProviderEnabled, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true), NULL); + policies.Set(key::kDefaultSearchProviderEnabled, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); policies.Set(key::kDefaultSearchProviderKeyword, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, base::Value::CreateStringValue(kKeyword), NULL); @@ -944,8 +955,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DefaultSearchProvider) { // Verify that searching from the omnibox can be disabled. ui_test_utils::NavigateToURL(browser(), GURL(url::kAboutBlankURL)); - policies.Set(key::kDefaultSearchProviderEnabled, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(false), NULL); + policies.Set(key::kDefaultSearchProviderEnabled, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); EXPECT_TRUE(service->GetDefaultSearchProvider()); UpdateProviderPolicy(policies); EXPECT_FALSE(service->GetDefaultSearchProvider()); @@ -1019,8 +1033,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, ForceSafeSearch) { // Override the default SafeSearch setting using policies. PolicyMap policies; - policies.Set(key::kForceSafeSearch, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true), NULL); + policies.Set(key::kForceSafeSearch, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); UpdateProviderPolicy(policies); EXPECT_TRUE(prefs->IsManagedPreference(prefs::kForceSafeSearch)); @@ -1073,8 +1090,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, ReplaceSearchTerms) { // Override the default search provider using policies. PolicyMap policies; - policies.Set(key::kDefaultSearchProviderEnabled, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true), NULL); + policies.Set(key::kDefaultSearchProviderEnabled, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); policies.Set(key::kDefaultSearchProviderKeyword, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, base::Value::CreateStringValue(kKeyword), NULL); @@ -1169,16 +1189,22 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, Disable3DAPIs) { EXPECT_TRUE(IsWebGLEnabled(contents)); // Disable with a policy. PolicyMap policies; - policies.Set(key::kDisable3DAPIs, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true), NULL); + policies.Set(key::kDisable3DAPIs, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); UpdateProviderPolicy(policies); // Crash and reload the tab to get a new renderer. content::CrashTab(contents); EXPECT_TRUE(chrome::ExecuteCommand(browser(), IDC_RELOAD)); EXPECT_FALSE(IsWebGLEnabled(contents)); // Enable with a policy. - policies.Set(key::kDisable3DAPIs, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(false), NULL); + policies.Set(key::kDisable3DAPIs, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); UpdateProviderPolicy(policies); content::CrashTab(contents); EXPECT_TRUE(chrome::ExecuteCommand(browser(), IDC_RELOAD)); @@ -1189,15 +1215,21 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DisableSpdy) { // Verifies that SPDY can be disable by policy. EXPECT_TRUE(net::HttpStreamFactory::spdy_enabled()); PolicyMap policies; - policies.Set(key::kDisableSpdy, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true), NULL); + policies.Set(key::kDisableSpdy, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); UpdateProviderPolicy(policies); content::RunAllPendingInMessageLoop(); EXPECT_FALSE(net::HttpStreamFactory::spdy_enabled()); // Verify that it can be force-enabled too. browser()->profile()->GetPrefs()->SetBoolean(prefs::kDisableSpdy, true); - policies.Set(key::kDisableSpdy, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(false), NULL); + policies.Set(key::kDisableSpdy, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); UpdateProviderPolicy(policies); content::RunAllPendingInMessageLoop(); EXPECT_TRUE(net::HttpStreamFactory::spdy_enabled()); @@ -1345,8 +1377,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, AlwaysAuthorizePlugins) { // Now set a policy to always authorize this. PolicyMap policies; - policies.Set(key::kAlwaysAuthorizePlugins, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true), NULL); + policies.Set(key::kAlwaysAuthorizePlugins, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); UpdateProviderPolicy(policies); // Reloading the page shouldn't trigger the infobar this time. ui_test_utils::NavigateToURL(browser(), url); @@ -1368,8 +1403,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DeveloperToolsDisabled) { // Disable devtools via policy. PolicyMap policies; - policies.Set(key::kDeveloperToolsDisabled, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true), NULL); + policies.Set(key::kDeveloperToolsDisabled, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); content::WindowedNotificationObserver close_observer( content::NOTIFICATION_WEB_CONTENTS_DESTROYED, content::Source<content::WebContents>( @@ -1411,8 +1449,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DISABLED_WebStoreIconHidden) { // Turn off the web store icons. PolicyMap policies; - policies.Set(key::kHideWebStoreIcon, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true), NULL); + policies.Set(key::kHideWebStoreIcon, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); UpdateProviderPolicy(policies); // The web store icons should now be hidden. @@ -1768,8 +1809,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, HomepageLocation) { content::WaitForLoadStop(contents); EXPECT_EQ(GURL(chrome::kChromeUICreditsURL), contents->GetURL()); - policies.Set(key::kHomepageIsNewTabPage, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true), NULL); + policies.Set(key::kHomepageIsNewTabPage, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); UpdateProviderPolicy(policies); EXPECT_TRUE(chrome::ExecuteCommand(browser(), IDC_HOME)); content::WaitForLoadStop(contents); @@ -1787,16 +1831,22 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, IncognitoEnabled) { EXPECT_EQ(1u, active_browser_list->size()); EXPECT_FALSE(BrowserList::IsOffTheRecordSessionActive()); PolicyMap policies; - policies.Set(key::kIncognitoEnabled, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(false), NULL); + policies.Set(key::kIncognitoEnabled, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); UpdateProviderPolicy(policies); EXPECT_FALSE(chrome::ExecuteCommand(browser(), IDC_NEW_INCOGNITO_WINDOW)); EXPECT_EQ(1u, active_browser_list->size()); EXPECT_FALSE(BrowserList::IsOffTheRecordSessionActive()); // Enable via policy and verify that incognito windows can be opened. - policies.Set(key::kIncognitoEnabled, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true), NULL); + policies.Set(key::kIncognitoEnabled, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); UpdateProviderPolicy(policies); EXPECT_TRUE(chrome::ExecuteCommand(browser(), IDC_NEW_INCOGNITO_WINDOW)); EXPECT_EQ(2u, active_browser_list->size()); @@ -1814,8 +1864,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, Javascript) { // Disable Javascript via policy. PolicyMap policies; - policies.Set(key::kJavascriptEnabled, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(false), NULL); + policies.Set(key::kJavascriptEnabled, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); UpdateProviderPolicy(policies); // Reload the page. ui_test_utils::NavigateToURL(browser(), GURL(url::kAboutBlankURL)); @@ -1842,8 +1895,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, Javascript) { IN_PROC_BROWSER_TEST_F(PolicyTest, SavingBrowserHistoryDisabled) { // Verifies that browsing history is not saved. PolicyMap policies; - policies.Set(key::kSavingBrowserHistoryDisabled, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true), NULL); + policies.Set(key::kSavingBrowserHistoryDisabled, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); UpdateProviderPolicy(policies); GURL url = ui_test_utils::GetTestUrl( base::FilePath(base::FilePath::kCurrentDirectory), @@ -1854,8 +1910,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, SavingBrowserHistoryDisabled) { EXPECT_EQ(0u, enumerator1.urls().size()); // Now flip the policy and try again. - policies.Set(key::kSavingBrowserHistoryDisabled, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(false), NULL); + policies.Set(key::kSavingBrowserHistoryDisabled, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); UpdateProviderPolicy(policies); ui_test_utils::NavigateToURL(browser(), url); // Verify that the navigation was saved in the history. @@ -1886,8 +1945,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DISABLED_TranslateEnabled) { // Force enable the translate feature. PolicyMap policies; - policies.Set(key::kTranslateEnabled, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true), NULL); + policies.Set(key::kTranslateEnabled, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); UpdateProviderPolicy(policies); // Instead of waiting for NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED, this test // waits for NOTIFICATION_TAB_LANGUAGE_DETERMINED because that's what the @@ -1927,8 +1989,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DISABLED_TranslateEnabled) { // Now force disable translate. infobar_service->RemoveInfoBar(infobar); EXPECT_EQ(0u, infobar_service->infobar_count()); - policies.Set(key::kTranslateEnabled, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(false), NULL); + policies.Set(key::kTranslateEnabled, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); UpdateProviderPolicy(policies); // Navigating to the same URL now doesn't trigger an infobar. content::WindowedNotificationObserver language_observer2( @@ -2067,8 +2132,10 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DISABLED_FileURLBlacklist) { IN_PROC_BROWSER_TEST_F(PolicyTest, FullscreenAllowedBrowser) { PolicyMap policies; policies.Set(key::kFullscreenAllowed, - POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), NULL); + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); UpdateProviderPolicy(policies); BrowserWindow* browser_window = browser()->window(); @@ -2082,8 +2149,10 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, FullscreenAllowedBrowser) { IN_PROC_BROWSER_TEST_F(PolicyTest, FullscreenAllowedApp) { PolicyMap policies; policies.Set(key::kFullscreenAllowed, - POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), NULL); + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); UpdateProviderPolicy(policies); const extensions::Extension* extension = @@ -2143,8 +2212,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DisableAudioOutput) { EXPECT_FALSE(audio_handler->IsOutputMuted()); EXPECT_EQ(1, test_observer->output_mute_changed_count()); PolicyMap policies; - policies.Set(key::kAudioOutputAllowed, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(false), NULL); + policies.Set(key::kAudioOutputAllowed, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); UpdateProviderPolicy(policies); EXPECT_TRUE(audio_handler->IsOutputMuted()); // This should not change the state now and should not trigger output mute @@ -2154,8 +2226,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DisableAudioOutput) { EXPECT_EQ(1, test_observer->output_mute_changed_count()); // Toggle back and observe if the output mute changed event is fired. - policies.Set(key::kAudioOutputAllowed, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true), NULL); + policies.Set(key::kAudioOutputAllowed, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); UpdateProviderPolicy(policies); EXPECT_FALSE(audio_handler->IsOutputMuted()); EXPECT_EQ(1, test_observer->output_mute_changed_count()); @@ -2315,9 +2390,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, LargeCursorEnabled) { // Verify that policy overrides the manual setting. PolicyMap policies; - policies.Set(key::kLargeCursorEnabled, POLICY_LEVEL_MANDATORY, + policies.Set(key::kLargeCursorEnabled, + POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), NULL); + new base::FundamentalValue(false), + NULL); UpdateProviderPolicy(policies); EXPECT_FALSE(accessibility_manager->IsLargeCursorEnabled()); @@ -2339,9 +2416,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, SpokenFeedbackEnabled) { // Verify that policy overrides the manual setting. PolicyMap policies; - policies.Set(key::kSpokenFeedbackEnabled, POLICY_LEVEL_MANDATORY, + policies.Set(key::kSpokenFeedbackEnabled, + POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), NULL); + new base::FundamentalValue(false), + NULL); UpdateProviderPolicy(policies); EXPECT_FALSE(accessibility_manager->IsSpokenFeedbackEnabled()); @@ -2363,9 +2442,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, HighContrastEnabled) { // Verify that policy overrides the manual setting. PolicyMap policies; - policies.Set(key::kHighContrastEnabled, POLICY_LEVEL_MANDATORY, + policies.Set(key::kHighContrastEnabled, + POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), NULL); + new base::FundamentalValue(false), + NULL); UpdateProviderPolicy(policies); EXPECT_FALSE(accessibility_manager->IsHighContrastEnabled()); @@ -2432,9 +2513,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, AccessibilityVirtualKeyboardEnabled) { // Verify that policy overrides the manual setting. PolicyMap policies; - policies.Set(key::kVirtualKeyboardEnabled, POLICY_LEVEL_MANDATORY, + policies.Set(key::kVirtualKeyboardEnabled, + POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), NULL); + new base::FundamentalValue(false), + NULL); UpdateProviderPolicy(policies); EXPECT_FALSE(accessibility_manager->IsVirtualKeyboardEnabled()); @@ -2458,7 +2541,7 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, VirtualKeyboardEnabled) { policies.Set(key::kTouchVirtualKeyboardEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(true), + new base::FundamentalValue(true), NULL); UpdateProviderPolicy(policies); EXPECT_TRUE(keyboard::IsKeyboardEnabled()); @@ -2470,7 +2553,7 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, VirtualKeyboardEnabled) { policies.Set(key::kTouchVirtualKeyboardEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), + new base::FundamentalValue(false), NULL); UpdateProviderPolicy(policies); EXPECT_FALSE(keyboard::IsKeyboardEnabled()); @@ -2540,9 +2623,11 @@ class RestoreOnStartupPolicyTest base::Value::CreateIntegerValue( SessionStartupPref::kPrefValueHomePage), NULL); - policies.Set( - key::kHomepageIsNewTabPage, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), NULL); + policies.Set(key::kHomepageIsNewTabPage, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); policies.Set( key::kHomepageLocation, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, base::Value::CreateStringValue(kRestoredURLs[1]), NULL); @@ -2560,9 +2645,11 @@ class RestoreOnStartupPolicyTest base::Value::CreateIntegerValue( SessionStartupPref::kPrefValueHomePage), NULL); - policies.Set( - key::kHomepageIsNewTabPage, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(true), NULL); + policies.Set(key::kHomepageIsNewTabPage, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); provider_.UpdateChromePolicy(policies); expected_urls_.push_back(GURL(chrome::kChromeUINewTabURL)); @@ -2662,12 +2749,16 @@ class PolicyStatisticsCollectorTest : public PolicyTest { virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { PolicyTest::SetUpInProcessBrowserTestFixture(); PolicyMap policies; - policies.Set( - key::kShowHomeButton, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(true), NULL); - policies.Set( - key::kBookmarkBarEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), NULL); + policies.Set(key::kShowHomeButton, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); + policies.Set(key::kBookmarkBarEnabled, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); policies.Set( key::kHomepageLocation, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, base::Value::CreateStringValue("http://chromium.org"), NULL); @@ -2734,8 +2825,11 @@ class MediaStreamDevicesControllerBrowserTest void ConfigurePolicyMap(PolicyMap* policies, const char* policy_name, const char* whitelist_policy, const char* allow_rule) { - policies->Set(policy_name, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(policy_value_), NULL); + policies->Set(policy_name, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(policy_value_), + NULL); if (whitelist_policy) { // TODO(tommi): Remove the kiosk mode flag when the whitelist is visible diff --git a/chrome/browser/prefs/chrome_pref_service_unittest.cc b/chrome/browser/prefs/chrome_pref_service_unittest.cc index 704dcf0..2940ce8 100644 --- a/chrome/browser/prefs/chrome_pref_service_unittest.cc +++ b/chrome/browser/prefs/chrome_pref_service_unittest.cc @@ -105,9 +105,9 @@ class ChromePrefServiceWebKitPrefs : public ChromeRenderViewHostTestHarness { pref_services->SetUserPref(prefs::kWebKitDefaultFontSize, base::Value::CreateIntegerValue(20)); pref_services->SetUserPref(prefs::kWebKitTextAreasAreResizable, - base::Value::CreateBooleanValue(false)); + new base::FundamentalValue(false)); pref_services->SetUserPref(prefs::kWebKitUsesUniversalDetector, - base::Value::CreateBooleanValue(true)); + new base::FundamentalValue(true)); pref_services->SetUserPref("webkit.webprefs.foo", base::Value::CreateStringValue("bar")); } diff --git a/chrome/browser/prefs/pref_hash_calculator_unittest.cc b/chrome/browser/prefs/pref_hash_calculator_unittest.cc index f8a44bd..356cc56 100644 --- a/chrome/browser/prefs/pref_hash_calculator_unittest.cc +++ b/chrome/browser/prefs/pref_hash_calculator_unittest.cc @@ -81,7 +81,7 @@ TEST(PrefHashCalculatorTest, CatchHashChanges) { static const char kDeviceId[] = "test_device_id1"; scoped_ptr<base::Value> null_value(base::Value::CreateNullValue()); - scoped_ptr<base::Value> bool_value(base::Value::CreateBooleanValue(false)); + scoped_ptr<base::Value> bool_value(new base::FundamentalValue(false)); scoped_ptr<base::Value> int_value( base::Value::CreateIntegerValue(1234567890)); scoped_ptr<base::Value> double_value( diff --git a/chrome/browser/prefs/pref_hash_filter_unittest.cc b/chrome/browser/prefs/pref_hash_filter_unittest.cc index 287b838..cbf12b1 100644 --- a/chrome/browser/prefs/pref_hash_filter_unittest.cc +++ b/chrome/browser/prefs/pref_hash_filter_unittest.cc @@ -569,7 +569,7 @@ TEST_P(PrefHashFilterTest, MultiplePrefsFilterSerializeData) { base::Value* int_value3 = base::Value::CreateIntegerValue(3); base::Value* int_value4 = base::Value::CreateIntegerValue(4); base::DictionaryValue* dict_value = new base::DictionaryValue; - dict_value->Set("a", base::Value::CreateBooleanValue(true)); + dict_value->Set("a", new base::FundamentalValue(true)); root_dict.Set(kAtomicPref, int_value1); root_dict.Set(kAtomicPref2, int_value2); root_dict.Set(kAtomicPref3, int_value3); diff --git a/chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc b/chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc index 7980559..222429b 100644 --- a/chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc +++ b/chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc @@ -192,7 +192,7 @@ IN_PROC_BROWSER_TEST_F(SyncedPrefChangeRegistrarTest, policies.Set(policy::key::kShowHomeButton, policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(true), + new base::FundamentalValue(true), NULL); UpdateChromePolicy(policies); @@ -213,7 +213,7 @@ IN_PROC_BROWSER_TEST_F(SyncedPrefChangeRegistrarTest, policies.Set(policy::key::kShowHomeButton, policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(true), + new base::FundamentalValue(true), NULL); UpdateChromePolicy(policies); diff --git a/chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc b/chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc index f14bf6c..8a0aa91 100644 --- a/chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc +++ b/chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc @@ -277,7 +277,7 @@ TEST_F(CloudPrintProxyPolicyTest, StartWithPolicySetProxyDisabled) { prefs->SetUserPref(prefs::kCloudPrintEmail, base::Value::CreateStringValue(std::string())); prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled, - base::Value::CreateBooleanValue(false)); + new base::FundamentalValue(false)); service.Initialize(); @@ -295,7 +295,7 @@ TEST_F(CloudPrintProxyPolicyTest, StartWithPolicySetProxyEnabled) { prefs->SetUserPref(prefs::kCloudPrintEmail, base::Value::CreateStringValue(std::string())); prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled, - base::Value::CreateBooleanValue(false)); + new base::FundamentalValue(false)); service.Initialize(); @@ -318,7 +318,7 @@ TEST_F(CloudPrintProxyPolicyTest, StartWithNoPolicyProxyDisabledThenSetPolicy) { EXPECT_EQ(std::string(), prefs->GetString(prefs::kCloudPrintEmail)); prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled, - base::Value::CreateBooleanValue(false)); + new base::FundamentalValue(false)); EXPECT_EQ(std::string(), prefs->GetString(prefs::kCloudPrintEmail)); } @@ -341,7 +341,7 @@ TEST_F(CloudPrintProxyPolicyTest, StartWithNoPolicyProxyEnabledThenSetPolicy) { service.GetMockServiceProcessControl()->SetWillBeDisabledExpectations(); prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled, - base::Value::CreateBooleanValue(false)); + new base::FundamentalValue(false)); EXPECT_EQ(std::string(), prefs->GetString(prefs::kCloudPrintEmail)); } @@ -357,7 +357,7 @@ TEST_F(CloudPrintProxyPolicyTest, prefs->SetUserPref(prefs::kCloudPrintEmail, base::Value::CreateStringValue(std::string())); prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled, - base::Value::CreateBooleanValue(false)); + new base::FundamentalValue(false)); service.Initialize(); @@ -378,7 +378,7 @@ TEST_F(CloudPrintProxyPolicyTest, prefs->SetUserPref(prefs::kCloudPrintEmail, base::Value::CreateStringValue(std::string())); prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled, - base::Value::CreateBooleanValue(false)); + new base::FundamentalValue(false)); service.Initialize(); @@ -420,7 +420,7 @@ TEST_F(CloudPrintProxyPolicyTest, prefs->SetUserPref(prefs::kCloudPrintEmail, base::Value::CreateStringValue(std::string())); prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled, - base::Value::CreateBooleanValue(false)); + new base::FundamentalValue(false)); service.Initialize(); @@ -456,7 +456,7 @@ TEST_F(CloudPrintProxyPolicyTest, StartupBrowserCreatorWithCommandLine) { prefs->SetUserPref(prefs::kCloudPrintEmail, base::Value::CreateStringValue(std::string())); prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled, - base::Value::CreateBooleanValue(false)); + new base::FundamentalValue(false)); CloudPrintProxyServiceFactory::GetInstance()-> SetTestingFactory(&profile_, TestCloudPrintProxyServiceFactory); diff --git a/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc b/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc index 5f1c55e..063ba5e 100644 --- a/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc +++ b/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc @@ -604,7 +604,7 @@ TEST_F(CloudPrintProxyPolicyStartupTest, StartBrowserWithPolicy) { base::Value::CreateStringValue( MockServiceIPCServer::EnabledUserId())); prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled, - base::Value::CreateBooleanValue(false)); + new base::FundamentalValue(false)); CommandLine command_line(CommandLine::NO_PROGRAM); command_line.AppendSwitch(switches::kCheckCloudPrintConnectorPolicy); diff --git a/chrome/browser/profiles/incognito_mode_policy_handler_unittest.cc b/chrome/browser/profiles/incognito_mode_policy_handler_unittest.cc index cd60671..f0861c6 100644 --- a/chrome/browser/profiles/incognito_mode_policy_handler_unittest.cc +++ b/chrome/browser/profiles/incognito_mode_policy_handler_unittest.cc @@ -33,10 +33,11 @@ class IncognitoModePolicyHandlerTest int availability) { PolicyMap policy; if (incognito_enabled != INCOGNITO_ENABLED_UNKNOWN) { - policy.Set(key::kIncognitoEnabled, POLICY_LEVEL_MANDATORY, + policy.Set(key::kIncognitoEnabled, + POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue( - incognito_enabled == INCOGNITO_ENABLED_TRUE), + new base::FundamentalValue(incognito_enabled == + INCOGNITO_ENABLED_TRUE), NULL); } if (availability >= 0) { diff --git a/chrome/browser/profiles/profile_manager_unittest.cc b/chrome/browser/profiles/profile_manager_unittest.cc index 291b94b..805975a4 100644 --- a/chrome/browser/profiles/profile_manager_unittest.cc +++ b/chrome/browser/profiles/profile_manager_unittest.cc @@ -440,7 +440,7 @@ TEST_F(ProfileManagerTest, AutoloadProfilesWithBackgroundApps) { ProfileManager* profile_manager = g_browser_process->profile_manager(); ProfileInfoCache& cache = profile_manager->GetProfileInfoCache(); local_state_.Get()->SetUserPref(prefs::kBackgroundModeEnabled, - base::Value::CreateBooleanValue(true)); + new base::FundamentalValue(true)); // Setting a pref which is not applicable to a system (i.e., Android in this // case) does not necessarily create it. Don't bother continuing with the @@ -472,7 +472,7 @@ TEST_F(ProfileManagerTest, DoNotAutoloadProfilesIfBackgroundModeOff) { ProfileManager* profile_manager = g_browser_process->profile_manager(); ProfileInfoCache& cache = profile_manager->GetProfileInfoCache(); local_state_.Get()->SetUserPref(prefs::kBackgroundModeEnabled, - base::Value::CreateBooleanValue(false)); + new base::FundamentalValue(false)); EXPECT_EQ(0u, cache.GetNumberOfProfiles()); cache.AddProfileToCache(cache.GetUserDataDir().AppendASCII("path_1"), diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc index f625399..f4879fb 100644 --- a/chrome/browser/sync/profile_sync_service_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_unittest.cc @@ -295,7 +295,7 @@ TEST_F(ProfileSyncServiceTest, InitialState) { // Verify a successful initialization. TEST_F(ProfileSyncServiceTest, SuccessfulInitialization) { profile()->GetTestingPrefService()->SetManagedPref( - sync_driver::prefs::kSyncManaged, base::Value::CreateBooleanValue(false)); + sync_driver::prefs::kSyncManaged, new base::FundamentalValue(false)); IssueTestTokens(); CreateService(browser_sync::AUTO_START); ExpectDataTypeManagerCreation(1); @@ -327,7 +327,7 @@ TEST_F(ProfileSyncServiceTest, SetupInProgress) { // Verify that disable by enterprise policy works. TEST_F(ProfileSyncServiceTest, DisabledByPolicyBeforeInit) { profile()->GetTestingPrefService()->SetManagedPref( - sync_driver::prefs::kSyncManaged, base::Value::CreateBooleanValue(true)); + sync_driver::prefs::kSyncManaged, new base::FundamentalValue(true)); IssueTestTokens(); CreateService(browser_sync::AUTO_START); Initialize(); @@ -348,7 +348,7 @@ TEST_F(ProfileSyncServiceTest, DisabledByPolicyAfterInit) { EXPECT_TRUE(service()->sync_initialized()); profile()->GetTestingPrefService()->SetManagedPref( - sync_driver::prefs::kSyncManaged, base::Value::CreateBooleanValue(true)); + sync_driver::prefs::kSyncManaged, new base::FundamentalValue(true)); EXPECT_TRUE(service()->IsManaged()); EXPECT_FALSE(service()->sync_initialized()); diff --git a/chrome/browser/sync/sync_policy_handler_unittest.cc b/chrome/browser/sync/sync_policy_handler_unittest.cc index 0efee55..fcaad7c 100644 --- a/chrome/browser/sync/sync_policy_handler_unittest.cc +++ b/chrome/browser/sync/sync_policy_handler_unittest.cc @@ -28,7 +28,7 @@ TEST_F(SyncPolicyHandlerTest, Enabled) { policy.Set(policy::key::kSyncDisabled, policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), + new base::FundamentalValue(false), NULL); SyncPolicyHandler handler; PrefValueMap prefs; @@ -43,7 +43,7 @@ TEST_F(SyncPolicyHandlerTest, Disabled) { policy.Set(policy::key::kSyncDisabled, policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(true), + new base::FundamentalValue(true), NULL); SyncPolicyHandler handler; PrefValueMap prefs; diff --git a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc index a55248c..6601490 100644 --- a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc +++ b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc @@ -1061,8 +1061,10 @@ void StartupBrowserCreatorFirstRunTest::SetUpInProcessBrowserTestFixture() { #if defined(OS_LINUX) && defined(GOOGLE_CHROME_BUILD) // Set a policy that prevents the first-run dialog from being shown. policy_map_.Set(policy::key::kMetricsReportingEnabled, - policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), NULL); + policy::POLICY_LEVEL_MANDATORY, + policy::POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); provider_.UpdateChromePolicy(policy_map_); #endif // defined(OS_LINUX) && defined(GOOGLE_CHROME_BUILD) diff --git a/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc b/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc index 07a8af2..924cea5 100644 --- a/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc +++ b/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc @@ -633,7 +633,7 @@ TEST_F(OneClickSigninHelperTest, CanOfferDisabledByPolicy) { // Simulate a policy disabling signin by writing kSigninAllowed directly. profile()->GetTestingPrefService()->SetManagedPref( - prefs::kSigninAllowed, base::Value::CreateBooleanValue(false)); + prefs::kSigninAllowed, new base::FundamentalValue(false)); EXPECT_FALSE(OneClickSigninHelper::CanOffer( web_contents(), OneClickSigninHelper::CAN_OFFER_FOR_ALL, @@ -641,11 +641,11 @@ TEST_F(OneClickSigninHelperTest, CanOfferDisabledByPolicy) { // Reset the preference value to true. profile()->GetTestingPrefService()->SetManagedPref( - prefs::kSigninAllowed, base::Value::CreateBooleanValue(true)); + prefs::kSigninAllowed, new base::FundamentalValue(true)); // Simulate a policy disabling sync by writing kSyncManaged directly. profile()->GetTestingPrefService()->SetManagedPref( - sync_driver::prefs::kSyncManaged, base::Value::CreateBooleanValue(true)); + sync_driver::prefs::kSyncManaged, new base::FundamentalValue(true)); // Should still offer even if sync is disabled by policy. EXPECT_TRUE(OneClickSigninHelper::CanOffer( @@ -853,19 +853,19 @@ TEST_F(OneClickSigninHelperIOTest, CanOfferOnIOThreadDisabledByPolicy) { // Simulate a policy disabling signin by writing kSigninAllowed directly. // We should not offer to sign in the browser. profile()->GetTestingPrefService()->SetManagedPref( - prefs::kSigninAllowed, base::Value::CreateBooleanValue(false)); + prefs::kSigninAllowed, new base::FundamentalValue(false)); EXPECT_EQ(OneClickSigninHelper::DONT_OFFER, OneClickSigninHelper::CanOfferOnIOThreadImpl( valid_gaia_url_, &request_, io_data.get())); // Reset the preference. profile()->GetTestingPrefService()->SetManagedPref( - prefs::kSigninAllowed, base::Value::CreateBooleanValue(true)); + prefs::kSigninAllowed, new base::FundamentalValue(true)); // Simulate a policy disabling sync by writing kSyncManaged directly. // We should still offer to sign in the browser. profile()->GetTestingPrefService()->SetManagedPref( - sync_driver::prefs::kSyncManaged, base::Value::CreateBooleanValue(true)); + sync_driver::prefs::kSyncManaged, new base::FundamentalValue(true)); EXPECT_EQ(OneClickSigninHelper::CAN_OFFER, OneClickSigninHelper::CanOfferOnIOThreadImpl( valid_gaia_url_, &request_, io_data.get())); diff --git a/chrome/browser/ui/webui/bidi_checker_web_ui_test.cc b/chrome/browser/ui/webui/bidi_checker_web_ui_test.cc index 7f3d6f3..d080707 100644 --- a/chrome/browser/ui/webui/bidi_checker_web_ui_test.cc +++ b/chrome/browser/ui/webui/bidi_checker_web_ui_test.cc @@ -103,7 +103,7 @@ void WebUIBidiCheckerBrowserTest::RunBidiCheckerOnPage( ui_test_utils::NavigateToURL(browser(), GURL(page_url)); ASSERT_TRUE(RunJavascriptTest("runBidiChecker", base::Value::CreateStringValue(page_url), - base::Value::CreateBooleanValue(is_rtl))); + new base::FundamentalValue(is_rtl))); } void WebUIBidiCheckerBrowserTestLTR::RunBidiCheckerOnPage( diff --git a/chrome/browser/ui/webui/policy_ui_browsertest.cc b/chrome/browser/ui/webui/policy_ui_browsertest.cc index 8a41782..e80dc08 100644 --- a/chrome/browser/ui/webui/policy_ui_browsertest.cc +++ b/chrome/browser/ui/webui/policy_ui_browsertest.cc @@ -222,7 +222,7 @@ IN_PROC_BROWSER_TEST_F(PolicyUITest, SendPolicyValues) { values.Set(policy::key::kShowHomeButton, policy::POLICY_LEVEL_RECOMMENDED, policy::POLICY_SCOPE_MACHINE, - base::Value::CreateBooleanValue(true), + new base::FundamentalValue(true), NULL); expected_values[policy::key::kShowHomeButton] = "true"; // Set the value of a policy that does not exist. @@ -230,7 +230,7 @@ IN_PROC_BROWSER_TEST_F(PolicyUITest, SendPolicyValues) { values.Set(kUnknownPolicy, policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(true), + new base::FundamentalValue(true), NULL); expected_values[kUnknownPolicy] = "true"; UpdateProviderPolicy(values); diff --git a/chrome/browser/ui/webui/sync_internals_ui_unittest.cc b/chrome/browser/ui/webui/sync_internals_ui_unittest.cc index 1d58505..5abfa19 100644 --- a/chrome/browser/ui/webui/sync_internals_ui_unittest.cc +++ b/chrome/browser/ui/webui/sync_internals_ui_unittest.cc @@ -123,7 +123,7 @@ TEST_F(SyncInternalsUITestWithService, HandleJsReply) { base::ListValue args; args.Append(base::Value::CreateIntegerValue(5)); - args.Append(base::Value::CreateBooleanValue(true)); + args.Append(new base::FundamentalValue(true)); sync_internals_ui_->HandleJsReply("testMessage", JsArgList(&args)); } @@ -189,7 +189,7 @@ TEST_F(SyncInternalsUITestWithoutService, HandleJsReply) { base::ListValue args; args.Append(base::Value::CreateIntegerValue(5)); - args.Append(base::Value::CreateBooleanValue(true)); + args.Append(new base::FundamentalValue(true)); sync_internals_ui_->HandleJsReply( "testMessage", JsArgList(&args)); } diff --git a/chrome/test/chromedriver/alert_commands.cc b/chrome/test/chromedriver/alert_commands.cc index de7118d..199e7bc 100644 --- a/chrome/test/chromedriver/alert_commands.cc +++ b/chrome/test/chromedriver/alert_commands.cc @@ -44,7 +44,7 @@ Status ExecuteGetAlert( WebView* web_view, const base::DictionaryValue& params, scoped_ptr<base::Value>* value) { - value->reset(base::Value::CreateBooleanValue( + value->reset(new base::FundamentalValue( web_view->GetJavaScriptDialogManager()->IsDialogOpen())); return Status(kOk); } diff --git a/chromeos/dbus/shill_device_client_unittest.cc b/chromeos/dbus/shill_device_client_unittest.cc index b2ad508..0660ae4 100644 --- a/chromeos/dbus/shill_device_client_unittest.cc +++ b/chromeos/dbus/shill_device_client_unittest.cc @@ -127,7 +127,7 @@ TEST_F(ShillDeviceClientTest, GetProperties) { // Set expectations. base::DictionaryValue value; value.SetWithoutPathExpansion(shill::kCellularAllowRoamingProperty, - base::Value::CreateBooleanValue(kValue)); + new base::FundamentalValue(kValue)); PrepareForMethodCall(shill::kGetPropertiesFunction, base::Bind(&ExpectNoArgument), response.get()); diff --git a/chromeos/dbus/shill_manager_client_unittest.cc b/chromeos/dbus/shill_manager_client_unittest.cc index cca19cc..a5c6c7a 100644 --- a/chromeos/dbus/shill_manager_client_unittest.cc +++ b/chromeos/dbus/shill_manager_client_unittest.cc @@ -120,7 +120,7 @@ TEST_F(ShillManagerClientTest, GetProperties) { // Create the expected value. base::DictionaryValue value; value.SetWithoutPathExpansion(shill::kOfflineModeProperty, - base::Value::CreateBooleanValue(true)); + new base::FundamentalValue(true)); // Set expectations. PrepareForMethodCall(shill::kGetPropertiesFunction, base::Bind(&ExpectNoArgument), diff --git a/chromeos/dbus/shill_profile_client_unittest.cc b/chromeos/dbus/shill_profile_client_unittest.cc index c015bfa..223cd73 100644 --- a/chromeos/dbus/shill_profile_client_unittest.cc +++ b/chromeos/dbus/shill_profile_client_unittest.cc @@ -167,7 +167,7 @@ TEST_F(ShillProfileClientTest, DeleteEntry) { // Create the expected value. base::DictionaryValue value; value.SetWithoutPathExpansion(shill::kOfflineModeProperty, - base::Value::CreateBooleanValue(true)); + new base::FundamentalValue(true)); // Set expectations. PrepareForMethodCall(shill::kDeleteEntryFunction, base::Bind(&ExpectStringArgument, kExampleEntryPath), diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc b/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc index 115f780..e59a0af 100644 --- a/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc +++ b/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc @@ -269,7 +269,7 @@ void DataReductionProxySettingsTestBase::CheckOnPrefChange( expected_enabled ? 1 : 0); if (managed) { pref_service_.SetManagedPref(prefs::kDataReductionProxyEnabled, - base::Value::CreateBooleanValue(enabled)); + new base::FundamentalValue(enabled)); } else { pref_service_.SetBoolean(prefs::kDataReductionProxyEnabled, enabled); } diff --git a/components/password_manager/core/browser/password_manager_unittest.cc b/components/password_manager/core/browser/password_manager_unittest.cc index f1b5e33..f84e8bb 100644 --- a/components/password_manager/core/browser/password_manager_unittest.cc +++ b/components/password_manager/core/browser/password_manager_unittest.cc @@ -547,10 +547,10 @@ TEST_F(PasswordManagerTest, SavingDependsOnManagerEnabledPreference) { // Test that saving passwords depends on the password manager enabled // preference. prefs_.SetUserPref(prefs::kPasswordManagerSavingEnabled, - base::Value::CreateBooleanValue(true)); + new base::FundamentalValue(true)); EXPECT_TRUE(manager()->IsSavingEnabledForCurrentPage()); prefs_.SetUserPref(prefs::kPasswordManagerSavingEnabled, - base::Value::CreateBooleanValue(false)); + new base::FundamentalValue(false)); EXPECT_FALSE(manager()->IsSavingEnabledForCurrentPage()); } @@ -561,7 +561,7 @@ TEST_F(PasswordManagerTest, FillPasswordsOnDisabledManager) { PasswordForm* existing = new PasswordForm(MakeSimpleForm()); result.push_back(existing); prefs_.SetUserPref(prefs::kPasswordManagerSavingEnabled, - base::Value::CreateBooleanValue(false)); + new base::FundamentalValue(false)); EXPECT_CALL(driver_, FillPasswordForm(_)); EXPECT_CALL(*store_.get(), GetLogins(_, testing::Eq(PasswordStore::DISALLOW_PROMPT), _)) diff --git a/components/policy/core/browser/autofill_policy_handler_unittest.cc b/components/policy/core/browser/autofill_policy_handler_unittest.cc index 223d2aa..f84f5e6 100644 --- a/components/policy/core/browser/autofill_policy_handler_unittest.cc +++ b/components/policy/core/browser/autofill_policy_handler_unittest.cc @@ -28,7 +28,7 @@ TEST_F(AutofillPolicyHandlerTest, Enabled) { policy.Set(key::kAutoFillEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(true), + new base::FundamentalValue(true), NULL); PrefValueMap prefs; AutofillPolicyHandler handler; @@ -43,7 +43,7 @@ TEST_F(AutofillPolicyHandlerTest, Disabled) { policy.Set(key::kAutoFillEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), + new base::FundamentalValue(false), NULL); PrefValueMap prefs; AutofillPolicyHandler handler; diff --git a/components/policy/core/browser/configuration_policy_pref_store_unittest.cc b/components/policy/core/browser/configuration_policy_pref_store_unittest.cc index 5e516b7..e307f98 100644 --- a/components/policy/core/browser/configuration_policy_pref_store_unittest.cc +++ b/components/policy/core/browser/configuration_policy_pref_store_unittest.cc @@ -106,8 +106,11 @@ TEST_F(ConfigurationPolicyPrefStoreBooleanTest, GetDefault) { TEST_F(ConfigurationPolicyPrefStoreBooleanTest, SetValue) { PolicyMap policy; - policy.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(false), NULL); + policy.Set(kTestPolicy, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); UpdateProviderPolicy(policy); const base::Value* value = NULL; EXPECT_TRUE(store_->GetValue(kTestPref, &value)); @@ -117,8 +120,11 @@ TEST_F(ConfigurationPolicyPrefStoreBooleanTest, SetValue) { ASSERT_TRUE(result); EXPECT_FALSE(boolean_value); - policy.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true), NULL); + policy.Set(kTestPolicy, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); UpdateProviderPolicy(policy); value = NULL; EXPECT_TRUE(store_->GetValue(kTestPref, &value)); diff --git a/components/policy/core/browser/url_blacklist_policy_handler_unittest.cc b/components/policy/core/browser/url_blacklist_policy_handler_unittest.cc index fa52fbe..282bbe4 100644 --- a/components/policy/core/browser/url_blacklist_policy_handler_unittest.cc +++ b/components/policy/core/browser/url_blacklist_policy_handler_unittest.cc @@ -60,8 +60,8 @@ TEST_F(URLBlacklistPolicyHandlerTest, TEST_F(URLBlacklistPolicyHandlerTest, CheckPolicySettings_DisabledSchemesWrongType) { // The policy expects a list. Give it a boolean. - EXPECT_TRUE(CheckPolicy(key::kDisabledSchemes, - base::Value::CreateBooleanValue(false))); + EXPECT_TRUE( + CheckPolicy(key::kDisabledSchemes, new base::FundamentalValue(false))); EXPECT_EQ(1U, errors_.size()); const std::string expected = key::kDisabledSchemes; const std::string actual = errors_.begin()->first; @@ -71,8 +71,8 @@ TEST_F(URLBlacklistPolicyHandlerTest, TEST_F(URLBlacklistPolicyHandlerTest, CheckPolicySettings_URLBlacklistWrongType) { // The policy expects a list. Give it a boolean. - EXPECT_TRUE(CheckPolicy(key::kURLBlacklist, - base::Value::CreateBooleanValue(false))); + EXPECT_TRUE( + CheckPolicy(key::kURLBlacklist, new base::FundamentalValue(false))); EXPECT_EQ(1U, errors_.size()); const std::string expected = key::kURLBlacklist; const std::string actual = errors_.begin()->first; @@ -87,7 +87,7 @@ TEST_F(URLBlacklistPolicyHandlerTest, ApplyPolicySettings_NothingSpecified) { TEST_F(URLBlacklistPolicyHandlerTest, ApplyPolicySettings_DisabledSchemesWrongType) { // The policy expects a list. Give it a boolean. - SetPolicy(key::kDisabledSchemes, base::Value::CreateBooleanValue(false)); + SetPolicy(key::kDisabledSchemes, new base::FundamentalValue(false)); ApplyPolicies(); EXPECT_FALSE(prefs_.GetValue(policy_prefs::kUrlBlacklist, NULL)); } @@ -95,7 +95,7 @@ TEST_F(URLBlacklistPolicyHandlerTest, TEST_F(URLBlacklistPolicyHandlerTest, ApplyPolicySettings_URLBlacklistWrongType) { // The policy expects a list. Give it a boolean. - SetPolicy(key::kURLBlacklist, base::Value::CreateBooleanValue(false)); + SetPolicy(key::kURLBlacklist, new base::FundamentalValue(false)); ApplyPolicies(); EXPECT_FALSE(prefs_.GetValue(policy_prefs::kUrlBlacklist, NULL)); } diff --git a/components/policy/core/common/cloud/cloud_policy_manager_unittest.cc b/components/policy/core/common/cloud/cloud_policy_manager_unittest.cc index 785bd93..74a84d5 100644 --- a/components/policy/core/common/cloud/cloud_policy_manager_unittest.cc +++ b/components/policy/core/common/cloud/cloud_policy_manager_unittest.cc @@ -104,8 +104,11 @@ void TestHarness::InstallIntegerPolicy(const std::string& policy_name, void TestHarness::InstallBooleanPolicy(const std::string& policy_name, bool policy_value) { - store_.policy_map_.Set(policy_name, policy_level(), policy_scope(), - base::Value::CreateBooleanValue(policy_value), NULL); + store_.policy_map_.Set(policy_name, + policy_level(), + policy_scope(), + new base::FundamentalValue(policy_value), + NULL); } void TestHarness::InstallStringListPolicy(const std::string& policy_name, diff --git a/components/policy/core/common/policy_bundle_unittest.cc b/components/policy/core/common/policy_bundle_unittest.cc index 351e705..4f9a37e 100644 --- a/components/policy/core/common/policy_bundle_unittest.cc +++ b/components/policy/core/common/policy_bundle_unittest.cc @@ -34,8 +34,11 @@ void AddTestPolicies(PolicyMap* policy) { NULL); policy->Set("mandatory-machine", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, base::Value::CreateStringValue("omg"), NULL); - policy->Set("recommended-user", POLICY_LEVEL_RECOMMENDED, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true), NULL); + policy->Set("recommended-user", + POLICY_LEVEL_RECOMMENDED, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetBoolean("false", false); dict->SetInteger("int", 456); diff --git a/components/policy/core/common/policy_map_unittest.cc b/components/policy/core/common/policy_map_unittest.cc index 4a0dd9f..ad90c62 100644 --- a/components/policy/core/common/policy_map_unittest.cc +++ b/components/policy/core/common/policy_map_unittest.cc @@ -85,7 +85,7 @@ TEST_F(PolicyMapTest, Equals) { SetPolicy(&b, kTestPolicyName1, base::Value::CreateStringValue("bbb")); PolicyMap c; SetPolicy(&c, kTestPolicyName1, base::Value::CreateStringValue("aaa")); - SetPolicy(&c, kTestPolicyName2, base::Value::CreateBooleanValue(true)); + SetPolicy(&c, kTestPolicyName2, new base::FundamentalValue(true)); PolicyMap d; SetPolicy(&d, kTestPolicyName1, CreateExternalDataFetcher("ddd").release()); @@ -134,7 +134,7 @@ TEST_F(PolicyMapTest, Swap) { CreateExternalDataFetcher("dummy").release()); PolicyMap b; SetPolicy(&b, kTestPolicyName1, base::Value::CreateStringValue("bbb")); - SetPolicy(&b, kTestPolicyName3, base::Value::CreateBooleanValue(true)); + SetPolicy(&b, kTestPolicyName3, new base::FundamentalValue(true)); a.Swap(&b); base::StringValue expected("bbb"); @@ -163,13 +163,19 @@ TEST_F(PolicyMapTest, MergeFrom) { PolicyMap a; a.Set(kTestPolicyName1, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, base::Value::CreateStringValue("google.com"), NULL); - a.Set(kTestPolicyName2, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, - base::Value::CreateBooleanValue(true), NULL); + a.Set(kTestPolicyName2, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_MACHINE, + new base::FundamentalValue(true), + NULL); a.Set(kTestPolicyName3, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, NULL, CreateExternalDataFetcher("a").release()); - a.Set(kTestPolicyName4, POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), NULL); + a.Set(kTestPolicyName4, + POLICY_LEVEL_RECOMMENDED, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); a.Set(kTestPolicyName5, POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_MACHINE, base::Value::CreateStringValue("google.com/q={x}"), NULL); @@ -177,13 +183,19 @@ TEST_F(PolicyMapTest, MergeFrom) { PolicyMap b; b.Set(kTestPolicyName1, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, base::Value::CreateStringValue("chromium.org"), NULL); - b.Set(kTestPolicyName2, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, - base::Value::CreateBooleanValue(false), NULL); + b.Set(kTestPolicyName2, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_MACHINE, + new base::FundamentalValue(false), + NULL); b.Set(kTestPolicyName3, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, NULL, CreateExternalDataFetcher("b").release()); - b.Set(kTestPolicyName4, POLICY_LEVEL_RECOMMENDED, - POLICY_SCOPE_MACHINE, base::Value::CreateBooleanValue(true), NULL); + b.Set(kTestPolicyName4, + POLICY_LEVEL_RECOMMENDED, + POLICY_SCOPE_MACHINE, + new base::FundamentalValue(true), + NULL); b.Set(kTestPolicyName5, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, @@ -192,7 +204,7 @@ TEST_F(PolicyMapTest, MergeFrom) { b.Set(kTestPolicyName6, POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(true), + new base::FundamentalValue(true), NULL); a.MergeFrom(b); @@ -202,14 +214,20 @@ TEST_F(PolicyMapTest, MergeFrom) { c.Set(kTestPolicyName1, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, base::Value::CreateStringValue("chromium.org"), NULL); // |a| has precedence over |b|. - c.Set(kTestPolicyName2, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, - base::Value::CreateBooleanValue(true), NULL); + c.Set(kTestPolicyName2, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_MACHINE, + new base::FundamentalValue(true), + NULL); c.Set(kTestPolicyName3, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, NULL, CreateExternalDataFetcher("a").release()); // POLICY_SCOPE_MACHINE over POLICY_SCOPE_USER for POLICY_LEVEL_RECOMMENDED. - c.Set(kTestPolicyName4, POLICY_LEVEL_RECOMMENDED, - POLICY_SCOPE_MACHINE, base::Value::CreateBooleanValue(true), NULL); + c.Set(kTestPolicyName4, + POLICY_LEVEL_RECOMMENDED, + POLICY_SCOPE_MACHINE, + new base::FundamentalValue(true), + NULL); // POLICY_LEVEL_MANDATORY over POLICY_LEVEL_RECOMMENDED. c.Set(kTestPolicyName5, POLICY_LEVEL_MANDATORY, @@ -217,8 +235,11 @@ TEST_F(PolicyMapTest, MergeFrom) { base::Value::CreateStringValue(std::string()), NULL); // Merge new ones. - c.Set(kTestPolicyName6, POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(true), NULL); + c.Set(kTestPolicyName6, + POLICY_LEVEL_RECOMMENDED, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); EXPECT_TRUE(a.Equals(c)); } @@ -230,18 +251,27 @@ TEST_F(PolicyMapTest, GetDifferingKeys) { a.Set(kTestPolicyName2, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, NULL, CreateExternalDataFetcher("dummy").release()); - a.Set(kTestPolicyName3, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, - base::Value::CreateBooleanValue(true), NULL); + a.Set(kTestPolicyName3, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_MACHINE, + new base::FundamentalValue(true), + NULL); a.Set(kTestPolicyName4, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, NULL, CreateExternalDataFetcher("a").release()); - a.Set(kTestPolicyName5, POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), NULL); + a.Set(kTestPolicyName5, + POLICY_LEVEL_RECOMMENDED, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); a.Set(kTestPolicyName6, POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_MACHINE, base::Value::CreateStringValue("google.com/q={x}"), NULL); - a.Set(kTestPolicyName7, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(true), NULL); + a.Set(kTestPolicyName7, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); PolicyMap b; b.Set(kTestPolicyName1, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, @@ -249,18 +279,27 @@ TEST_F(PolicyMapTest, GetDifferingKeys) { b.Set(kTestPolicyName2, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, NULL, CreateExternalDataFetcher("dummy").release()); - b.Set(kTestPolicyName3, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, - base::Value::CreateBooleanValue(false), NULL); + b.Set(kTestPolicyName3, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_MACHINE, + new base::FundamentalValue(false), + NULL); b.Set(kTestPolicyName4, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, NULL, CreateExternalDataFetcher("b").release()); - b.Set(kTestPolicyName5, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), NULL); + b.Set(kTestPolicyName5, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); b.Set(kTestPolicyName6, POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER, base::Value::CreateStringValue("google.com/q={x}"), NULL); - b.Set(kTestPolicyName8, POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(true), NULL); + b.Set(kTestPolicyName8, + POLICY_LEVEL_RECOMMENDED, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); std::set<std::string> diff; std::set<std::string> diff2; diff --git a/components/policy/core/common/policy_statistics_collector_unittest.cc b/components/policy/core/common/policy_statistics_collector_unittest.cc index 3c1a0ca..4736c07 100644 --- a/components/policy/core/common/policy_statistics_collector_unittest.cc +++ b/components/policy/core/common/policy_statistics_collector_unittest.cc @@ -106,8 +106,11 @@ class PolicyStatisticsCollectorTest : public testing::Test { } void SetPolicy(const std::string& name) { - policy_map_.Set(name, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(true), NULL); + policy_map_.Set(name, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); } base::TimeDelta GetFirstDelay() const { diff --git a/components/policy/core/common/schema_map_unittest.cc b/components/policy/core/common/schema_map_unittest.cc index a8bfb63..ba9f35c 100644 --- a/components/policy/core/common/schema_map_unittest.cc +++ b/components/policy/core/common/schema_map_unittest.cc @@ -163,8 +163,11 @@ TEST_F(SchemaMapTest, FilterBundle) { list.AppendString("b"); map.Set("list", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, list.DeepCopy(), NULL); - map.Set("boolean", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(true), NULL); + map.Set("boolean", + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); map.Set("integer", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, @@ -195,21 +198,36 @@ TEST_F(SchemaMapTest, FilterBundle) { // Mismatched types are also removed. bundle.Clear(); PolicyMap& badmap = bundle.Get(extension_ns); - badmap.Set("list", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), NULL); + badmap.Set("list", + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); badmap.Set("boolean", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, new base::FundamentalValue(0), NULL); - badmap.Set("integer", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), NULL); - badmap.Set("null", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), NULL); - badmap.Set("double", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), NULL); - badmap.Set("object", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), NULL); + badmap.Set("integer", + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); + badmap.Set("null", + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); + badmap.Set("double", + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); + badmap.Set("object", + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); badmap.Set("string", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, NULL, new ExternalDataFetcher(base::WeakPtr<ExternalDataManager>(), diff --git a/components/search_engines/default_search_policy_handler_unittest.cc b/components/search_engines/default_search_policy_handler_unittest.cc index a79b5a6..c3c37ce 100644 --- a/components/search_engines/default_search_policy_handler_unittest.cc +++ b/components/search_engines/default_search_policy_handler_unittest.cc @@ -82,8 +82,11 @@ void DefaultSearchPolicyHandlerTest:: base::ListValue* encodings = new base::ListValue(); encodings->AppendString("UTF-16"); encodings->AppendString("UTF-8"); - policy->Set(key::kDefaultSearchProviderEnabled, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true), NULL); + policy->Set(key::kDefaultSearchProviderEnabled, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); policy->Set(key::kDefaultSearchProviderSearchURL, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, base::Value::CreateStringValue(kSearchURL), NULL); @@ -120,8 +123,11 @@ void DefaultSearchPolicyHandlerTest:: // search URL, that all the elements have been given proper defaults. TEST_F(DefaultSearchPolicyHandlerTest, MinimallyDefined) { PolicyMap policy; - policy.Set(key::kDefaultSearchProviderEnabled, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true), NULL); + policy.Set(key::kDefaultSearchProviderEnabled, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(true), + NULL); policy.Set(key::kDefaultSearchProviderSearchURL, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, base::Value::CreateStringValue(kSearchURL), NULL); @@ -297,8 +303,11 @@ TEST_F(DefaultSearchPolicyHandlerTest, Invalid) { // default search policy will be present. TEST_F(DefaultSearchPolicyHandlerTest, Disabled) { PolicyMap policy; - policy.Set(key::kDefaultSearchProviderEnabled, POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, base::Value::CreateBooleanValue(false), NULL); + policy.Set(key::kDefaultSearchProviderEnabled, + POLICY_LEVEL_MANDATORY, + POLICY_SCOPE_USER, + new base::FundamentalValue(false), + NULL); UpdateProviderPolicy(policy); const base::Value* value = NULL; @@ -380,7 +389,7 @@ TEST_F(DefaultSearchPolicyHandlerTest, DictionaryPrefDSEDisabled) { policy.Set(key::kDefaultSearchProviderEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(false), + new base::FundamentalValue(false), NULL); UpdateProviderPolicy(policy); const base::Value* temp = NULL; @@ -400,7 +409,7 @@ TEST_F(DefaultSearchPolicyHandlerTest, DictionaryPrefMinimallyDefined) { policy.Set(key::kDefaultSearchProviderEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(true), + new base::FundamentalValue(true), NULL); policy.Set(key::kDefaultSearchProviderSearchURL, POLICY_LEVEL_MANDATORY, @@ -462,7 +471,7 @@ TEST_F(DefaultSearchPolicyHandlerTest, DictionaryPrefFileURL) { policy.Set(key::kDefaultSearchProviderEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, - base::Value::CreateBooleanValue(true), + new base::FundamentalValue(true), NULL); policy.Set(key::kDefaultSearchProviderSearchURL, POLICY_LEVEL_MANDATORY, diff --git a/tools/json_schema_compiler/test/any_unittest.cc b/tools/json_schema_compiler/test/any_unittest.cc index 7e3215f..039bd15 100644 --- a/tools/json_schema_compiler/test/any_unittest.cc +++ b/tools/json_schema_compiler/test/any_unittest.cc @@ -48,7 +48,7 @@ TEST(JsonSchemaCompilerAnyTest, OptionalAnyParamsCreate) { } { scoped_ptr<base::ListValue> params_value(new base::ListValue()); - scoped_ptr<base::Value> param(base::Value::CreateBooleanValue(true)); + scoped_ptr<base::Value> param(new base::FundamentalValue(true)); params_value->Append(param->DeepCopy()); scoped_ptr<OptionalAny::Params> params( OptionalAny::Params::Create(*params_value)); diff --git a/tools/json_schema_compiler/test/arrays_unittest.cc b/tools/json_schema_compiler/test/arrays_unittest.cc index 204f81a..ea25244 100644 --- a/tools/json_schema_compiler/test/arrays_unittest.cc +++ b/tools/json_schema_compiler/test/arrays_unittest.cc @@ -24,8 +24,8 @@ static scoped_ptr<base::DictionaryValue> CreateBasicArrayTypeDictionary() { integers_value->Append(new base::FundamentalValue(2)); integers_value->Append(new base::FundamentalValue(3)); base::ListValue* booleans_value = new base::ListValue(); - booleans_value->Append(base::Value::CreateBooleanValue(false)); - booleans_value->Append(base::Value::CreateBooleanValue(true)); + booleans_value->Append(new base::FundamentalValue(false)); + booleans_value->Append(new base::FundamentalValue(true)); base::ListValue* numbers_value = new base::ListValue(); numbers_value->Append(base::Value::CreateDoubleValue(6.1)); value->Set("numbers", numbers_value); diff --git a/tools/json_schema_compiler/test/choices_unittest.cc b/tools/json_schema_compiler/test/choices_unittest.cc index 159f10f..5253cd9 100644 --- a/tools/json_schema_compiler/test/choices_unittest.cc +++ b/tools/json_schema_compiler/test/choices_unittest.cc @@ -18,8 +18,8 @@ using json_schema_compiler::test_util::Vector; TEST(JsonSchemaCompilerChoicesTest, TakesIntegersParamsCreate) { { - scoped_ptr<TakesIntegers::Params> params(TakesIntegers::Params::Create( - *List(base::Value::CreateBooleanValue(true)))); + scoped_ptr<TakesIntegers::Params> params( + TakesIntegers::Params::Create(*List(new base::FundamentalValue(true)))); EXPECT_FALSE(params); } { diff --git a/tools/json_schema_compiler/test/crossref_unittest.cc b/tools/json_schema_compiler/test/crossref_unittest.cc index 30e565b..42550ad 100644 --- a/tools/json_schema_compiler/test/crossref_unittest.cc +++ b/tools/json_schema_compiler/test/crossref_unittest.cc @@ -17,8 +17,7 @@ static scoped_ptr<base::DictionaryValue> CreateTestTypeDictionary() { value->SetWithoutPathExpansion("integer", new base::FundamentalValue(4)); value->SetWithoutPathExpansion("string", base::Value::CreateStringValue("bling")); - value->SetWithoutPathExpansion("boolean", - base::Value::CreateBooleanValue(true)); + value->SetWithoutPathExpansion("boolean", new base::FundamentalValue(true)); return scoped_ptr<base::DictionaryValue>(value); } @@ -77,7 +76,7 @@ TEST(JsonSchemaCompilerCrossrefTest, TestTypeInObjectParamsCreate) { scoped_ptr<base::DictionaryValue> param_object_value( new base::DictionaryValue()); param_object_value->Set("testType", CreateTestTypeDictionary().release()); - param_object_value->Set("boolean", base::Value::CreateBooleanValue(true)); + param_object_value->Set("boolean", new base::FundamentalValue(true)); params_value->Append(param_object_value.release()); scoped_ptr<TestTypeInObject::Params> params( TestTypeInObject::Params::Create(*params_value)); @@ -91,7 +90,7 @@ TEST(JsonSchemaCompilerCrossrefTest, TestTypeInObjectParamsCreate) { scoped_ptr<base::ListValue> params_value(new base::ListValue()); scoped_ptr<base::DictionaryValue> param_object_value( new base::DictionaryValue()); - param_object_value->Set("boolean", base::Value::CreateBooleanValue(true)); + param_object_value->Set("boolean", new base::FundamentalValue(true)); params_value->Append(param_object_value.release()); scoped_ptr<TestTypeInObject::Params> params( TestTypeInObject::Params::Create(*params_value)); @@ -105,7 +104,7 @@ TEST(JsonSchemaCompilerCrossrefTest, TestTypeInObjectParamsCreate) { new base::DictionaryValue()); param_object_value->Set("testType", base::Value::CreateStringValue("invalid")); - param_object_value->Set("boolean", base::Value::CreateBooleanValue(true)); + param_object_value->Set("boolean", new base::FundamentalValue(true)); params_value->Append(param_object_value.release()); scoped_ptr<TestTypeInObject::Params> params( TestTypeInObject::Params::Create(*params_value)); diff --git a/tools/json_schema_compiler/test/objects_unittest.cc b/tools/json_schema_compiler/test/objects_unittest.cc index 485e1d6..a24ca3b 100644 --- a/tools/json_schema_compiler/test/objects_unittest.cc +++ b/tools/json_schema_compiler/test/objects_unittest.cc @@ -17,7 +17,7 @@ TEST(JsonSchemaCompilerObjectsTest, ObjectParamParamsCreate) { scoped_ptr<base::DictionaryValue> info_value(new base::DictionaryValue()); info_value->Set("strings", strings.release()); info_value->Set("integer", new base::FundamentalValue(5)); - info_value->Set("boolean", base::Value::CreateBooleanValue(true)); + info_value->Set("boolean", new base::FundamentalValue(true)); scoped_ptr<base::ListValue> params_value(new base::ListValue()); params_value->Append(info_value.release()); diff --git a/tools/json_schema_compiler/test/simple_api_unittest.cc b/tools/json_schema_compiler/test/simple_api_unittest.cc index 6802feb..0cf3fb8 100644 --- a/tools/json_schema_compiler/test/simple_api_unittest.cc +++ b/tools/json_schema_compiler/test/simple_api_unittest.cc @@ -17,8 +17,7 @@ static scoped_ptr<base::DictionaryValue> CreateTestTypeDictionary() { value->SetWithoutPathExpansion("integer", new base::FundamentalValue(4)); value->SetWithoutPathExpansion("string", base::Value::CreateStringValue("bling")); - value->SetWithoutPathExpansion("boolean", - base::Value::CreateBooleanValue(true)); + value->SetWithoutPathExpansion("boolean", new base::FundamentalValue(true)); return value.Pass(); } |