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

Unified Diff: base/prefs/pref_member.h

Issue 491753003: Domain Reliability: Don't upload when metrics reporting is off. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix pref handling Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/prefs/pref_member.cc » ('j') | components/domain_reliability/monitor.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/pref_member.h
diff --git a/base/prefs/pref_member.h b/base/prefs/pref_member.h
index 17f5b447eb4a6f3a1f58985b6e7be0b7dc718c5c..2c3445dcb27388a9014685499b158e71b9229a83 100644
--- a/base/prefs/pref_member.h
+++ b/base/prefs/pref_member.h
@@ -33,9 +33,9 @@
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
-#include "base/message_loop/message_loop_proxy.h"
#include "base/prefs/base_prefs_export.h"
#include "base/prefs/pref_observer.h"
+#include "base/single_thread_task_runner.h"
#include "base/values.h"
class PrefService;
@@ -66,7 +66,7 @@ class BASE_PREFS_EXPORT PrefMemberBase : public PrefObserver {
const base::Closure& callback) const;
void MoveToThread(
- const scoped_refptr<base::MessageLoopProxy>& message_loop);
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
// See PrefMember<> for description.
bool IsManaged() const {
@@ -92,7 +92,7 @@ class BASE_PREFS_EXPORT PrefMemberBase : public PrefObserver {
bool IsOnCorrectThread() const;
- scoped_refptr<base::MessageLoopProxy> thread_loop_;
+ scoped_refptr<base::SingleThreadTaskRunner> thread_loop_;
mutable bool is_managed_;
mutable bool is_user_modifiable_;
@@ -112,7 +112,8 @@ class BASE_PREFS_EXPORT PrefMemberBase : public PrefObserver {
// See PrefMember<> for description.
void Destroy();
- void MoveToThread(const scoped_refptr<base::MessageLoopProxy>& message_loop);
+ void MoveToThread(
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
// PrefObserver
virtual void OnPreferenceChanged(PrefService* service,
@@ -197,8 +198,9 @@ class PrefMember : public subtle::PrefMemberBase {
// via PostTask.
// This method should only be used from the thread the PrefMember is currently
// on, which is the UI thread by default.
- void MoveToThread(const scoped_refptr<base::MessageLoopProxy>& message_loop) {
- subtle::PrefMemberBase::MoveToThread(message_loop);
+ void MoveToThread(
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) {
+ subtle::PrefMemberBase::MoveToThread(task_runner);
}
// Check whether the pref is managed, i.e. controlled externally through
« no previous file with comments | « no previous file | base/prefs/pref_member.cc » ('j') | components/domain_reliability/monitor.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698