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

Unified Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 7383012: Start and stop the safe browsing service depending on whether any profile is using it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 9 years, 5 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
Index: chrome/browser/ui/webui/options/content_settings_handler.cc
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index 41478320f4435be1a31734fb1dd6a75ce3c0e25b..d00de826b7c1a7ae63f4c59117194423c8ea8a92 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -269,7 +269,7 @@ void ContentSettingsHandler::GetLocalizedValues(
void ContentSettingsHandler::Initialize() {
const HostContentSettingsMap* settings_map = GetContentSettingsMap();
notification_registrar_.Add(
- this, chrome::NOTIFICATION_OTR_PROFILE_CREATED,
+ this, chrome::NOTIFICATION_PROFILE_CREATED,
NotificationService::AllSources());
notification_registrar_.Add(
this, chrome::NOTIFICATION_PROFILE_DESTROYED,
@@ -301,16 +301,16 @@ void ContentSettingsHandler::Observe(int type,
const NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_PROFILE_DESTROYED: {
- Profile* profile = static_cast<Source<Profile> >(source).ptr();
- if (profile->IsOffTheRecord()) {
+ if (Source<Profile>(source).ptr()->IsOffTheRecord()) {
web_ui_->CallJavascriptFunction(
"ContentSettingsExceptionsArea.OTRProfileDestroyed");
}
break;
}
- case chrome::NOTIFICATION_OTR_PROFILE_CREATED: {
- UpdateAllOTRExceptionsViewsFromModel();
+ case chrome::NOTIFICATION_PROFILE_CREATED: {
+ if (Source<Profile>(source).ptr()->IsOffTheRecord())
+ UpdateAllOTRExceptionsViewsFromModel();
break;
}
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc ('k') | chrome/common/chrome_notification_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698