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

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

Issue 9748016: [protector] Added UI for invalid Preferences backup case. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix unit-test. Created 8 years, 9 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/ui/browser_init.h ('k') | chrome/chrome_browser.gypi » ('j') | 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 29b953df690ad8b8946926331209c44e1b8127ec..12a1a8c9dc9985f2d64e4ed136cddd657c4c0b48 100644
--- a/chrome/browser/ui/browser_init.cc
+++ b/chrome/browser/ui/browser_init.cc
@@ -55,6 +55,7 @@
#include "chrome/browser/profiles/profile_io_data.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/protector/base_setting_change.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/search_engines/template_url.h"
@@ -942,6 +943,9 @@ bool BrowserInit::LaunchWithProfile::Launch(
KeystoneInfoBar::PromotionInfoBar(profile);
#endif
}
+
+ // Notify user if the Preferences backup is invalid.
+ CheckPreferencesBackup(profile);
}
#if defined(OS_WIN)
@@ -1583,6 +1587,15 @@ bool BrowserInit::LaunchWithProfile::CheckIfAutoLaunched(Profile* profile) {
return false;
}
+void BrowserInit::LaunchWithProfile::CheckPreferencesBackup(Profile* profile) {
+ protector::ProtectorService* protector_service =
+ protector::ProtectorServiceFactory::GetForProfile(profile);
+ protector::ProtectedPrefsWatcher* prefs_watcher =
+ protector_service->GetPrefsWatcher();
+ if (protector::IsEnabled() && !prefs_watcher->is_backup_valid())
+ protector_service->ShowChange(protector::CreatePrefsBackupInvalidChange());
+}
+
std::vector<GURL> BrowserInit::GetURLsFromCommandLine(
const CommandLine& command_line,
const FilePath& cur_dir,
« no previous file with comments | « chrome/browser/ui/browser_init.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698