| OLD | NEW |
| 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/bookmark_client_impl.h" | 5 #include "ios/chrome/browser/bookmarks/bookmark_client_impl.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/metrics/user_metrics.h" |
| 8 #include "base/task/cancelable_task_tracker.h" | 9 #include "base/task/cancelable_task_tracker.h" |
| 9 #include "components/bookmarks/browser/bookmark_node.h" | 10 #include "components/bookmarks/browser/bookmark_node.h" |
| 10 #include "components/bookmarks/browser/bookmark_storage.h" | 11 #include "components/bookmarks/browser/bookmark_storage.h" |
| 11 #include "components/favicon/core/favicon_util.h" | 12 #include "components/favicon/core/favicon_util.h" |
| 12 #include "components/favicon_base/favicon_types.h" | 13 #include "components/favicon_base/favicon_types.h" |
| 13 #include "components/history/core/browser/history_service.h" | 14 #include "components/history/core/browser/history_service.h" |
| 14 #include "components/history/core/browser/url_database.h" | 15 #include "components/history/core/browser/url_database.h" |
| 15 #include "components/keyed_service/core/service_access_type.h" | 16 #include "components/keyed_service/core/service_access_type.h" |
| 16 #include "ios/chrome/browser/favicon/favicon_service_factory.h" | 17 #include "ios/chrome/browser/favicon/favicon_service_factory.h" |
| 17 #include "ios/chrome/browser/history/history_service_factory.h" | 18 #include "ios/chrome/browser/history/history_service_factory.h" |
| 18 #include "ios/web/public/user_metrics.h" | |
| 19 | 19 |
| 20 BookmarkClientImpl::BookmarkClientImpl(ios::ChromeBrowserState* browser_state) | 20 BookmarkClientImpl::BookmarkClientImpl(ios::ChromeBrowserState* browser_state) |
| 21 : browser_state_(browser_state) {} | 21 : browser_state_(browser_state) {} |
| 22 | 22 |
| 23 BookmarkClientImpl::~BookmarkClientImpl() {} | 23 BookmarkClientImpl::~BookmarkClientImpl() {} |
| 24 | 24 |
| 25 bool BookmarkClientImpl::PreferTouchIcon() { | 25 bool BookmarkClientImpl::PreferTouchIcon() { |
| 26 return true; | 26 return true; |
| 27 } | 27 } |
| 28 | 28 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 node_typed_count_pairs->push_back(pair); | 63 node_typed_count_pairs->push_back(pair); |
| 64 } | 64 } |
| 65 } | 65 } |
| 66 | 66 |
| 67 bool BookmarkClientImpl::IsPermanentNodeVisible( | 67 bool BookmarkClientImpl::IsPermanentNodeVisible( |
| 68 const bookmarks::BookmarkPermanentNode* node) { | 68 const bookmarks::BookmarkPermanentNode* node) { |
| 69 return node->type() == bookmarks::BookmarkNode::MOBILE; | 69 return node->type() == bookmarks::BookmarkNode::MOBILE; |
| 70 } | 70 } |
| 71 | 71 |
| 72 void BookmarkClientImpl::RecordAction(const base::UserMetricsAction& action) { | 72 void BookmarkClientImpl::RecordAction(const base::UserMetricsAction& action) { |
| 73 web::RecordAction(action); | 73 base::RecordAction(action); |
| 74 } | 74 } |
| 75 | 75 |
| 76 bookmarks::LoadExtraCallback BookmarkClientImpl::GetLoadExtraNodesCallback() { | 76 bookmarks::LoadExtraCallback BookmarkClientImpl::GetLoadExtraNodesCallback() { |
| 77 return bookmarks::LoadExtraCallback(); | 77 return bookmarks::LoadExtraCallback(); |
| 78 } | 78 } |
| 79 | 79 |
| 80 bool BookmarkClientImpl::CanSetPermanentNodeTitle( | 80 bool BookmarkClientImpl::CanSetPermanentNodeTitle( |
| 81 const bookmarks::BookmarkNode* permanent_node) { | 81 const bookmarks::BookmarkNode* permanent_node) { |
| 82 return true; | 82 return true; |
| 83 } | 83 } |
| 84 | 84 |
| 85 bool BookmarkClientImpl::CanSyncNode(const bookmarks::BookmarkNode* node) { | 85 bool BookmarkClientImpl::CanSyncNode(const bookmarks::BookmarkNode* node) { |
| 86 return true; | 86 return true; |
| 87 } | 87 } |
| 88 | 88 |
| 89 bool BookmarkClientImpl::CanBeEditedByUser( | 89 bool BookmarkClientImpl::CanBeEditedByUser( |
| 90 const bookmarks::BookmarkNode* node) { | 90 const bookmarks::BookmarkNode* node) { |
| 91 return true; | 91 return true; |
| 92 } | 92 } |
| OLD | NEW |