| 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 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 // TODO(dwkang): rename or unify the pref for UMA once we have conclusion | 763 // TODO(dwkang): rename or unify the pref for UMA once we have conclusion |
| 764 // in crbugs.com/246495. | 764 // in crbugs.com/246495. |
| 765 // Android has it's own preferences for metrics / crash uploading. | 765 // Android has it's own preferences for metrics / crash uploading. |
| 766 enable_metrics_.Init(prefs::kCrashReportingEnabled, | 766 enable_metrics_.Init(prefs::kCrashReportingEnabled, |
| 767 g_browser_process->local_state()); | 767 g_browser_process->local_state()); |
| 768 enable_metrics_.MoveToThread( | 768 enable_metrics_.MoveToThread( |
| 769 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 769 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
| 770 #else | 770 #else |
| 771 // Prep the PrefMember and send it to the IO thread, since this value will be | 771 // Prep the PrefMember and send it to the IO thread, since this value will be |
| 772 // read from there. | 772 // read from there. |
| 773 enable_metrics_.Init(prefs::kMetricsReportingEnabled, | 773 enable_metrics_.Init(metrics::prefs::kMetricsReportingEnabled, |
| 774 g_browser_process->local_state()); | 774 g_browser_process->local_state()); |
| 775 enable_metrics_.MoveToThread( | 775 enable_metrics_.MoveToThread( |
| 776 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 776 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
| 777 #endif // defined(OS_CHROMEOS) | 777 #endif // defined(OS_CHROMEOS) |
| 778 } | 778 } |
| 779 | 779 |
| 780 bool ProfileIOData::GetMetricsEnabledStateOnIOThread() const { | 780 bool ProfileIOData::GetMetricsEnabledStateOnIOThread() const { |
| 781 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 781 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 782 #if defined(OS_CHROMEOS) | 782 #if defined(OS_CHROMEOS) |
| 783 return enable_metrics_; | 783 return enable_metrics_; |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1170 void ProfileIOData::SetCookieSettingsForTesting( | 1170 void ProfileIOData::SetCookieSettingsForTesting( |
| 1171 CookieSettings* cookie_settings) { | 1171 CookieSettings* cookie_settings) { |
| 1172 DCHECK(!cookie_settings_.get()); | 1172 DCHECK(!cookie_settings_.get()); |
| 1173 cookie_settings_ = cookie_settings; | 1173 cookie_settings_ = cookie_settings; |
| 1174 } | 1174 } |
| 1175 | 1175 |
| 1176 void ProfileIOData::set_signin_names_for_testing( | 1176 void ProfileIOData::set_signin_names_for_testing( |
| 1177 SigninNamesOnIOThread* signin_names) { | 1177 SigninNamesOnIOThread* signin_names) { |
| 1178 signin_names_.reset(signin_names); | 1178 signin_names_.reset(signin_names); |
| 1179 } | 1179 } |
| OLD | NEW |