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

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

Issue 10626007: Move ExtensionSystem into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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 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/script_badge_controller.h" 5 #include "chrome/browser/extensions/script_badge_controller.h"
6 6
7 #include "chrome/browser/extensions/extension_browser_event_router.h" 7 #include "chrome/browser/extensions/extension_browser_event_router.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_system.h" 9 #include "chrome/browser/extensions/extension_system.h"
10 #include "chrome/browser/extensions/extension_tab_helper.h" 10 #include "chrome/browser/extensions/extension_tab_helper.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 const std::string& error) { 100 const std::string& error) {
101 if (success && page_id == GetPageID()) { 101 if (success && page_id == GetPageID()) {
102 if (InsertExtension(extension_id)) 102 if (InsertExtension(extension_id))
103 NotifyChange(); 103 NotifyChange();
104 } 104 }
105 105
106 callback.Run(success, page_id, error); 106 callback.Run(success, page_id, error);
107 } 107 }
108 108
109 ExtensionService* ScriptBadgeController::GetExtensionService() { 109 ExtensionService* ScriptBadgeController::GetExtensionService() {
110 return ExtensionSystem::Get(tab_contents_->profile())->extension_service(); 110 return extensions::ExtensionSystem::Get(
111 tab_contents_->profile())->extension_service();
111 } 112 }
112 113
113 int32 ScriptBadgeController::GetPageID() { 114 int32 ScriptBadgeController::GetPageID() {
114 return tab_contents_->web_contents()->GetController().GetActiveEntry()-> 115 return tab_contents_->web_contents()->GetController().GetActiveEntry()->
115 GetPageID(); 116 GetPageID();
116 } 117 }
117 118
118 void ScriptBadgeController::NotifyChange() { 119 void ScriptBadgeController::NotifyChange() {
119 content::NotificationService::current()->Notify( 120 content::NotificationService::current()->Notify(
120 chrome::NOTIFICATION_EXTENSION_LOCATION_BAR_UPDATED, 121 chrome::NOTIFICATION_EXTENSION_LOCATION_BAR_UPDATED,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 current_actions_.erase(it); 203 current_actions_.erase(it);
203 break; 204 break;
204 } 205 }
205 } 206 }
206 207
207 CHECK_EQ(size_before, current_actions_.size() + 1); 208 CHECK_EQ(size_before, current_actions_.size() + 1);
208 return true; 209 return true;
209 } 210 }
210 211
211 } // namespace extensions 212 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698