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

Side by Side Diff: ios/chrome/browser/bookmarks/bookmarks_utils.cc

Issue 1662523004: Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ios/chrome/browser/bookmarks/bookmarks_utils.h" 5 #include "ios/chrome/browser/bookmarks/bookmarks_utils.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "base/prefs/pref_service.h"
10 #include "components/bookmarks/browser/bookmark_model.h" 9 #include "components/bookmarks/browser/bookmark_model.h"
10 #include "components/prefs/pref_service.h"
11 #include "ios/chrome/browser/bookmarks/bookmark_model_factory.h" 11 #include "ios/chrome/browser/bookmarks/bookmark_model_factory.h"
12 #include "ios/chrome/browser/pref_names.h" 12 #include "ios/chrome/browser/pref_names.h"
13 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state. h" 13 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state. h"
14 14
15 using bookmarks::BookmarkModel; 15 using bookmarks::BookmarkModel;
16 using bookmarks::BookmarkNode; 16 using bookmarks::BookmarkNode;
17 17
18 void RecordBookmarkLaunch(BookmarkLaunchLocation launch_location) { 18 void RecordBookmarkLaunch(BookmarkLaunchLocation launch_location) {
19 DCHECK(launch_location < BOOKMARK_LAUNCH_LOCATION_COUNT); 19 DCHECK(launch_location < BOOKMARK_LAUNCH_LOCATION_COUNT);
20 UMA_HISTOGRAM_ENUMERATION("Stars.LaunchLocation", launch_location, 20 UMA_HISTOGRAM_ENUMERATION("Stars.LaunchLocation", launch_location,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 const std::vector<const BookmarkNode*> root_folders(RootLevelFolders(model)); 89 const std::vector<const BookmarkNode*> root_folders(RootLevelFolders(model));
90 const BookmarkNode* top = node; 90 const BookmarkNode* top = node;
91 while (top && 91 while (top &&
92 std::find(root_folders.begin(), root_folders.end(), top) == 92 std::find(root_folders.begin(), root_folders.end(), top) ==
93 root_folders.end()) { 93 root_folders.end()) {
94 top = top->parent(); 94 top = top->parent();
95 } 95 }
96 return top; 96 return top;
97 } 97 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/bookmarks/bookmark_model_factory.cc ('k') | ios/chrome/browser/browser_state/browser_state_info_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698