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

Side by Side Diff: chrome/browser/extensions/tab_helper.cc

Issue 13825014: Change RulesRegistryService to use ProfileKeyedAPI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added static comment Created 7 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
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 "chrome/browser/extensions/tab_helper.h" 5 #include "chrome/browser/extensions/tab_helper.h"
6 6
7 #include "chrome/browser/extensions/activity_log.h" 7 #include "chrome/browser/extensions/activity_log.h"
8 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h" 8 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h"
9 #include "chrome/browser/extensions/api/declarative_content/content_rules_regist ry.h" 9 #include "chrome/browser/extensions/api/declarative_content/content_rules_regist ry.h"
10 #include "chrome/browser/extensions/crx_installer.h" 10 #include "chrome/browser/extensions/crx_installer.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 TabHelper::TabHelper(content::WebContents* web_contents) 80 TabHelper::TabHelper(content::WebContents* web_contents)
81 : content::WebContentsObserver(web_contents), 81 : content::WebContentsObserver(web_contents),
82 extension_app_(NULL), 82 extension_app_(NULL),
83 ALLOW_THIS_IN_INITIALIZER_LIST( 83 ALLOW_THIS_IN_INITIALIZER_LIST(
84 extension_function_dispatcher_( 84 extension_function_dispatcher_(
85 Profile::FromBrowserContext(web_contents->GetBrowserContext()), 85 Profile::FromBrowserContext(web_contents->GetBrowserContext()),
86 this)), 86 this)),
87 pending_web_app_action_(NONE), 87 pending_web_app_action_(NONE),
88 script_executor_(new ScriptExecutor(web_contents, 88 script_executor_(new ScriptExecutor(web_contents,
89 &script_execution_observers_)), 89 &script_execution_observers_)),
90 rules_registry_service_( 90 rules_registry_service_(RulesRegistryService::Get(
91 ExtensionSystem::Get( 91 Profile::FromBrowserContext(web_contents->GetBrowserContext()))),
92 Profile::FromBrowserContext(web_contents->GetBrowserContext()))->
93 rules_registry_service()),
94 ALLOW_THIS_IN_INITIALIZER_LIST(image_loader_ptr_factory_(this)) { 92 ALLOW_THIS_IN_INITIALIZER_LIST(image_loader_ptr_factory_(this)) {
95 // The ActiveTabPermissionManager requires a session ID; ensure this 93 // The ActiveTabPermissionManager requires a session ID; ensure this
96 // WebContents has one. 94 // WebContents has one.
97 SessionTabHelper::CreateForWebContents(web_contents); 95 SessionTabHelper::CreateForWebContents(web_contents);
98 active_tab_permission_granter_.reset(new ActiveTabPermissionGranter( 96 active_tab_permission_granter_.reset(new ActiveTabPermissionGranter(
99 web_contents, 97 web_contents,
100 SessionID::IdForTab(web_contents), 98 SessionID::IdForTab(web_contents),
101 Profile::FromBrowserContext(web_contents->GetBrowserContext()))); 99 Profile::FromBrowserContext(web_contents->GetBrowserContext())));
102 if (FeatureSwitch::script_badges()->IsEnabled()) { 100 if (FeatureSwitch::script_badges()->IsEnabled()) {
103 location_bar_controller_.reset( 101 location_bar_controller_.reset(
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 script_bubble_controller_->OnExtensionUnloaded( 454 script_bubble_controller_->OnExtensionUnloaded(
457 content::Details<extensions::UnloadedExtensionInfo>( 455 content::Details<extensions::UnloadedExtensionInfo>(
458 details)->extension->id()); 456 details)->extension->id());
459 break; 457 break;
460 } 458 }
461 } 459 }
462 } 460 }
463 } 461 }
464 462
465 } // namespace extensions 463 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698