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

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

Issue 508513002: Remove implicit conversions from scoped_refptr to T* in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Two more Created 6 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/location_bar_controller.h" 5 #include "chrome/browser/extensions/location_bar_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/extensions/active_script_controller.h" 8 #include "chrome/browser/extensions/active_script_controller.h"
9 #include "chrome/browser/extensions/page_action_controller.h" 9 #include "chrome/browser/extensions/page_action_controller.h"
10 #include "chrome/browser/ui/browser_finder.h" 10 #include "chrome/browser/ui/browser_finder.h"
(...skipping 29 matching lines...) Expand all
40 ExtensionRegistry::Get(web_contents_->GetBrowserContext()) 40 ExtensionRegistry::Get(web_contents_->GetBrowserContext())
41 ->enabled_extensions(); 41 ->enabled_extensions();
42 std::vector<ExtensionAction*> current_actions; 42 std::vector<ExtensionAction*> current_actions;
43 for (ExtensionSet::const_iterator iter = extensions.begin(); 43 for (ExtensionSet::const_iterator iter = extensions.begin();
44 iter != extensions.end(); 44 iter != extensions.end();
45 ++iter) { 45 ++iter) {
46 // Right now, we can consolidate these actions because we only want to show 46 // Right now, we can consolidate these actions because we only want to show
47 // one action per extension. If clicking on an active script action ever 47 // one action per extension. If clicking on an active script action ever
48 // has a response, then we will need to split the actions. 48 // has a response, then we will need to split the actions.
49 ExtensionAction* action = 49 ExtensionAction* action =
50 page_action_controller_->GetActionForExtension(*iter); 50 page_action_controller_->GetActionForExtension(iter->get());
51 if (!action) 51 if (!action)
52 action = active_script_controller_->GetActionForExtension(*iter); 52 action = active_script_controller_->GetActionForExtension(iter->get());
53 if (action) 53 if (action)
54 current_actions.push_back(action); 54 current_actions.push_back(action);
55 } 55 }
56 56
57 return current_actions; 57 return current_actions;
58 } 58 }
59 59
60 ExtensionAction::ShowAction LocationBarController::OnClicked( 60 ExtensionAction::ShowAction LocationBarController::OnClicked(
61 const ExtensionAction* action) { 61 const ExtensionAction* action) {
62 const Extension* extension = 62 const Extension* extension =
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 if (active_script_controller_->GetActionForExtension(extension)) { 117 if (active_script_controller_->GetActionForExtension(extension)) {
118 active_script_controller_->OnExtensionUnloaded(extension); 118 active_script_controller_->OnExtensionUnloaded(extension);
119 should_update = true; 119 should_update = true;
120 } 120 }
121 121
122 if (should_update) 122 if (should_update)
123 NotifyChange(web_contents()); 123 NotifyChange(web_contents());
124 } 124 }
125 125
126 } // namespace extensions 126 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698