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

Unified Diff: chrome/browser/extensions/user_script_listener.cc

Issue 10696176: Move UserScript and related into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for cq Created 8 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/extensions/user_script_listener.cc
diff --git a/chrome/browser/extensions/user_script_listener.cc b/chrome/browser/extensions/user_script_listener.cc
index 47fed2b29b39692c2b81676e4ae31a266f30f014..efa0e9ca5266d14de5d0ac4e5c22b392ce06c873 100644
--- a/chrome/browser/extensions/user_script_listener.cc
+++ b/chrome/browser/extensions/user_script_listener.cc
@@ -19,6 +19,8 @@
using content::BrowserThread;
using content::ResourceThrottle;
+namespace extensions {
+
class UserScriptListener::Throttle
: public ResourceThrottle,
public base::SupportsWeakPtr<UserScriptListener::Throttle> {
@@ -164,9 +166,8 @@ void UserScriptListener::ReplaceURLPatterns(void* profile_id,
data.url_patterns = patterns;
}
-void UserScriptListener::CollectURLPatterns(
- const extensions::Extension* extension,
- URLPatterns* patterns) {
+void UserScriptListener::CollectURLPatterns(const Extension* extension,
+ URLPatterns* patterns) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
const UserScriptList& scripts = extension->content_scripts();
@@ -186,8 +187,8 @@ void UserScriptListener::Observe(int type,
switch (type) {
case chrome::NOTIFICATION_EXTENSION_LOADED: {
Profile* profile = content::Source<Profile>(source).ptr();
- const extensions::Extension* extension =
- content::Details<const extensions::Extension>(details).ptr();
+ const Extension* extension =
+ content::Details<const Extension>(details).ptr();
if (extension->content_scripts().empty())
return; // no new patterns from this extension.
@@ -203,9 +204,8 @@ void UserScriptListener::Observe(int type,
case chrome::NOTIFICATION_EXTENSION_UNLOADED: {
Profile* profile = content::Source<Profile>(source).ptr();
- const extensions::Extension* unloaded_extension =
- content::Details<extensions::UnloadedExtensionInfo>(
- details)->extension;
+ const Extension* unloaded_extension =
+ content::Details<UnloadedExtensionInfo>(details)->extension;
if (unloaded_extension->content_scripts().empty())
return; // no patterns to delete for this extension.
@@ -241,3 +241,5 @@ void UserScriptListener::Observe(int type,
NOTREACHED();
}
}
+
+} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/user_script_listener.h ('k') | chrome/browser/extensions/user_script_listener_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698