diff options
40 files changed, 124 insertions, 121 deletions
diff --git a/base/values.h b/base/values.h index ebb909b..bf54bd1 100644 --- a/base/values.h +++ b/base/values.h @@ -465,7 +465,6 @@ class BASE_EXPORT ValueSerializer { // http://crbug.com/88666 using base::DictionaryValue; -using base::FundamentalValue; using base::ListValue; using base::StringValue; using base::Value; diff --git a/chrome/browser/chromeos/login/user_manager.cc b/chrome/browser/chromeos/login/user_manager.cc index 0b92574..4683c2d 100644 --- a/chrome/browser/chromeos/login/user_manager.cc +++ b/chrome/browser/chromeos/login/user_manager.cc @@ -62,7 +62,7 @@ void SaveOAuthTokenStatusToLocalState(const std::string& username, PrefService* local_state = g_browser_process->local_state(); DictionaryPrefUpdate oauth_status_update(local_state, kUserOAuthTokenStatus); oauth_status_update->SetWithoutPathExpansion(username, - new FundamentalValue(static_cast<int>(oauth_token_status))); + new base::FundamentalValue(static_cast<int>(oauth_token_status))); DVLOG(1) << "Saving user OAuth token status in Local State."; local_state->SavePersistentPrefs(); } diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc index a1a2a71..52e2d13b 100644 --- a/chrome/browser/debugger/devtools_window.cc +++ b/chrome/browser/debugger/devtools_window.cc @@ -373,7 +373,7 @@ void DevToolsWindow::UpdateFrontendAttachedState() { void DevToolsWindow::AddDevToolsExtensionsToClient() { if (inspected_tab_) { - FundamentalValue tabId( + base::FundamentalValue tabId( inspected_tab_->restore_tab_helper()->session_id().id()); CallClientFunction(ASCIIToUTF16("WebInspector.setInspectedTabId"), tabId); } diff --git a/chrome/browser/extensions/extension_file_browser_private_api.cc b/chrome/browser/extensions/extension_file_browser_private_api.cc index eafd113..f8d372a 100644 --- a/chrome/browser/extensions/extension_file_browser_private_api.cc +++ b/chrome/browser/extensions/extension_file_browser_private_api.cc @@ -233,7 +233,7 @@ void UpdateFileHandlerUsageStats(Profile* profile, const std::string& task_id) { DictionaryPrefUpdate prefs_usage_update(profile->GetPrefs(), prefs::kLastUsedFileBrowserHandlers); prefs_usage_update->SetWithoutPathExpansion(task_id, - new FundamentalValue( + new base::FundamentalValue( static_cast<int>(base::Time::Now().ToInternalValue()/ base::Time::kMicrosecondsPerSecond))); } @@ -798,7 +798,7 @@ bool ExecuteTasksFileBrowserFunction::InitiateFileTaskExecution( source_url_, task_id, file_urls)); - result_.reset(new FundamentalValue(true)); + result_.reset(new base::FundamentalValue(true)); return true; } diff --git a/chrome/browser/extensions/extensions_quota_service_unittest.cc b/chrome/browser/extensions/extensions_quota_service_unittest.cc index 07c724f..83d0bce 100644 --- a/chrome/browser/extensions/extensions_quota_service_unittest.cc +++ b/chrome/browser/extensions/extensions_quota_service_unittest.cc @@ -201,14 +201,14 @@ TEST_F(ExtensionsQuotaServiceTest, NoHeuristic) { TEST_F(ExtensionsQuotaServiceTest, FrozenHeuristic) { scoped_refptr<MockFunction> f(new FrozenMockFunction("foo")); ListValue args; - args.Append(new FundamentalValue(1)); + args.Append(new base::FundamentalValue(1)); EXPECT_FALSE(service_->Assess(extension_a_, f, &args, kStartTime)); } TEST_F(ExtensionsQuotaServiceTest, SingleHeuristic) { scoped_refptr<MockFunction> f(new TimedLimitMockFunction("foo")); ListValue args; - args.Append(new FundamentalValue(1)); + args.Append(new base::FundamentalValue(1)); EXPECT_TRUE(service_->Assess(extension_a_, f, &args, kStartTime)); EXPECT_TRUE(service_->Assess(extension_a_, f, &args, kStartTime + TimeDelta::FromSeconds(10))); @@ -216,8 +216,8 @@ TEST_F(ExtensionsQuotaServiceTest, SingleHeuristic) { kStartTime + TimeDelta::FromSeconds(15))); ListValue args2; - args2.Append(new FundamentalValue(1)); - args2.Append(new FundamentalValue(2)); + args2.Append(new base::FundamentalValue(1)); + args2.Append(new base::FundamentalValue(2)); EXPECT_TRUE(service_->Assess(extension_b_, f, &args2, kStartTime)); EXPECT_TRUE(service_->Assess(extension_b_, f, &args2, kStartTime + TimeDelta::FromSeconds(10))); @@ -231,7 +231,7 @@ TEST_F(ExtensionsQuotaServiceTest, SingleHeuristic) { // Test that items are independent. ListValue args3; - args3.Append(new FundamentalValue(3)); + args3.Append(new base::FundamentalValue(3)); EXPECT_TRUE(service_->Assess(extension_c_, f, &args, kStartTime)); EXPECT_TRUE(service_->Assess(extension_c_, f, &args3, kStartTime + TimeDelta::FromSeconds(10))); @@ -248,7 +248,7 @@ TEST_F(ExtensionsQuotaServiceTest, SingleHeuristic) { TEST_F(ExtensionsQuotaServiceTest, ChainedHeuristics) { scoped_refptr<MockFunction> f(new ChainedLimitsMockFunction("foo")); ListValue args; - args.Append(new FundamentalValue(1)); + args.Append(new base::FundamentalValue(1)); // First, test that the low limit can be avoided but the higher one is hit. // One event per minute for 20 minutes comes in under the sustained limit, @@ -282,8 +282,8 @@ TEST_F(ExtensionsQuotaServiceTest, MultipleFunctionsDontInterfere) { ListValue args_f; ListValue args_g; - args_f.Append(new FundamentalValue(1)); - args_g.Append(new FundamentalValue(2)); + args_f.Append(new base::FundamentalValue(1)); + args_g.Append(new base::FundamentalValue(2)); EXPECT_TRUE(service_->Assess(extension_a_, f, &args_f, kStartTime)); EXPECT_TRUE(service_->Assess(extension_a_, g, &args_g, kStartTime)); @@ -301,7 +301,7 @@ TEST_F(ExtensionsQuotaServiceTest, ViolatorsWillBeViolators) { scoped_refptr<MockFunction> f(new TimedLimitMockFunction("foo")); scoped_refptr<MockFunction> g(new TimedLimitMockFunction("bar")); ListValue arg; - arg.Append(new FundamentalValue(1)); + arg.Append(new base::FundamentalValue(1)); EXPECT_TRUE(service_->Assess(extension_a_, f, &arg, kStartTime)); EXPECT_TRUE(service_->Assess(extension_a_, f, &arg, kStartTime + TimeDelta::FromSeconds(10))); diff --git a/chrome/browser/net/predictor.cc b/chrome/browser/net/predictor.cc index e18f0bf..ffc5e57 100644 --- a/chrome/browser/net/predictor.cc +++ b/chrome/browser/net/predictor.cc @@ -606,7 +606,7 @@ void Predictor::TrimReferrersNow() { void Predictor::SerializeReferrers(ListValue* referral_list) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); referral_list->Clear(); - referral_list->Append(new FundamentalValue(PREDICTOR_REFERRER_VERSION)); + referral_list->Append(new base::FundamentalValue(PREDICTOR_REFERRER_VERSION)); for (Referrers::const_iterator it = referrers_.begin(); it != referrers_.end(); ++it) { // Serialize the list of subresource names. diff --git a/chrome/browser/net/predictor_api.cc b/chrome/browser/net/predictor_api.cc index 6856327..dc713f3 100644 --- a/chrome/browser/net/predictor_api.cc +++ b/chrome/browser/net/predictor_api.cc @@ -269,7 +269,8 @@ void InitialObserver::GetInitialDnsResolutionList(ListValue* startup_list) { DCHECK(startup_list); startup_list->Clear(); DCHECK_EQ(0u, startup_list->GetSize()); - startup_list->Append(new FundamentalValue(kPredictorStartupFormatVersion)); + startup_list->Append( + new base::FundamentalValue(kPredictorStartupFormatVersion)); for (FirstNavigations::iterator it = first_navigations_.begin(); it != first_navigations_.end(); ++it) { diff --git a/chrome/browser/net/predictor_unittest.cc b/chrome/browser/net/predictor_unittest.cc index 47cffdd..58aab26 100644 --- a/chrome/browser/net/predictor_unittest.cc +++ b/chrome/browser/net/predictor_unittest.cc @@ -282,8 +282,9 @@ static ListValue* FindSerializationMotivation( // Create a new empty serialization list. static ListValue* NewEmptySerializationList() { - ListValue* list = new ListValue; - list->Append(new FundamentalValue(Predictor::PREDICTOR_REFERRER_VERSION)); + base::ListValue* list = new base::ListValue; + list->Append( + new base::FundamentalValue(Predictor::PREDICTOR_REFERRER_VERSION)); return list; } @@ -316,8 +317,8 @@ static void AddToSerializedList(const GURL& motivation, // case, during deserialization, the latency value we supply plus the // existing value(s) will be added to the referrer. - subresource_list->Append(new StringValue(subresource.spec())); - subresource_list->Append(new FundamentalValue(use_rate)); + subresource_list->Append(new base::StringValue(subresource.spec())); + subresource_list->Append(new base::FundamentalValue(use_rate)); } static const int kLatencyNotFound = -1; diff --git a/chrome/browser/net/referrer.cc b/chrome/browser/net/referrer.cc index f7bad0e..a2c7539 100644 --- a/chrome/browser/net/referrer.cc +++ b/chrome/browser/net/referrer.cc @@ -145,10 +145,10 @@ void Referrer::Deserialize(const Value& value) { } Value* Referrer::Serialize() const { - ListValue* subresource_list(new ListValue); + base::ListValue* subresource_list(new base::ListValue); for (const_iterator it = begin(); it != end(); ++it) { - StringValue* url_spec(new StringValue(it->first.spec())); - FundamentalValue* rate(new FundamentalValue( + base::StringValue* url_spec(new base::StringValue(it->first.spec())); + base::FundamentalValue* rate(new base::FundamentalValue( it->second.subresource_use_rate())); subresource_list->Append(url_spec); diff --git a/chrome/browser/policy/cloud_policy_controller_unittest.cc b/chrome/browser/policy/cloud_policy_controller_unittest.cc index 46b1c17..f1be2a9 100644 --- a/chrome/browser/policy/cloud_policy_controller_unittest.cc +++ b/chrome/browser/policy/cloud_policy_controller_unittest.cc @@ -71,7 +71,7 @@ class CloudPolicyControllerTest : public testing::Test { } void ExpectHasSpdyPolicy() { - FundamentalValue expected(true); + base::FundamentalValue expected(true); const PolicyMap* policy_map = cache_->policy( CloudPolicyCacheBase::POLICY_LEVEL_MANDATORY); ASSERT_TRUE(Value::Equals(&expected, policy_map->Get(kPolicyDisableSpdy))); diff --git a/chrome/browser/policy/cloud_policy_provider_unittest.cc b/chrome/browser/policy/cloud_policy_provider_unittest.cc index 63ee170..f8f8768 100644 --- a/chrome/browser/policy/cloud_policy_provider_unittest.cc +++ b/chrome/browser/policy/cloud_policy_provider_unittest.cc @@ -175,8 +175,8 @@ TEST_F(CloudPolicyProviderTest, CombineTwoPolicyMapsSame) { Value::CreateStringValue("http://www.google.com")); A.Set(kPolicyApplicationLocaleValue, Value::CreateStringValue("hu")); B.Set(kPolicyApplicationLocaleValue, Value::CreateStringValue("us")); - A.Set(kPolicyDevicePolicyRefreshRate, new FundamentalValue(100)); - B.Set(kPolicyDevicePolicyRefreshRate, new FundamentalValue(200)); + A.Set(kPolicyDevicePolicyRefreshRate, new base::FundamentalValue(100)); + B.Set(kPolicyDevicePolicyRefreshRate, new base::FundamentalValue(200)); CombineTwoPolicyMaps(A, B, &C); EXPECT_TRUE(A.Equals(C)); } @@ -197,8 +197,8 @@ TEST_F(CloudPolicyProviderTest, CombineTwoPolicyMapsPartial) { B.Set(kPolicyHomepageLocation, Value::CreateStringValue("http://www.google.com")); B.Set(kPolicyApplicationLocaleValue, Value::CreateStringValue("us")); - A.Set(kPolicyDevicePolicyRefreshRate, new FundamentalValue(100)); - B.Set(kPolicyDevicePolicyRefreshRate, new FundamentalValue(200)); + A.Set(kPolicyDevicePolicyRefreshRate, new base::FundamentalValue(100)); + B.Set(kPolicyDevicePolicyRefreshRate, new base::FundamentalValue(200)); CombineTwoPolicyMaps(A, B, &C); const Value* value; diff --git a/chrome/browser/policy/configuration_policy_pref_store_unittest.cc b/chrome/browser/policy/configuration_policy_pref_store_unittest.cc index 4474e69..241e7ee 100644 --- a/chrome/browser/policy/configuration_policy_pref_store_unittest.cc +++ b/chrome/browser/policy/configuration_policy_pref_store_unittest.cc @@ -266,7 +266,7 @@ TEST_P(ConfigurationPolicyPrefStoreIntegerTest, SetValue) { const Value* value = NULL; EXPECT_EQ(PrefStore::READ_OK, store_->GetValue(GetParam().pref_name(), &value)); - EXPECT_TRUE(FundamentalValue(2).Equals(value)); + EXPECT_TRUE(base::FundamentalValue(2).Equals(value)); } INSTANTIATE_TEST_CASE_P( @@ -723,7 +723,7 @@ class ConfigurationPolicyPrefStoreIncognitoModeTest : public testing::Test { const Value* value = NULL; EXPECT_EQ(PrefStore::READ_OK, store_->GetValue(prefs::kIncognitoModeAvailability, &value)); - EXPECT_TRUE(FundamentalValue(availability).Equals(value)); + EXPECT_TRUE(base::FundamentalValue(availability).Equals(value)); } MockConfigurationPolicyProvider provider_; diff --git a/chrome/browser/policy/device_policy_cache_unittest.cc b/chrome/browser/policy/device_policy_cache_unittest.cc index 37e1b6b..7b706d1 100644 --- a/chrome/browser/policy/device_policy_cache_unittest.cc +++ b/chrome/browser/policy/device_policy_cache_unittest.cc @@ -118,7 +118,7 @@ TEST_F(DevicePolicyCacheTest, Startup) { policy)); cache_->Load(); testing::Mock::VerifyAndClearExpectations(&signed_settings_helper_); - FundamentalValue expected(120); + base::FundamentalValue expected(120); EXPECT_TRUE(Value::Equals(&expected, GetMandatoryPolicy( kPolicyDevicePolicyRefreshRate))); @@ -137,7 +137,7 @@ TEST_F(DevicePolicyCacheTest, SetPolicy) { policy)); cache_->Load(); testing::Mock::VerifyAndClearExpectations(&signed_settings_helper_); - FundamentalValue expected(120); + base::FundamentalValue expected(120); EXPECT_TRUE(Value::Equals(&expected, GetMandatoryPolicy( kPolicyDevicePolicyRefreshRate))); @@ -153,7 +153,7 @@ TEST_F(DevicePolicyCacheTest, SetPolicy) { EXPECT_CALL(signed_settings_helper_, CancelCallback(_)); cache_->SetPolicy(new_policy); testing::Mock::VerifyAndClearExpectations(&signed_settings_helper_); - FundamentalValue updated_expected(300); + base::FundamentalValue updated_expected(300); EXPECT_TRUE(Value::Equals(&updated_expected, GetMandatoryPolicy( kPolicyDevicePolicyRefreshRate))); @@ -180,7 +180,7 @@ TEST_F(DevicePolicyCacheTest, SetPolicyWrongUser) { cache_->SetPolicy(new_policy); testing::Mock::VerifyAndClearExpectations(&signed_settings_helper_); - FundamentalValue expected(120); + base::FundamentalValue expected(120); EXPECT_TRUE(Value::Equals(&expected, GetMandatoryPolicy( kPolicyDevicePolicyRefreshRate))); @@ -205,7 +205,7 @@ TEST_F(DevicePolicyCacheTest, SetPolicyNonEnterpriseDevice) { cache_->SetPolicy(new_policy); testing::Mock::VerifyAndClearExpectations(&signed_settings_helper_); - FundamentalValue expected(120); + base::FundamentalValue expected(120); EXPECT_TRUE(Value::Equals(&expected, GetMandatoryPolicy( kPolicyDevicePolicyRefreshRate))); diff --git a/chrome/browser/policy/policy_map_unittest.cc b/chrome/browser/policy/policy_map_unittest.cc index c540bbb..eb54400 100644 --- a/chrome/browser/policy/policy_map_unittest.cc +++ b/chrome/browser/policy/policy_map_unittest.cc @@ -51,9 +51,9 @@ TEST(PolicyMapTest, Swap) { b.Set(kPolicyHomepageLocation, Value::CreateStringValue("bbb")); b.Set(kPolicyHomepageIsNewTabPage, Value::CreateBooleanValue(true)); a.Swap(&b); - StringValue expected("bbb"); + base::StringValue expected("bbb"); EXPECT_TRUE(expected.Equals(a.Get(kPolicyHomepageLocation))); - FundamentalValue expected_bool(true); + base::FundamentalValue expected_bool(true); EXPECT_TRUE(expected_bool.Equals(a.Get(kPolicyHomepageIsNewTabPage))); StringValue expected_a("aaa"); EXPECT_TRUE(expected_a.Equals(b.Get(kPolicyHomepageLocation))); diff --git a/chrome/browser/policy/user_policy_cache_unittest.cc b/chrome/browser/policy/user_policy_cache_unittest.cc index 161d4d6..df1c9c5 100644 --- a/chrome/browser/policy/user_policy_cache_unittest.cc +++ b/chrome/browser/policy/user_policy_cache_unittest.cc @@ -167,21 +167,21 @@ TEST_F(UserPolicyCacheTest, DecodeIntegerValue) { scoped_ptr<Value> value( DecodeIntegerValue(static_cast<google::protobuf::int64>(42))); ASSERT_TRUE(value.get()); - FundamentalValue expected_42(42); + base::FundamentalValue expected_42(42); EXPECT_TRUE(value->Equals(&expected_42)); value.reset( DecodeIntegerValue(static_cast<google::protobuf::int64>(min - 1LL))); EXPECT_EQ(NULL, value.get()); value.reset(DecodeIntegerValue(static_cast<google::protobuf::int64>(min))); ASSERT_TRUE(value.get()); - FundamentalValue expected_min(min); + base::FundamentalValue expected_min(min); EXPECT_TRUE(value->Equals(&expected_min)); value.reset( DecodeIntegerValue(static_cast<google::protobuf::int64>(max + 1LL))); EXPECT_EQ(NULL, value.get()); value.reset(DecodeIntegerValue(static_cast<google::protobuf::int64>(max))); ASSERT_TRUE(value.get()); - FundamentalValue expected_max(max); + base::FundamentalValue expected_max(max); EXPECT_TRUE(value->Equals(&expected_max)); } diff --git a/chrome/browser/prefs/pref_notifier_impl_unittest.cc b/chrome/browser/prefs/pref_notifier_impl_unittest.cc index dfe4304..58871e8 100644 --- a/chrome/browser/prefs/pref_notifier_impl_unittest.cc +++ b/chrome/browser/prefs/pref_notifier_impl_unittest.cc @@ -155,7 +155,7 @@ TEST_F(PrefNotifierTest, AddAndRemovePrefObservers) { } TEST_F(PrefNotifierTest, FireObservers) { - FundamentalValue value_true(true); + base::FundamentalValue value_true(true); PrefNotifierImpl notifier(&pref_service_); notifier.AddPrefObserver(kChangedPref, &obs1_); notifier.AddPrefObserver(kUnchangedPref, &obs1_); diff --git a/chrome/browser/prefs/pref_value_store_unittest.cc b/chrome/browser/prefs/pref_value_store_unittest.cc index b5eaff0..85a8c14 100644 --- a/chrome/browser/prefs/pref_value_store_unittest.cc +++ b/chrome/browser/prefs/pref_value_store_unittest.cc @@ -365,7 +365,7 @@ TEST_F(PrefValueStoreTest, GetValue) { // Test getting a preference value that the |PrefValueStore| // does not contain. - FundamentalValue tmp_dummy_value(true); + base::FundamentalValue tmp_dummy_value(true); value = &tmp_dummy_value; ASSERT_FALSE(pref_value_store_->GetValue(prefs::kMissingPref, Value::TYPE_STRING, &value)); diff --git a/chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc b/chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc index 302f1ad..8027e14 100644 --- a/chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc +++ b/chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc @@ -319,8 +319,8 @@ void CloudPrintSetupFlow::ShowSetupDone() { IDS_CLOUD_PRINT_SETUP_WIZARD_DONE_HEIGHT_LINES, approximate_web_font); - FundamentalValue new_width(done_size.width()); - FundamentalValue new_height(done_size.height()); + base::FundamentalValue new_width(done_size.width()); + base::FundamentalValue new_height(done_size.height()); web_ui_->CallJavascriptFunction("cloudprint.showSetupDone", new_width, new_height); } diff --git a/chrome/browser/sync/sync_ui_util.cc b/chrome/browser/sync/sync_ui_util.cc index a3501b6..188874d 100644 --- a/chrome/browser/sync/sync_ui_util.cc +++ b/chrome/browser/sync/sync_ui_util.cc @@ -349,7 +349,7 @@ void ConstructAboutInformation(ProfileSyncService* service, full_status.summary)); strings->Set("authenticated", - new FundamentalValue(full_status.authenticated)); + new base::FundamentalValue(full_status.authenticated)); strings->SetString("auth_problem", sync_ui_util::MakeSyncAuthErrorText( service->GetAuthError().state())); @@ -468,7 +468,8 @@ void ConstructAboutInformation(ProfileSyncService* service, } if (service->unrecoverable_error_detected()) { - strings->Set("unrecoverable_error_detected", new FundamentalValue(true)); + strings->Set("unrecoverable_error_detected", + new base::FundamentalValue(true)); tracked_objects::Location loc(service->unrecoverable_error_location()); std::string location_str; loc.Write(true, true, &location_str); diff --git a/chrome/browser/ui/webui/chromeos/login/eula_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/eula_screen_handler.cc index a58c4df..d501359 100644 --- a/chrome/browser/ui/webui/chromeos/login/eula_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/eula_screen_handler.cc @@ -83,7 +83,7 @@ void EulaScreenHandler::Initialize() { if (!page_is_ready() || !delegate_) return; - FundamentalValue checked(delegate_->IsUsageStatsEnabled()); + base::FundamentalValue checked(delegate_->IsUsageStatsEnabled()); web_ui_->CallJavascriptFunction("cr.ui.Oobe.setUsageStats", checked); // This OEM EULA is a file:// URL which we're unable to load in iframe. diff --git a/chrome/browser/ui/webui/chromeos/login/update_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/update_screen_handler.cc index 571511d..7d0a53a 100644 --- a/chrome/browser/ui/webui/chromeos/login/update_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/update_screen_handler.cc @@ -62,13 +62,13 @@ void UpdateScreenHandler::ShowManualRebootInfo() { } void UpdateScreenHandler::SetProgress(int progress) { - FundamentalValue progress_value(progress); + base::FundamentalValue progress_value(progress); web_ui_->CallJavascriptFunction("cr.ui.Oobe.setUpdateProgress", progress_value); } void UpdateScreenHandler::ShowCurtain(bool enable) { - FundamentalValue enable_value(enable); + base::FundamentalValue enable_value(enable); web_ui_->CallJavascriptFunction("cr.ui.Oobe.showUpdateCurtain", enable_value); } diff --git a/chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.cc index 5ddb86c..0ce62b7 100644 --- a/chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.cc @@ -87,7 +87,7 @@ void UserImageScreenHandler::SelectImage(int index) { selected_image_ = index; if (page_is_ready()) { // Skip Take Photo button. - FundamentalValue index_value(index + 1); + base::FundamentalValue index_value(index + 1); web_ui_->CallJavascriptFunction( "oobe.UserImageScreen.selectUserImage", index_value); diff --git a/chrome/browser/ui/webui/cookies_tree_model_adapter.cc b/chrome/browser/ui/webui/cookies_tree_model_adapter.cc index b5232ed..fdfcc20 100644 --- a/chrome/browser/ui/webui/cookies_tree_model_adapter.cc +++ b/chrome/browser/ui/webui/cookies_tree_model_adapter.cc @@ -68,10 +68,10 @@ void CookiesTreeModelAdapter::TreeNodesAdded(ui::TreeModel* model, CookieTreeNode* parent_node = model_->AsNode(parent); - StringValue tree_id(tree_id_); + base::StringValue tree_id(tree_id_); scoped_ptr<Value> parend_id(GetTreeNodeId(parent_node)); - FundamentalValue start_value(start); - ListValue children; + base::FundamentalValue start_value(start); + base::ListValue children; cookies_tree_model_util::GetChildNodeList(parent_node, start, count, &children); web_ui_->CallJavascriptFunction("ui.CookiesTree.onTreeItemAdded", @@ -86,10 +86,10 @@ void CookiesTreeModelAdapter::TreeNodesRemoved(ui::TreeModel* model, if (batch_update_) return; - StringValue tree_id(tree_id_); + base::StringValue tree_id(tree_id_); scoped_ptr<Value> parend_id(GetTreeNodeId(model_->AsNode(parent))); - FundamentalValue start_value(start); - FundamentalValue count_value(count); + base::FundamentalValue start_value(start); + base::FundamentalValue count_value(count); web_ui_->CallJavascriptFunction("ui.CookiesTree.onTreeItemRemoved", tree_id, *parend_id.get(), start_value, count_value); } diff --git a/chrome/browser/ui/webui/crashes_ui.cc b/chrome/browser/ui/webui/crashes_ui.cc index f148828..ef5c041 100644 --- a/chrome/browser/ui/webui/crashes_ui.cc +++ b/chrome/browser/ui/webui/crashes_ui.cc @@ -138,10 +138,10 @@ void CrashesDOMHandler::UpdateUI() { } } - FundamentalValue enabled(crash_reporting_enabled); + base::FundamentalValue enabled(crash_reporting_enabled); const chrome::VersionInfo version_info; - StringValue version(version_info.Version()); + base::StringValue version(version_info.Version()); web_ui_->CallJavascriptFunction("updateCrashList", enabled, crash_list, version); diff --git a/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc b/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc index 71a82f5..765762c 100644 --- a/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc +++ b/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc @@ -54,7 +54,7 @@ void FaviconWebUIHandler::OnFaviconDataAvailable( FaviconService* favicon_service = Profile::FromWebUI(web_ui_)->GetFaviconService(Profile::EXPLICIT_ACCESS); int id = consumer_.GetClientData(favicon_service, request_handle); - FundamentalValue id_value(id); + base::FundamentalValue id_value(id); scoped_ptr<StringValue> color_value; if (favicon.is_valid()) { diff --git a/chrome/browser/ui/webui/ntp/most_visited_handler.cc b/chrome/browser/ui/webui/ntp/most_visited_handler.cc index 426edb5..04fc313 100644 --- a/chrome/browser/ui/webui/ntp/most_visited_handler.cc +++ b/chrome/browser/ui/webui/ntp/most_visited_handler.cc @@ -121,7 +121,7 @@ void MostVisitedHandler::SendPagesValue() { history::TopSites* ts = profile->GetTopSites(); if (ts) has_blacklisted_urls = ts->HasBlacklistedItems(); - FundamentalValue has_blacklisted_urls_value(has_blacklisted_urls); + base::FundamentalValue has_blacklisted_urls_value(has_blacklisted_urls); web_ui_->CallJavascriptFunction("setMostVisitedPages", *(pages_value_.get()), has_blacklisted_urls_value); diff --git a/chrome/browser/ui/webui/ntp/shown_sections_handler.cc b/chrome/browser/ui/webui/ntp/shown_sections_handler.cc index 9e6835b..56bfa72 100644 --- a/chrome/browser/ui/webui/ntp/shown_sections_handler.cc +++ b/chrome/browser/ui/webui/ntp/shown_sections_handler.cc @@ -73,7 +73,7 @@ void ShownSectionsHandler::Observe(int type, std::string* pref_name = Details<std::string>(details).ptr(); DCHECK(*pref_name == prefs::kNTPShownSections); int sections = pref_service_->GetInteger(prefs::kNTPShownSections); - FundamentalValue sections_value(sections); + base::FundamentalValue sections_value(sections); web_ui_->CallJavascriptFunction("setShownSections", sections_value); } else { NOTREACHED(); diff --git a/chrome/browser/ui/webui/options/advanced_options_handler.cc b/chrome/browser/ui/webui/options/advanced_options_handler.cc index fa0f099..04f1887 100644 --- a/chrome/browser/ui/webui/options/advanced_options_handler.cc +++ b/chrome/browser/ui/webui/options/advanced_options_handler.cc @@ -407,7 +407,7 @@ void AdvancedOptionsHandler::HandleBackgroundModeCheckbox( } void AdvancedOptionsHandler::SetupBackgroundModeSettings() { - FundamentalValue checked(background_mode_enabled_.GetValue()); + base::FundamentalValue checked(background_mode_enabled_.GetValue()); web_ui_->CallJavascriptFunction( "options.AdvancedOptions.SetBackgroundModeCheckboxState", checked); } @@ -473,14 +473,14 @@ void AdvancedOptionsHandler::SetupCloudPrintProxySection() { bool cloud_print_proxy_allowed = !cloud_print_proxy_enabled_.IsManaged() || cloud_print_proxy_enabled_.GetValue(); - FundamentalValue allowed(cloud_print_proxy_allowed); + base::FundamentalValue allowed(cloud_print_proxy_allowed); std::string email; if (profile->GetPrefs()->HasPrefPath(prefs::kCloudPrintEmail) && cloud_print_proxy_allowed) { email = profile->GetPrefs()->GetString(prefs::kCloudPrintEmail); } - FundamentalValue disabled(email.empty()); + base::FundamentalValue disabled(email.empty()); string16 label_str; if (email.empty()) { @@ -506,8 +506,8 @@ void AdvancedOptionsHandler::RemoveCloudPrintProxySection() { void AdvancedOptionsHandler::SetupMetricsReportingCheckbox() { #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) - FundamentalValue checked(enable_metrics_recording_.GetValue()); - FundamentalValue disabled(enable_metrics_recording_.IsManaged()); + base::FundamentalValue checked(enable_metrics_recording_.GetValue()); + base::FundamentalValue disabled(enable_metrics_recording_.IsManaged()); web_ui_->CallJavascriptFunction( "options.AdvancedOptions.SetMetricsReportingCheckboxState", checked, disabled); @@ -518,7 +518,7 @@ void AdvancedOptionsHandler::SetupMetricsReportingSettingVisibility() { #if defined(GOOGLE_CHROME_BUILD) && defined(OS_CHROMEOS) // Don't show the reporting setting if we are in the guest mode. if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession)) { - FundamentalValue visible(false); + base::FundamentalValue visible(false); web_ui_->CallJavascriptFunction( "options.AdvancedOptions.SetMetricsReportingSettingVisibility", visible); @@ -528,7 +528,7 @@ void AdvancedOptionsHandler::SetupMetricsReportingSettingVisibility() { void AdvancedOptionsHandler::SetupFontSizeLabel() { // We're only interested in integer values, so convert to int. - FundamentalValue font_size(default_font_size_.GetValue()); + base::FundamentalValue font_size(default_font_size_.GetValue()); web_ui_->CallJavascriptFunction( "options.AdvancedOptions.SetFontSize", font_size); } @@ -538,18 +538,18 @@ void AdvancedOptionsHandler::SetupDownloadLocationPath() { // In case allow_file_selection_dialogs_ is false, we will not display any // file-selection dialogs but show an InfoBar. That is why we can disable // the DownloadLocationPath-Chooser right-away. - FundamentalValue disabled(default_download_location_.IsManaged() || + base::FundamentalValue disabled(default_download_location_.IsManaged() || !allow_file_selection_dialogs_.GetValue()); web_ui_->CallJavascriptFunction( "options.AdvancedOptions.SetDownloadLocationPath", value, disabled); } void AdvancedOptionsHandler::SetupPromptForDownload() { - FundamentalValue checked(ask_for_save_location_.GetValue()); + base::FundamentalValue checked(ask_for_save_location_.GetValue()); // If either the DownloadDirectory is managed or if file-selection dialogs are // disallowed then |ask_for_save_location_| must currently be false and cannot // be changed. - FundamentalValue disabled(default_download_location_.IsManaged() || + base::FundamentalValue disabled(default_download_location_.IsManaged() || !allow_file_selection_dialogs_.GetValue()); web_ui_->CallJavascriptFunction( "options.AdvancedOptions.SetPromptForDownload", checked, disabled); @@ -561,7 +561,7 @@ void AdvancedOptionsHandler::SetupAutoOpenFileTypesDisabledAttribute() { DownloadManager* manager = web_ui_->tab_contents()->browser_context()->GetDownloadManager(); bool disabled = !(manager && manager->download_prefs()->IsAutoOpenUsed()); - FundamentalValue value(disabled); + base::FundamentalValue value(disabled); web_ui_->CallJavascriptFunction( "options.AdvancedOptions.SetAutoOpenFileTypesDisabledAttribute", value); } @@ -575,7 +575,7 @@ void AdvancedOptionsHandler::SetupProxySettingsSection() { bool is_extension_controlled = (proxy_config && proxy_config->IsExtensionControlled()); - FundamentalValue disabled(proxy_prefs_->IsManaged() || + base::FundamentalValue disabled(proxy_prefs_->IsManaged() || is_extension_controlled); // Get the appropriate info string to describe the button. diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc index e8cb2e7..75007b0 100644 --- a/chrome/browser/ui/webui/options/browser_options_handler.cc +++ b/chrome/browser/ui/webui/options/browser_options_handler.cc @@ -329,7 +329,7 @@ void BrowserOptionsHandler::UpdateRestoreOnStartup() { Profile* profile = Profile::FromWebUI(web_ui_); const SessionStartupPref startup_pref = SessionStartupPref::GetStartupPref(profile->GetPrefs()); - FundamentalValue restore_on_startup(startup_pref.type); + base::FundamentalValue restore_on_startup(startup_pref.type); web_ui_->CallJavascriptFunction("BrowserOptions.updateRestoreOnStartup", restore_on_startup); } @@ -526,7 +526,7 @@ void BrowserOptionsHandler::DisableInstant(const ListValue* args) { } void BrowserOptionsHandler::GetInstantFieldTrialStatus(const ListValue* args) { - FundamentalValue enabled( + base::FundamentalValue enabled( InstantFieldTrial::IsExperimentGroup(Profile::FromWebUI(web_ui_))); web_ui_->CallJavascriptFunction("BrowserOptions.setInstantFieldTrialStatus", enabled); diff --git a/chrome/browser/ui/webui/options/certificate_manager_handler.cc b/chrome/browser/ui/webui/options/certificate_manager_handler.cc index fb4fc93..fe507b51 100644 --- a/chrome/browser/ui/webui/options/certificate_manager_handler.cc +++ b/chrome/browser/ui/webui/options/certificate_manager_handler.cc @@ -466,6 +466,7 @@ void CertificateManagerHandler::GetCATrust(const ListValue* args) { int trust = certificate_manager_model_->cert_db().GetCertTrust( cert, net::CA_CERT); + using base::FundamentalValue; FundamentalValue ssl_value(bool(trust & net::CertDatabase::TRUSTED_SSL)); FundamentalValue email_value(bool(trust & net::CertDatabase::TRUSTED_EMAIL)); FundamentalValue obj_sign_value( @@ -993,7 +994,7 @@ void CertificateManagerHandler::CheckTpmTokenReady(const ListValue* args) { chromeos::CrosLibrary::Get()->GetCryptohomeLibrary(); // TODO(xiyuan): Use async way when underlying supports it. - FundamentalValue ready(cryptohome->Pkcs11IsTpmTokenReady()); + base::FundamentalValue ready(cryptohome->Pkcs11IsTpmTokenReady()); web_ui_->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady", ready); } diff --git a/chrome/browser/ui/webui/options/chromeos/system_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/system_options_handler.cc index 6a4ae5a..4f343f9 100644 --- a/chrome/browser/ui/webui/options/chromeos/system_options_handler.cc +++ b/chrome/browser/ui/webui/options/chromeos/system_options_handler.cc @@ -89,7 +89,7 @@ void SystemOptionsHandler::Initialize() { DCHECK(web_ui_); PrefService* pref_service = g_browser_process->local_state(); bool acc_enabled = pref_service->GetBoolean(prefs::kAccessibilityEnabled); - FundamentalValue checked(acc_enabled); + base::FundamentalValue checked(acc_enabled); web_ui_->CallJavascriptFunction( "options.SystemOptions.SetAccessibilityCheckboxState", checked); } diff --git a/chrome/browser/ui/webui/options/clear_browser_data_handler.cc b/chrome/browser/ui/webui/options/clear_browser_data_handler.cc index 5374031..cb30a9b 100644 --- a/chrome/browser/ui/webui/options/clear_browser_data_handler.cc +++ b/chrome/browser/ui/webui/options/clear_browser_data_handler.cc @@ -112,7 +112,7 @@ void ClearBrowserDataHandler::HandleClearBrowserData(const ListValue* value) { int period_selected = prefs->GetInteger(prefs::kDeleteTimePeriod); - FundamentalValue state(true); + base::FundamentalValue state(true); web_ui_->CallJavascriptFunction("ClearBrowserDataOverlay.setClearingState", state); diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc index c99f6b5..b5a2704 100644 --- a/chrome/browser/ui/webui/options/content_settings_handler.cc +++ b/chrome/browser/ui/webui/options/content_settings_handler.cc @@ -388,7 +388,8 @@ bool ContentSettingsHandler::GetDefaultSettingManagedFromModel( void ContentSettingsHandler::UpdateHandlersEnabledRadios() { #if defined(ENABLE_REGISTER_PROTOCOL_HANDLER) DCHECK(web_ui_); - FundamentalValue handlers_enabled(GetProtocolHandlerRegistry()->enabled()); + base::FundamentalValue handlers_enabled( + GetProtocolHandlerRegistry()->enabled()); web_ui_->CallJavascriptFunction("ContentSettings.updateHandlersEnabledRadios", handlers_enabled); diff --git a/chrome/browser/ui/webui/options/font_settings_handler.cc b/chrome/browser/ui/webui/options/font_settings_handler.cc index 12e4084..49f6d38 100644 --- a/chrome/browser/ui/webui/options/font_settings_handler.cc +++ b/chrome/browser/ui/webui/options/font_settings_handler.cc @@ -174,35 +174,35 @@ void FontSettingsHandler::Observe(int type, } void FontSettingsHandler::SetUpStandardFontSample() { - StringValue font_value(standard_font_.GetValue()); - FundamentalValue size_value(default_font_size_.GetValue()); + base::StringValue font_value(standard_font_.GetValue()); + base::FundamentalValue size_value(default_font_size_.GetValue()); web_ui_->CallJavascriptFunction( "FontSettings.setUpStandardFontSample", font_value, size_value); } void FontSettingsHandler::SetUpSerifFontSample() { - StringValue font_value(serif_font_.GetValue()); - FundamentalValue size_value(default_font_size_.GetValue()); + base::StringValue font_value(serif_font_.GetValue()); + base::FundamentalValue size_value(default_font_size_.GetValue()); web_ui_->CallJavascriptFunction( "FontSettings.setUpSerifFontSample", font_value, size_value); } void FontSettingsHandler::SetUpSansSerifFontSample() { - StringValue font_value(sans_serif_font_.GetValue()); - FundamentalValue size_value(default_font_size_.GetValue()); + base::StringValue font_value(sans_serif_font_.GetValue()); + base::FundamentalValue size_value(default_font_size_.GetValue()); web_ui_->CallJavascriptFunction( "FontSettings.setUpSansSerifFontSample", font_value, size_value); } void FontSettingsHandler::SetUpFixedFontSample() { - StringValue font_value(fixed_font_.GetValue()); - FundamentalValue size_value(default_fixed_font_size_.GetValue()); + base::StringValue font_value(fixed_font_.GetValue()); + base::FundamentalValue size_value(default_fixed_font_size_.GetValue()); web_ui_->CallJavascriptFunction( "FontSettings.setUpFixedFontSample", font_value, size_value); } void FontSettingsHandler::SetUpMinimumFontSample() { - FundamentalValue size_value(minimum_font_size_.GetValue()); + base::FundamentalValue size_value(minimum_font_size_.GetValue()); web_ui_->CallJavascriptFunction("FontSettings.setUpMinimumFontSample", size_value); } diff --git a/chrome/browser/ui/webui/options/import_data_handler.cc b/chrome/browser/ui/webui/options/import_data_handler.cc index 7138c79..5c0b49b 100644 --- a/chrome/browser/ui/webui/options/import_data_handler.cc +++ b/chrome/browser/ui/webui/options/import_data_handler.cc @@ -96,7 +96,7 @@ void ImportDataHandler::ImportData(const ListValue* args) { uint16 import_services = (selected_items & supported_items); if (import_services) { - FundamentalValue state(true); + base::FundamentalValue state(true); web_ui_->CallJavascriptFunction("ImportDataOverlay.setImportingState", state); diff --git a/chrome/browser/ui/webui/options/personal_options_handler.cc b/chrome/browser/ui/webui/options/personal_options_handler.cc index 38ab9cf..f273c6b 100644 --- a/chrome/browser/ui/webui/options/personal_options_handler.cc +++ b/chrome/browser/ui/webui/options/personal_options_handler.cc @@ -340,7 +340,7 @@ void PersonalOptionsHandler::ObserveThemeChanged() { #if defined(TOOLKIT_GTK) GtkThemeService* theme_service = GtkThemeService::GetFrom(profile); bool is_gtk_theme = theme_service->UsingNativeTheme(); - FundamentalValue gtk_enabled(!is_gtk_theme); + base::FundamentalValue gtk_enabled(!is_gtk_theme); web_ui_->CallJavascriptFunction( "options.PersonalOptions.setGtkThemeButtonEnabled", gtk_enabled); #else @@ -349,7 +349,7 @@ void PersonalOptionsHandler::ObserveThemeChanged() { #endif bool is_classic_theme = !is_gtk_theme && theme_service->UsingDefaultTheme(); - FundamentalValue enabled(!is_classic_theme); + base::FundamentalValue enabled(!is_classic_theme); web_ui_->CallJavascriptFunction( "options.PersonalOptions.setThemesResetButtonEnabled", enabled); } diff --git a/chrome/browser/ui/webui/plugins_ui.cc b/chrome/browser/ui/webui/plugins_ui.cc index 7d45ec2..55304c3 100644 --- a/chrome/browser/ui/webui/plugins_ui.cc +++ b/chrome/browser/ui/webui/plugins_ui.cc @@ -241,7 +241,7 @@ void PluginsDOMHandler::HandleSaveShowDetailsToPrefs(const ListValue* args) { } void PluginsDOMHandler::HandleGetShowDetails(const ListValue* args) { - FundamentalValue show_details(show_details_.GetValue()); + base::FundamentalValue show_details(show_details_.GetValue()); web_ui_->CallJavascriptFunction("loadShowDetailsFromPrefs", show_details); } diff --git a/chrome/browser/ui/webui/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview_handler.cc index afaddc5..77b694f 100644 --- a/chrome/browser/ui/webui/print_preview_handler.cc +++ b/chrome/browser/ui/webui/print_preview_handler.cc @@ -705,8 +705,8 @@ void PrintPreviewHandler::SendCloudPrintEnabled() { #endif GURL gcp_url(CloudPrintURL(BrowserList::GetLastActive()->profile()). GetCloudPrintServiceURL()); - FundamentalValue enable(enable_cloud_print_integration); - StringValue gcp_url_value(gcp_url.spec()); + base::FundamentalValue enable(enable_cloud_print_integration); + base::StringValue gcp_url_value(gcp_url.spec()); web_ui_->CallJavascriptFunction("setUseCloudPrint", enable, gcp_url_value); } diff --git a/chrome/browser/ui/webui/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview_ui.cc index dac6199..d61baea 100644 --- a/chrome/browser/ui/webui/print_preview_ui.cc +++ b/chrome/browser/ui/webui/print_preview_ui.cc @@ -68,23 +68,23 @@ void PrintPreviewUI::OnDidGetPreviewPageCount(int document_cookie, bool is_modifiable) { DCHECK_GT(page_count, 0); document_cookie_ = document_cookie; - FundamentalValue count(page_count); - FundamentalValue modifiable(is_modifiable); + base::FundamentalValue count(page_count); + base::FundamentalValue modifiable(is_modifiable); CallJavascriptFunction("onDidGetPreviewPageCount", count, modifiable); } void PrintPreviewUI::OnDidPreviewPage(int page_number) { DCHECK_GE(page_number, 0); - FundamentalValue number(page_number); - StringValue ui_identifier(preview_ui_addr_str_); + base::FundamentalValue number(page_number); + base::StringValue ui_identifier(preview_ui_addr_str_); CallJavascriptFunction("onDidPreviewPage", number, ui_identifier); } void PrintPreviewUI::OnReusePreviewData(int preview_request_id) { DecrementRequestCount(); - StringValue ui_identifier(preview_ui_addr_str_); - FundamentalValue ui_preview_request_id(preview_request_id); + base::StringValue ui_identifier(preview_ui_addr_str_); + base::FundamentalValue ui_preview_request_id(preview_request_id); CallJavascriptFunction("reloadPreviewPages", ui_identifier, ui_preview_request_id); } @@ -103,9 +103,9 @@ void PrintPreviewUI::OnPreviewDataIsAvailable(int expected_pages_count, expected_pages_count); initial_preview_start_time_ = base::TimeTicks(); } - StringValue title(job_title); - StringValue ui_identifier(preview_ui_addr_str_); - FundamentalValue ui_preview_request_id(preview_request_id); + base::StringValue title(job_title); + base::StringValue ui_identifier(preview_ui_addr_str_); + base::FundamentalValue ui_preview_request_id(preview_request_id); CallJavascriptFunction("updatePrintPreview", title, ui_identifier, ui_preview_request_id); } diff --git a/chrome/browser/ui/webui/task_manager_handler.cc b/chrome/browser/ui/webui/task_manager_handler.cc index 03c90dd..787715f 100644 --- a/chrome/browser/ui/webui/task_manager_handler.cc +++ b/chrome/browser/ui/webui/task_manager_handler.cc @@ -194,12 +194,12 @@ TaskManagerHandler::~TaskManagerHandler() { void TaskManagerHandler::OnModelChanged() { const int count = model_->GroupCount(); - FundamentalValue start_value(0); - FundamentalValue length_value(count); - ListValue tasks_value; - for (int i = 0; i < count; i++) { + base::FundamentalValue start_value(0); + base::FundamentalValue length_value(count); + base::ListValue tasks_value; + for (int i = 0; i < count; ++i) tasks_value.Append(CreateTaskGroupValue(model_, i)); - } + if (is_enabled_) { web_ui_->CallJavascriptFunction("taskChanged", start_value, length_value, tasks_value); @@ -370,13 +370,13 @@ void TaskManagerHandler::UpdateResourceGroupTable(int start, int length) { void TaskManagerHandler::OnGroupChanged(const int group_start, const int group_length) { - FundamentalValue start_value(group_start); - FundamentalValue length_value(group_length); - ListValue tasks_value; + base::FundamentalValue start_value(group_start); + base::FundamentalValue length_value(group_length); + base::ListValue tasks_value; - for (int i = 0; i < group_length; i++) { + for (int i = 0; i < group_length; ++i) tasks_value.Append(CreateTaskGroupValue(model_, group_start + i)); - } + if (is_enabled_) { web_ui_->CallJavascriptFunction("taskChanged", start_value, length_value, tasks_value); @@ -385,12 +385,12 @@ void TaskManagerHandler::OnGroupChanged(const int group_start, void TaskManagerHandler::OnGroupAdded(const int group_start, const int group_length) { - FundamentalValue start_value(group_start); - FundamentalValue length_value(group_length); - ListValue tasks_value; - for (int i = 0; i < group_length; i++) { + base::FundamentalValue start_value(group_start); + base::FundamentalValue length_value(group_length); + base::ListValue tasks_value; + for (int i = 0; i < group_length; ++i) tasks_value.Append(CreateTaskGroupValue(model_, group_start + i)); - } + if (is_enabled_) { web_ui_->CallJavascriptFunction("taskAdded", start_value, length_value, tasks_value); @@ -399,9 +399,8 @@ void TaskManagerHandler::OnGroupAdded(const int group_start, void TaskManagerHandler::OnGroupRemoved(const int group_start, const int group_length) { - FundamentalValue start_value(group_start); - FundamentalValue length_value(group_length); + base::FundamentalValue start_value(group_start); + base::FundamentalValue length_value(group_length); if (is_enabled_) web_ui_->CallJavascriptFunction("taskRemoved", start_value, length_value); } - |