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

Side by Side Diff: chrome/browser/ui/webui/ntp/android/bookmarks_handler.cc

Issue 253753005: Move bookmarks' production code to components/bookmarks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@367656
Patch Set: Fix compilation for win_chromium_x64_rel Created 6 years, 7 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 | « chrome/browser/ui/webui/history_ui.cc ('k') | chrome/browser/undo/bookmark_renumber_observer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/webui/ntp/android/bookmarks_handler.h" 5 #include "chrome/browser/ui/webui/ntp/android/bookmarks_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ref_counted_memory.h" 8 #include "base/memory/ref_counted_memory.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
11 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "chrome/browser/android/tab_android.h" 13 #include "chrome/browser/android/tab_android.h"
14 #include "chrome/browser/bookmarks/bookmark_model.h"
15 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 14 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
16 #include "chrome/browser/bookmarks/bookmark_utils.h"
17 #include "chrome/browser/favicon/favicon_service_factory.h" 15 #include "chrome/browser/favicon/favicon_service_factory.h"
18 #include "chrome/browser/profiles/incognito_helpers.h" 16 #include "chrome/browser/profiles/incognito_helpers.h"
19 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
20 #include "chrome/browser/profiles/profile_manager.h" 18 #include "chrome/browser/profiles/profile_manager.h"
21 #include "chrome/browser/ui/webui/favicon_source.h" 19 #include "chrome/browser/ui/webui/favicon_source.h"
22 #include "chrome/common/pref_names.h" 20 #include "chrome/common/pref_names.h"
21 #include "components/bookmarks/core/browser/bookmark_model.h"
22 #include "components/bookmarks/core/browser/bookmark_utils.h"
23 #include "content/public/browser/browser_thread.h" 23 #include "content/public/browser/browser_thread.h"
24 #include "content/public/browser/url_data_source.h" 24 #include "content/public/browser/url_data_source.h"
25 #include "content/public/browser/web_contents.h" 25 #include "content/public/browser/web_contents.h"
26 #include "third_party/skia/include/core/SkBitmap.h" 26 #include "third_party/skia/include/core/SkBitmap.h"
27 #include "ui/gfx/codec/png_codec.h" 27 #include "ui/gfx/codec/png_codec.h"
28 #include "ui/gfx/color_analysis.h" 28 #include "ui/gfx/color_analysis.h"
29 #include "ui/gfx/favicon_size.h" 29 #include "ui/gfx/favicon_size.h"
30 30
31 using base::Int64ToString; 31 using base::Int64ToString;
32 using content::BrowserThread; 32 using content::BrowserThread;
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 return !managed_bookmarks_shim_->IsManagedBookmark(node); 574 return !managed_bookmarks_shim_->IsManagedBookmark(node);
575 } 575 }
576 576
577 bool BookmarksHandler::IsRoot(const BookmarkNode* node) const { 577 bool BookmarksHandler::IsRoot(const BookmarkNode* node) const {
578 DCHECK(AreModelsLoaded()); 578 DCHECK(AreModelsLoaded());
579 579
580 return node->is_root() && 580 return node->is_root() &&
581 node != partner_bookmarks_shim_->GetPartnerBookmarksRoot() && 581 node != partner_bookmarks_shim_->GetPartnerBookmarksRoot() &&
582 node != managed_bookmarks_shim_->GetManagedBookmarksRoot(); 582 node != managed_bookmarks_shim_->GetManagedBookmarksRoot();
583 } 583 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/history_ui.cc ('k') | chrome/browser/undo/bookmark_renumber_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698