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

Unified Diff: chrome/browser/prefs/session_startup_pref.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/prefs/session_startup_pref.h ('k') | chrome/browser/profiles/profile_dependency_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/session_startup_pref.cc
diff --git a/chrome/browser/prefs/session_startup_pref.cc b/chrome/browser/prefs/session_startup_pref.cc
index 5738b6e8d4a2f79775561efa51dbb99c971e8f64..cb421b62be5b89acda43a89c85a8bd20bdeedd5c 100644
--- a/chrome/browser/prefs/session_startup_pref.cc
+++ b/chrome/browser/prefs/session_startup_pref.cc
@@ -12,18 +12,12 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prefs/scoped_user_pref_update.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/common/pref_names.h"
#if defined(OS_MACOSX)
#include "chrome/browser/ui/cocoa/window_restore_utils.h"
#endif
-using protector::ProtectedPrefsWatcher;
-using protector::ProtectorServiceFactory;
-
namespace {
// Converts a SessionStartupPref::Type to an integer written to prefs.
@@ -235,33 +229,6 @@ SessionStartupPref::Type SessionStartupPref::PrefValueToType(int pref_value) {
}
}
-// static
-bool SessionStartupPref::DidStartupPrefChange(Profile* profile) {
- ProtectedPrefsWatcher* prefs_watcher =
- ProtectorServiceFactory::GetForProfile(profile)->GetPrefsWatcher();
- return prefs_watcher->DidPrefChange(prefs::kRestoreOnStartup) ||
- prefs_watcher->DidPrefChange(prefs::kURLsToRestoreOnStartup);
-}
-
-// static
-SessionStartupPref SessionStartupPref::GetStartupPrefBackup(Profile* profile) {
- protector::ProtectedPrefsWatcher* prefs_watcher =
- protector::ProtectorServiceFactory::GetForProfile(profile)->
- GetPrefsWatcher();
-
- int type;
- CHECK(prefs_watcher->GetBackupForPref(
- prefs::kRestoreOnStartup)->GetAsInteger(&type));
- SessionStartupPref backup_pref(PrefValueToType(type));
-
- const ListValue* url_list;
- CHECK(prefs_watcher->GetBackupForPref(
- prefs::kURLsToRestoreOnStartup)->GetAsList(&url_list));
- URLListToPref(url_list, &backup_pref);
-
- return backup_pref;
-}
-
SessionStartupPref::SessionStartupPref(Type type) : type(type) {}
SessionStartupPref::~SessionStartupPref() {}
« no previous file with comments | « chrome/browser/prefs/session_startup_pref.h ('k') | chrome/browser/profiles/profile_dependency_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698