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

Side by Side Diff: chrome/browser/bookmarks/chrome_bookmark_client.cc

Issue 839193002: Move ServiceAccessType into //components/keyed_service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on android Created 5 years, 11 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
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_html_writer_unittest.cc ('k') | chrome/browser/browsing_data/browsing_data_remover.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698