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

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

Issue 1133463005: Update all bookmarks which use an icon URL when a favicon's bitmap is updated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@startup_do_not_unexpire
Patch Set: Created 5 years, 7 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 215
216 bool ChromeBookmarkClient::CanBeEditedByUser(const BookmarkNode* node) { 216 bool ChromeBookmarkClient::CanBeEditedByUser(const BookmarkNode* node) {
217 return !bookmarks::IsDescendantOf(node, managed_node_) && 217 return !bookmarks::IsDescendantOf(node, managed_node_) &&
218 !bookmarks::IsDescendantOf(node, supervised_node_); 218 !bookmarks::IsDescendantOf(node, supervised_node_);
219 } 219 }
220 220
221 void ChromeBookmarkClient::SetHistoryService( 221 void ChromeBookmarkClient::SetHistoryService(
222 history::HistoryService* history_service) { 222 history::HistoryService* history_service) {
223 DCHECK(history_service); 223 DCHECK(history_service);
224 history_service_ = history_service; 224 history_service_ = history_service;
225 favicon_changed_subscription_ = history_service_->AddFaviconChangedCallback( 225 favicon_changed_subscription_ = history_service_->AddFaviconsChangedCallback(
226 base::Bind(&BookmarkModel::OnFaviconChanged, base::Unretained(model_))); 226 base::Bind(&BookmarkModel::OnFaviconsChanged, base::Unretained(model_)));
227 } 227 }
228 228
229 void ChromeBookmarkClient::BookmarkModelChanged() { 229 void ChromeBookmarkClient::BookmarkModelChanged() {
230 } 230 }
231 231
232 void ChromeBookmarkClient::BookmarkNodeRemoved( 232 void ChromeBookmarkClient::BookmarkNodeRemoved(
233 BookmarkModel* model, 233 BookmarkModel* model,
234 const BookmarkNode* parent, 234 const BookmarkNode* parent,
235 int old_index, 235 int old_index,
236 const BookmarkNode* node, 236 const BookmarkNode* node,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 return extra_nodes.Pass(); 280 return extra_nodes.Pass();
281 } 281 }
282 282
283 std::string ChromeBookmarkClient::GetManagedBookmarksDomain() { 283 std::string ChromeBookmarkClient::GetManagedBookmarksDomain() {
284 policy::ProfilePolicyConnector* connector = 284 policy::ProfilePolicyConnector* connector =
285 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile_); 285 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile_);
286 if (connector->IsPolicyFromCloudPolicy(policy::key::kManagedBookmarks)) 286 if (connector->IsPolicyFromCloudPolicy(policy::key::kManagedBookmarks))
287 return connector->GetManagementDomain(); 287 return connector->GetManagementDomain();
288 return std::string(); 288 return std::string();
289 } 289 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698