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

Side by Side Diff: chrome/browser/ui/bookmarks/bookmark_utils.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, 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 (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/ui/bookmarks/bookmark_utils.h" 5 #include "chrome/browser/ui/bookmarks/bookmark_utils.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 const extensions::ExtensionSet& extension_set = 165 const extensions::ExtensionSet& extension_set =
166 registry->enabled_extensions(); 166 registry->enabled_extensions();
167 167
168 // This flag tracks whether any extension wants the disposition to be 168 // This flag tracks whether any extension wants the disposition to be
169 // removed. 169 // removed.
170 bool removed = false; 170 bool removed = false;
171 for (extensions::ExtensionSet::const_iterator i = extension_set.begin(); 171 for (extensions::ExtensionSet::const_iterator i = extension_set.begin();
172 i != extension_set.end(); 172 i != extension_set.end();
173 ++i) { 173 ++i) {
174 // Use the overridden disposition if any extension wants it. 174 // Use the overridden disposition if any extension wants it.
175 if (command_service->OverridesBookmarkShortcut(*i)) 175 if (command_service->OverridesBookmarkShortcut(i->get()))
176 return BOOKMARK_SHORTCUT_DISPOSITION_OVERRIDDEN; 176 return BOOKMARK_SHORTCUT_DISPOSITION_OVERRIDDEN;
177 177
178 if (!removed && extensions::CommandService::RemovesBookmarkShortcut(*i)) 178 if (!removed &&
179 extensions::CommandService::RemovesBookmarkShortcut(i->get()))
msw 2014/08/26 23:39:24 optional nit: add curly braces.
dcheng 2014/08/26 23:45:09 Done.
179 removed = true; 180 removed = true;
180 } 181 }
181 182
182 if (removed) 183 if (removed)
183 return BOOKMARK_SHORTCUT_DISPOSITION_REMOVED; 184 return BOOKMARK_SHORTCUT_DISPOSITION_REMOVED;
184 return BOOKMARK_SHORTCUT_DISPOSITION_UNCHANGED; 185 return BOOKMARK_SHORTCUT_DISPOSITION_UNCHANGED;
185 } 186 }
186 187
187 } // namespace 188 } // namespace
188 189
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 extensions::ExtensionRegistry::Get(profile); 349 extensions::ExtensionRegistry::Get(profile);
349 if (!registry) 350 if (!registry)
350 return false; 351 return false;
351 352
352 const extensions::ExtensionSet& extension_set = 353 const extensions::ExtensionSet& extension_set =
353 registry->enabled_extensions(); 354 registry->enabled_extensions();
354 355
355 for (extensions::ExtensionSet::const_iterator i = extension_set.begin(); 356 for (extensions::ExtensionSet::const_iterator i = extension_set.begin();
356 i != extension_set.end(); 357 i != extension_set.end();
357 ++i) { 358 ++i) {
358 if (extensions::CommandService::RemovesBookmarkOpenPagesShortcut(*i)) 359 if (extensions::CommandService::RemovesBookmarkOpenPagesShortcut(i->get()))
359 return true; 360 return true;
360 } 361 }
361 362
362 return false; 363 return false;
363 } 364 }
364 365
365 } // namespace chrome 366 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698