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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 return true; | 95 return true; |
96 #endif | 96 #endif |
97 } | 97 } |
98 | 98 |
99 base::CancelableTaskTracker::TaskId | 99 base::CancelableTaskTracker::TaskId |
100 ChromeBookmarkClient::GetFaviconImageForPageURL( | 100 ChromeBookmarkClient::GetFaviconImageForPageURL( |
101 const GURL& page_url, | 101 const GURL& page_url, |
102 favicon_base::IconType type, | 102 favicon_base::IconType type, |
103 const favicon_base::FaviconImageCallback& callback, | 103 const favicon_base::FaviconImageCallback& callback, |
104 base::CancelableTaskTracker* tracker) { | 104 base::CancelableTaskTracker* tracker) { |
105 FaviconService* favicon_service = | 105 FaviconService* favicon_service = FaviconServiceFactory::GetForProfile( |
106 FaviconServiceFactory::GetForProfile(profile_, Profile::EXPLICIT_ACCESS); | 106 profile_, ServiceAccessType::EXPLICIT_ACCESS); |
107 if (!favicon_service) | 107 if (!favicon_service) |
108 return base::CancelableTaskTracker::kBadTaskId; | 108 return base::CancelableTaskTracker::kBadTaskId; |
109 if (type == favicon_base::FAVICON) { | 109 if (type == favicon_base::FAVICON) { |
110 return favicon_service->GetFaviconImageForPageURL( | 110 return favicon_service->GetFaviconImageForPageURL( |
111 page_url, callback, tracker); | 111 page_url, callback, tracker); |
112 } else { | 112 } else { |
113 return favicon_service->GetRawFaviconForPageURL( | 113 return favicon_service->GetRawFaviconForPageURL( |
114 page_url, | 114 page_url, |
115 type, | 115 type, |
116 0, | 116 0, |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 return extra_nodes.Pass(); | 249 return extra_nodes.Pass(); |
250 } | 250 } |
251 | 251 |
252 std::string ChromeBookmarkClient::GetManagedBookmarksDomain() { | 252 std::string ChromeBookmarkClient::GetManagedBookmarksDomain() { |
253 policy::ProfilePolicyConnector* connector = | 253 policy::ProfilePolicyConnector* connector = |
254 policy::ProfilePolicyConnectorFactory::GetForProfile(profile_); | 254 policy::ProfilePolicyConnectorFactory::GetForProfile(profile_); |
255 if (connector->IsPolicyFromCloudPolicy(policy::key::kManagedBookmarks)) | 255 if (connector->IsPolicyFromCloudPolicy(policy::key::kManagedBookmarks)) |
256 return connector->GetManagementDomain(); | 256 return connector->GetManagementDomain(); |
257 return std::string(); | 257 return std::string(); |
258 } | 258 } |
OLD | NEW |