OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/profiles/profile_io_data.h" | 5 #include "chrome/browser/profiles/profile_io_data.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
866 | 866 |
867 void ProfileIOData::InitializeMetricsEnabledStateOnUIThread() { | 867 void ProfileIOData::InitializeMetricsEnabledStateOnUIThread() { |
868 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 868 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
869 #if defined(OS_CHROMEOS) | 869 #if defined(OS_CHROMEOS) |
870 // Just fetch the value from ChromeOS' settings while we're on the UI thread. | 870 // Just fetch the value from ChromeOS' settings while we're on the UI thread. |
871 // TODO(stevet): For now, this value is only set on profile initialization. | 871 // TODO(stevet): For now, this value is only set on profile initialization. |
872 // We will want to do something similar to the PrefMember method below in the | 872 // We will want to do something similar to the PrefMember method below in the |
873 // future to more accurately capture this state. | 873 // future to more accurately capture this state. |
874 chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref, | 874 chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref, |
875 &enable_metrics_); | 875 &enable_metrics_); |
876 #elif defined(OS_ANDROID) | 876 #elif defined(ANDROID_JAVA_UI) |
877 // TODO(dwkang): rename or unify the pref for UMA once we have conclusion | 877 // TODO(dwkang): rename or unify the pref for UMA once we have conclusion |
878 // in crbugs.com/246495. | 878 // in crbugs.com/246495. |
879 // Android has it's own preferences for metrics / crash uploading. | 879 // Android has it's own preferences for metrics / crash uploading. |
880 enable_metrics_.Init(prefs::kCrashReportingEnabled, | 880 enable_metrics_.Init(prefs::kCrashReportingEnabled, |
881 g_browser_process->local_state()); | 881 g_browser_process->local_state()); |
882 enable_metrics_.MoveToThread( | 882 enable_metrics_.MoveToThread( |
883 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 883 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
884 #else | 884 #else |
885 // Prep the PrefMember and send it to the IO thread, since this value will be | 885 // Prep the PrefMember and send it to the IO thread, since this value will be |
886 // read from there. | 886 // read from there. |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1339 make_scoped_ptr(new DevToolsNetworkTransactionFactory( | 1339 make_scoped_ptr(new DevToolsNetworkTransactionFactory( |
1340 network_controller_handle_.GetController(), shared_session)), | 1340 network_controller_handle_.GetController(), shared_session)), |
1341 backend.Pass(), true /* set_up_quic_server_info */)); | 1341 backend.Pass(), true /* set_up_quic_server_info */)); |
1342 } | 1342 } |
1343 | 1343 |
1344 void ProfileIOData::SetCookieSettingsForTesting( | 1344 void ProfileIOData::SetCookieSettingsForTesting( |
1345 content_settings::CookieSettings* cookie_settings) { | 1345 content_settings::CookieSettings* cookie_settings) { |
1346 DCHECK(!cookie_settings_.get()); | 1346 DCHECK(!cookie_settings_.get()); |
1347 cookie_settings_ = cookie_settings; | 1347 cookie_settings_ = cookie_settings; |
1348 } | 1348 } |
OLD | NEW |