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

Unified Diff: extensions/browser/extension_warning_service.h

Issue 503033002: Move ExtensionWarningService and ExtensionsWarningSet to extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@3_web_view_internal
Patch Set: Created 6 years, 4 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: extensions/browser/extension_warning_service.h
diff --git a/chrome/browser/extensions/extension_warning_service.h b/extensions/browser/extension_warning_service.h
similarity index 82%
rename from chrome/browser/extensions/extension_warning_service.h
rename to extensions/browser/extension_warning_service.h
index c311859dd9202764241591b74d46b96b262fb9de..92baa769a8ad03b21b17e81e0abb8434ce8a514e 100644
--- a/chrome/browser/extensions/extension_warning_service.h
+++ b/extensions/browser/extension_warning_service.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_WARNING_SERVICE_H_
-#define CHROME_BROWSER_EXTENSIONS_EXTENSION_WARNING_SERVICE_H_
+#ifndef EXTENSIONS_BROWSER_EXTENSION_WARNING_SERVICE_H_
+#define EXTENSIONS_BROWSER_EXTENSION_WARNING_SERVICE_H_
#include <set>
#include <string>
@@ -12,13 +12,11 @@
#include "base/observer_list.h"
#include "base/scoped_observer.h"
#include "base/threading/non_thread_safe.h"
-#include "chrome/browser/extensions/extension_warning_set.h"
#include "extensions/browser/extension_registry_observer.h"
+#include "extensions/browser/extension_warning_set.h"
// TODO(battre) Remove the Extension prefix.
-class Profile;
-
namespace content {
class NotificationDetails;
James Cook 2014/08/25 20:58:11 nit: forward declare BrowserContext, even though s
Xi Han 2014/08/26 18:21:40 Done.
class NotificationSource;
@@ -40,9 +38,9 @@ class ExtensionWarningService : public ExtensionRegistryObserver,
virtual void ExtensionWarningsChanged() = 0;
};
- // |profile| may be NULL for testing. In this case, be sure to not insert
- // any warnings.
- explicit ExtensionWarningService(Profile* profile);
+ // |browser_context| may be NULL for testing. In this case, be sure to not
+ // insert any warnings.
+ explicit ExtensionWarningService(content::BrowserContext* browser_context);
virtual ~ExtensionWarningService();
// Clears all warnings of types contained in |types| and notifies observers
@@ -62,8 +60,8 @@ class ExtensionWarningService : public ExtensionRegistryObserver,
// Adds a set of warnings and notifies observers if any warning is new.
void AddWarnings(const ExtensionWarningSet& warnings);
- // Notifies the ExtensionWarningService of profile |profile_id| that new
- // |warnings| occurred and triggers a warning badge.
+ // Notifies the ExtensionWarningService of browser_context |profile_id| that
James Cook 2014/08/25 20:58:11 I might rename profile_id to browser_context_id.
Xi Han 2014/08/26 18:21:40 Done.
+ // new |warnings| occurred and triggers a warning badge.
static void NotifyWarningsOnUI(void* profile_id,
const ExtensionWarningSet& warnings);
@@ -82,7 +80,7 @@ class ExtensionWarningService : public ExtensionRegistryObserver,
// Currently existing warnings.
ExtensionWarningSet warnings_;
- Profile* profile_;
+ content::BrowserContext* browser_context_;
Fady Samuel 2014/08/25 21:15:38 Does it make sense to make this const? content::B
Xi Han 2014/08/26 18:21:40 Done.
// Listen to extension unloaded notifications.
ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
@@ -93,4 +91,4 @@ class ExtensionWarningService : public ExtensionRegistryObserver,
} // namespace extensions
-#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WARNING_SERVICE_H_
+#endif // EXTENSIONS_BROWSER_EXTENSION_WARNING_SERVICE_H_

Powered by Google App Engine
This is Rietveld 408576698