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

Unified Diff: chrome/browser/ui/browser_init.cc

Issue 10065016: [protector] Refactoring of --no-protector code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/search_engines/template_url_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_init.cc
diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc
index c4d57541cde3ace59e16cc67ba43b33c54649b7e..7f6bf7bad55f605f661a2ee16cdb524246efce7b 100644
--- a/chrome/browser/ui/browser_init.cc
+++ b/chrome/browser/ui/browser_init.cc
@@ -1582,18 +1582,11 @@ void BrowserInit::LaunchWithProfile::CheckPreferencesBackup(Profile* profile) {
ProtectorServiceFactory::GetForProfile(profile);
ProtectedPrefsWatcher* prefs_watcher = protector_service->GetPrefsWatcher();
- // BaseSettingChange instances are always created, even when Protector is
- // disabled, to report corresponding histograms. With Protector disabled,
- // the backup is updated to match the new setting value, otherwise histograms
- // would be reported on each run.
- // TODO(ivankr): move IsEnabled() check to ProtectorService::ShowChange().
-
// Check if backup is valid.
if (!prefs_watcher->is_backup_valid()) {
scoped_ptr<BaseSettingChange> change(
protector::CreatePrefsBackupInvalidChange());
- if (protector::IsEnabled())
- protector_service->ShowChange(change.release());
+ protector_service->ShowChange(change.release());
// Further checks make no sense.
return;
}
@@ -1612,12 +1605,7 @@ void BrowserInit::LaunchWithProfile::CheckPreferencesBackup(Profile* profile) {
new_tabs,
SessionStartupPref::GetStartupPrefBackup(profile),
PinnedTabCodec::ReadPinnedTabs(tabs_backup)));
- if (protector::IsEnabled()) {
- protector_service->ShowChange(change.release());
- } else {
- SessionStartupPref::SetStartupPref(profile, new_pref);
- PinnedTabCodec::WritePinnedTabs(profile, new_tabs);
- }
+ protector_service->ShowChange(change.release());
}
}
« no previous file with comments | « chrome/browser/search_engines/template_url_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698