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

Side by Side Diff: chrome/browser/ui/location_bar/location_bar.cc

Issue 505913002: Remove implicit conversions from scoped_refptr to T* in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 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/ui/location_bar/location_bar.h" 5 #include "chrome/browser/ui/location_bar/location_bar.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/common/extensions/manifest_handlers/ui_overrides_handler.h" 8 #include "chrome/common/extensions/manifest_handlers/ui_overrides_handler.h"
9 #include "extensions/browser/extension_registry.h" 9 #include "extensions/browser/extension_registry.h"
10 #include "extensions/common/extension_set.h" 10 #include "extensions/common/extension_set.h"
11 #include "extensions/common/feature_switch.h" 11 #include "extensions/common/feature_switch.h"
12 #include "extensions/common/permissions/permissions_data.h" 12 #include "extensions/common/permissions/permissions_data.h"
13 13
14 14
15 LocationBar::LocationBar(Profile* profile) : profile_(profile) { 15 LocationBar::LocationBar(Profile* profile) : profile_(profile) {
16 } 16 }
17 17
18 LocationBar::~LocationBar() { 18 LocationBar::~LocationBar() {
19 } 19 }
20 20
21 bool LocationBar::IsBookmarkStarHiddenByExtension() const { 21 bool LocationBar::IsBookmarkStarHiddenByExtension() const {
22 const extensions::ExtensionSet& extension_set = 22 const extensions::ExtensionSet& extension_set =
23 extensions::ExtensionRegistry::Get(profile_)->enabled_extensions(); 23 extensions::ExtensionRegistry::Get(profile_)->enabled_extensions();
24 for (extensions::ExtensionSet::const_iterator i = extension_set.begin(); 24 for (extensions::ExtensionSet::const_iterator i = extension_set.begin();
25 i != extension_set.end(); ++i) { 25 i != extension_set.end(); ++i) {
26 if (extensions::UIOverrides::RemovesBookmarkButton(*i) && 26 if (extensions::UIOverrides::RemovesBookmarkButton(i->get()) &&
27 ((*i)->permissions_data()->HasAPIPermission( 27 ((*i)->permissions_data()->HasAPIPermission(
msw 2014/08/26 23:39:24 q: did you intend to fix this (*i) too?
dcheng 2014/08/26 23:45:09 Technically, I don't think this one needs to be re
msw 2014/08/27 00:02:39 Acknowledged.
28 extensions::APIPermission::kBookmarkManagerPrivate) || 28 extensions::APIPermission::kBookmarkManagerPrivate) ||
29 extensions::FeatureSwitch::enable_override_bookmarks_ui() 29 extensions::FeatureSwitch::enable_override_bookmarks_ui()
30 ->IsEnabled())) 30 ->IsEnabled()))
31 return true; 31 return true;
32 } 32 }
33 33
34 return false; 34 return false;
35 } 35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698