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

Side by Side Diff: extensions/browser/warning_service.cc

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Rebase Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « extensions/browser/warning_service.h ('k') | extensions/common/extension.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/browser/warning_service.h" 5 #include "extensions/browser/warning_service.h"
6 6
7 #include "content/public/browser/browser_thread.h" 7 #include "content/public/browser/browser_thread.h"
8 #include "extensions/browser/extension_registry.h" 8 #include "extensions/browser/extension_registry.h"
9 #include "extensions/browser/extensions_browser_client.h" 9 #include "extensions/browser/extensions_browser_client.h"
10 #include "extensions/browser/warning_service_factory.h" 10 #include "extensions/browser/warning_service_factory.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 void WarningService::NotifyWarningsChanged( 118 void WarningService::NotifyWarningsChanged(
119 const ExtensionIdSet& affected_extensions) { 119 const ExtensionIdSet& affected_extensions) {
120 for (auto& observer : observer_list_) 120 for (auto& observer : observer_list_)
121 observer.ExtensionWarningsChanged(affected_extensions); 121 observer.ExtensionWarningsChanged(affected_extensions);
122 } 122 }
123 123
124 void WarningService::OnExtensionUnloaded( 124 void WarningService::OnExtensionUnloaded(
125 content::BrowserContext* browser_context, 125 content::BrowserContext* browser_context,
126 const Extension* extension, 126 const Extension* extension,
127 UnloadedExtensionInfo::Reason reason) { 127 UnloadedExtensionReason reason) {
128 // Unloading one extension might have solved the problems of others. 128 // Unloading one extension might have solved the problems of others.
129 // Therefore, we clear warnings of this type for all extensions. 129 // Therefore, we clear warnings of this type for all extensions.
130 std::set<Warning::WarningType> warning_types = 130 std::set<Warning::WarningType> warning_types =
131 GetWarningTypesAffectingExtension(extension->id()); 131 GetWarningTypesAffectingExtension(extension->id());
132 ClearWarnings(warning_types); 132 ClearWarnings(warning_types);
133 } 133 }
134 134
135 } // namespace extensions 135 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/warning_service.h ('k') | extensions/common/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698