Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 1101073003: Revert of New UMA settings fragment using Android prefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/android/preferences/pref_service_bridge.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 835 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
836 #if defined(OS_CHROMEOS) 836 #if defined(OS_CHROMEOS)
837 // Just fetch the value from ChromeOS' settings while we're on the UI thread. 837 // Just fetch the value from ChromeOS' settings while we're on the UI thread.
838 // TODO(stevet): For now, this value is only set on profile initialization. 838 // TODO(stevet): For now, this value is only set on profile initialization.
839 // We will want to do something similar to the PrefMember method below in the 839 // We will want to do something similar to the PrefMember method below in the
840 // future to more accurately capture this state. 840 // future to more accurately capture this state.
841 chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref, 841 chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref,
842 &enable_metrics_); 842 &enable_metrics_);
843 #elif defined(OS_ANDROID) 843 #elif defined(OS_ANDROID)
844 // TODO(dwkang): rename or unify the pref for UMA once we have conclusion 844 // TODO(dwkang): rename or unify the pref for UMA once we have conclusion
845 // in crbug.com/246495. 845 // in crbugs.com/246495.
846 // Android has it's own preferences for metrics / crash uploading. 846 // Android has it's own preferences for metrics / crash uploading.
847 enable_metrics_.Init(prefs::kCrashReportingEnabled, 847 enable_metrics_.Init(prefs::kCrashReportingEnabled,
848 g_browser_process->local_state()); 848 g_browser_process->local_state());
849 enable_metrics_.Init(prefs::kMetricsReportingEnabled,
850 g_browser_process->local_state());
851 enable_metrics_.MoveToThread( 849 enable_metrics_.MoveToThread(
852 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 850 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
853 #else 851 #else
854 // Prep the PrefMember and send it to the IO thread, since this value will be 852 // Prep the PrefMember and send it to the IO thread, since this value will be
855 // read from there. 853 // read from there.
856 enable_metrics_.Init(prefs::kMetricsReportingEnabled, 854 enable_metrics_.Init(prefs::kMetricsReportingEnabled,
857 g_browser_process->local_state()); 855 g_browser_process->local_state());
858 enable_metrics_.MoveToThread( 856 enable_metrics_.MoveToThread(
859 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 857 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
860 #endif // defined(OS_CHROMEOS) 858 #endif // defined(OS_CHROMEOS)
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
1299 void ProfileIOData::SetCookieSettingsForTesting( 1297 void ProfileIOData::SetCookieSettingsForTesting(
1300 CookieSettings* cookie_settings) { 1298 CookieSettings* cookie_settings) {
1301 DCHECK(!cookie_settings_.get()); 1299 DCHECK(!cookie_settings_.get());
1302 cookie_settings_ = cookie_settings; 1300 cookie_settings_ = cookie_settings;
1303 } 1301 }
1304 1302
1305 void ProfileIOData::set_signin_names_for_testing( 1303 void ProfileIOData::set_signin_names_for_testing(
1306 SigninNamesOnIOThread* signin_names) { 1304 SigninNamesOnIOThread* signin_names) {
1307 signin_names_.reset(signin_names); 1305 signin_names_.reset(signin_names);
1308 } 1306 }
OLDNEW
« no previous file with comments | « chrome/browser/android/preferences/pref_service_bridge.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698