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

Unified Diff: chrome/browser/protector/base_prefs_change.cc

Issue 11493003: Remove the protector service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix implicit ExtensionSystem -> TemplateURLService dependency Created 8 years 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 | « chrome/browser/protector/base_prefs_change.h ('k') | chrome/browser/protector/base_setting_change.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/protector/base_prefs_change.cc
diff --git a/chrome/browser/protector/base_prefs_change.cc b/chrome/browser/protector/base_prefs_change.cc
deleted file mode 100644
index b7708b3700fdddfd22aafadb43ad9564cd6dc07c..0000000000000000000000000000000000000000
--- a/chrome/browser/protector/base_prefs_change.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/protector/base_prefs_change.h"
-
-#include "base/bind.h"
-#include "chrome/browser/prefs/pref_service.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/protector/protected_prefs_watcher.h"
-#include "chrome/browser/protector/protector_service.h"
-#include "chrome/browser/protector/protector_service_factory.h"
-#include "chrome/browser/protector/protector_utils.h"
-#include "chrome/common/chrome_notification_types.h"
-#include "content/public/browser/notification_service.h"
-
-namespace protector {
-
-BasePrefsChange::BasePrefsChange() {
-}
-
-BasePrefsChange::~BasePrefsChange() {
-}
-
-bool BasePrefsChange::Init(Profile* profile) {
- if (!BaseSettingChange::Init(profile))
- return false;
- pref_observer_.Init(profile->GetPrefs());
- return true;
-}
-
-void BasePrefsChange::InitWhenDisabled(Profile* profile) {
- // Forcibly set backup to match the actual settings so that no changes are
- // detected on future runs.
- ProtectorServiceFactory::GetForProfile(profile)->GetPrefsWatcher()->
- ForceUpdateBackup();
-}
-
-void BasePrefsChange::DismissOnPrefChange(const std::string& pref_name) {
- DCHECK(!pref_observer_.IsObserved(pref_name));
- pref_observer_.Add(pref_name.c_str(),
- base::Bind(&BasePrefsChange::OnPreferenceChanged,
- base::Unretained(this)));
-}
-
-void BasePrefsChange::IgnorePrefChanges() {
- pref_observer_.RemoveAll();
-}
-
-void BasePrefsChange::OnPreferenceChanged(const std::string& pref_name) {
- DCHECK(pref_observer_.IsObserved(pref_name));
- // Will delete this instance.
- ProtectorServiceFactory::GetForProfile(profile())->DismissChange(this);
-}
-
-} // namespace protector
« no previous file with comments | « chrome/browser/protector/base_prefs_change.h ('k') | chrome/browser/protector/base_setting_change.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698