Index: chrome/browser/ui/browser_init.cc |
diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc |
index 82cc3672f03614510822dfc79edfa2a139c1bf1f..6cdf7e7dc1876e85ee3b2f75ba6791fbdc9d2786 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" |
@@ -945,6 +946,9 @@ bool BrowserInit::LaunchWithProfile::Launch( |
KeystoneInfoBar::PromotionInfoBar(profile); |
#endif |
} |
+ |
+ // Notify user if the Preferences backup is invalid. |
+ CheckPreferencesBackup(profile); |
sky
2012/03/20 17:23:18
Don't we only want to do this once per profile?
Ivan Korotkov
2012/03/20 17:40:59
Hm, right, thanks -- I'll update the CL tomorrow t
Ivan Korotkov
2012/03/21 10:02:06
It actually works with multiprofiles as well -- th
|
} |
#if defined(OS_WIN) |
@@ -1647,6 +1651,18 @@ size_t BrowserInit::LaunchWithProfile::ShowSyncPromoDialog( |
return std::string::npos; |
} |
+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()) { |
+ // Sign the backup so that the bubble won't be shown on next browser start. |
+ prefs_watcher->UpdateBackupSignature(); |
+ protector_service->ShowChange(protector::CreatePrefsBackupInvalidChange()); |
+ } |
+} |
+ |
std::vector<GURL> BrowserInit::GetURLsFromCommandLine( |
const CommandLine& command_line, |
const FilePath& cur_dir, |