| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 base::CancelableTaskTracker::TaskId ChromeBookmarkClient::GetFaviconImageForURL( | 89 base::CancelableTaskTracker::TaskId ChromeBookmarkClient::GetFaviconImageForURL( |
| 90 const GURL& page_url, | 90 const GURL& page_url, |
| 91 int icon_types, | 91 int icon_types, |
| 92 int desired_size_in_dip, | 92 int desired_size_in_dip, |
| 93 const favicon_base::FaviconImageCallback& callback, | 93 const favicon_base::FaviconImageCallback& callback, |
| 94 base::CancelableTaskTracker* tracker) { | 94 base::CancelableTaskTracker* tracker) { |
| 95 FaviconService* favicon_service = | 95 FaviconService* favicon_service = |
| 96 FaviconServiceFactory::GetForProfile(profile_, Profile::EXPLICIT_ACCESS); | 96 FaviconServiceFactory::GetForProfile(profile_, Profile::EXPLICIT_ACCESS); |
| 97 if (!favicon_service) | 97 if (!favicon_service) |
| 98 return base::CancelableTaskTracker::kBadTaskId; | 98 return base::CancelableTaskTracker::kBadTaskId; |
| 99 return favicon_service->GetFaviconImageForURL( | 99 return favicon_service->GetFaviconImageForPageURL( |
| 100 FaviconService::FaviconForURLParams( | 100 FaviconService::FaviconForPageURLParams( |
| 101 page_url, icon_types, desired_size_in_dip), | 101 page_url, icon_types, desired_size_in_dip), |
| 102 callback, | 102 callback, |
| 103 tracker); | 103 tracker); |
| 104 } | 104 } |
| 105 | 105 |
| 106 bool ChromeBookmarkClient::SupportsTypedCountForNodes() { | 106 bool ChromeBookmarkClient::SupportsTypedCountForNodes() { |
| 107 return true; | 107 return true; |
| 108 } | 108 } |
| 109 | 109 |
| 110 void ChromeBookmarkClient::GetTypedCountForNodes( | 110 void ChromeBookmarkClient::GetTypedCountForNodes( |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 return extra_nodes.Pass(); | 245 return extra_nodes.Pass(); |
| 246 } | 246 } |
| 247 | 247 |
| 248 std::string ChromeBookmarkClient::GetManagedBookmarksDomain() { | 248 std::string ChromeBookmarkClient::GetManagedBookmarksDomain() { |
| 249 policy::ProfilePolicyConnector* connector = | 249 policy::ProfilePolicyConnector* connector = |
| 250 policy::ProfilePolicyConnectorFactory::GetForProfile(profile_); | 250 policy::ProfilePolicyConnectorFactory::GetForProfile(profile_); |
| 251 if (connector->IsPolicyFromCloudPolicy(policy::key::kManagedBookmarks)) | 251 if (connector->IsPolicyFromCloudPolicy(policy::key::kManagedBookmarks)) |
| 252 return connector->GetManagementDomain(); | 252 return connector->GetManagementDomain(); |
| 253 return std::string(); | 253 return std::string(); |
| 254 } | 254 } |
| OLD | NEW |