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

Side by Side Diff: components/bookmarks/browser/bookmark_utils.cc

Issue 955753002: bookmarks: Remove unnecessary namespace qualifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « components/bookmarks/browser/bookmark_utils.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "components/bookmarks/browser/bookmark_utils.h" 5 #include "components/bookmarks/browser/bookmark_utils.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 return true; 503 return true;
504 } 504 }
505 return false; 505 return false;
506 } 506 }
507 507
508 const BookmarkNode* GetBookmarkNodeByID(const BookmarkModel* model, int64 id) { 508 const BookmarkNode* GetBookmarkNodeByID(const BookmarkModel* model, int64 id) {
509 // TODO(sky): TreeNode needs a method that visits all nodes using a predicate. 509 // TODO(sky): TreeNode needs a method that visits all nodes using a predicate.
510 return GetNodeByID(model->root_node(), id); 510 return GetNodeByID(model->root_node(), id);
511 } 511 }
512 512
513 bool IsDescendantOf(const bookmarks::BookmarkNode* node, 513 bool IsDescendantOf(const BookmarkNode* node, const BookmarkNode* root) {
514 const bookmarks::BookmarkNode* root) {
515 return node && node->HasAncestor(root); 514 return node && node->HasAncestor(root);
516 } 515 }
517 516
518 bool HasDescendantsOf(const std::vector<const bookmarks::BookmarkNode*>& list, 517 bool HasDescendantsOf(const std::vector<const BookmarkNode*>& list,
519 const bookmarks::BookmarkNode* root) { 518 const BookmarkNode* root) {
520 for (const BookmarkNode* node : list) { 519 for (const BookmarkNode* node : list) {
521 if (IsDescendantOf(node, root)) 520 if (IsDescendantOf(node, root))
522 return true; 521 return true;
523 } 522 }
524 return false; 523 return false;
525 } 524 }
526 525
527 } // namespace bookmarks 526 } // namespace bookmarks
OLDNEW
« no previous file with comments | « components/bookmarks/browser/bookmark_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698