| OLD | NEW |
| 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 "chrome/browser/bookmarks/chrome_bookmark_client.h" | 5 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" |
| 6 | 6 |
| 7 #include <utility> |
| 8 |
| 7 #include "base/logging.h" | 9 #include "base/logging.h" |
| 8 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 9 #include "chrome/browser/favicon/favicon_service_factory.h" | 11 #include "chrome/browser/favicon/favicon_service_factory.h" |
| 10 #include "chrome/browser/history/history_service_factory.h" | 12 #include "chrome/browser/history/history_service_factory.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 12 #include "components/bookmarks/browser/bookmark_node.h" | 14 #include "components/bookmarks/browser/bookmark_node.h" |
| 13 #include "components/bookmarks/browser/bookmark_storage.h" | 15 #include "components/bookmarks/browser/bookmark_storage.h" |
| 14 #include "components/bookmarks/managed/managed_bookmark_service.h" | 16 #include "components/bookmarks/managed/managed_bookmark_service.h" |
| 15 #include "components/bookmarks/managed/managed_bookmark_util.h" | 17 #include "components/bookmarks/managed/managed_bookmark_util.h" |
| 16 #include "components/favicon/core/favicon_util.h" | 18 #include "components/favicon/core/favicon_util.h" |
| 17 #include "components/history/core/browser/history_service.h" | 19 #include "components/history/core/browser/history_service.h" |
| 18 #include "components/history/core/browser/url_database.h" | 20 #include "components/history/core/browser/url_database.h" |
| 21 #include "components/offline_pages/external_listener.h" |
| 19 #include "content/public/browser/user_metrics.h" | 22 #include "content/public/browser/user_metrics.h" |
| 20 #include "ui/base/l10n/l10n_util.h" | 23 #include "ui/base/l10n/l10n_util.h" |
| 21 | 24 |
| 22 ChromeBookmarkClient::ChromeBookmarkClient( | 25 ChromeBookmarkClient::ChromeBookmarkClient( |
| 23 Profile* profile, | 26 Profile* profile, |
| 24 bookmarks::ManagedBookmarkService* managed_bookmark_service) | 27 bookmarks::ManagedBookmarkService* managed_bookmark_service) |
| 25 : profile_(profile), managed_bookmark_service_(managed_bookmark_service) {} | 28 : profile_(profile), managed_bookmark_service_(managed_bookmark_service) {} |
| 26 | 29 |
| 27 ChromeBookmarkClient::~ChromeBookmarkClient() { | 30 ChromeBookmarkClient::~ChromeBookmarkClient() { |
| 28 } | 31 } |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 ? true | 114 ? true |
| 112 : managed_bookmark_service_->CanSyncNode(node); | 115 : managed_bookmark_service_->CanSyncNode(node); |
| 113 } | 116 } |
| 114 | 117 |
| 115 bool ChromeBookmarkClient::CanBeEditedByUser( | 118 bool ChromeBookmarkClient::CanBeEditedByUser( |
| 116 const bookmarks::BookmarkNode* node) { | 119 const bookmarks::BookmarkNode* node) { |
| 117 return !managed_bookmark_service_ | 120 return !managed_bookmark_service_ |
| 118 ? true | 121 ? true |
| 119 : managed_bookmark_service_->CanBeEditedByUser(node); | 122 : managed_bookmark_service_->CanBeEditedByUser(node); |
| 120 } | 123 } |
| OLD | NEW |