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

Side by Side Diff: components/enhanced_bookmarks/bookmark_server_cluster_service.cc

Issue 682933002: Reduce frequency of requesting bookmark clusters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 "components/enhanced_bookmarks/bookmark_server_cluster_service.h" 5 #include "components/enhanced_bookmarks/bookmark_server_cluster_service.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 const BookmarkNode* node) { 183 const BookmarkNode* node) {
184 // Nothing to do. 184 // Nothing to do.
185 } 185 }
186 186
187 void BookmarkServerClusterService::EnhancedBookmarkRemoved( 187 void BookmarkServerClusterService::EnhancedBookmarkRemoved(
188 const BookmarkNode* node) { 188 const BookmarkNode* node) {
189 // It is possible to remove the entries from the map here, but as those are 189 // It is possible to remove the entries from the map here, but as those are
190 // filtered in ClustersForBookmark() this is not strictly necessary. 190 // filtered in ClustersForBookmark() this is not strictly necessary.
191 } 191 }
192 192
193 void BookmarkServerClusterService::EnhancedBookmarkNodeChanged(
194 BookmarkModel* model,
195 const BookmarkNode* node) {
196 // Nothing to do.
197 }
198
193 void BookmarkServerClusterService::EnhancedBookmarkAllUserNodesRemoved() { 199 void BookmarkServerClusterService::EnhancedBookmarkAllUserNodesRemoved() {
194 if (!cluster_data_.empty()) { 200 if (!cluster_data_.empty()) {
195 ClusterMap empty; 201 ClusterMap empty;
196 SwapModel(&empty); 202 SwapModel(&empty);
197 } 203 }
198 } 204 }
199 205
200 void BookmarkServerClusterService::EnhancedBookmarkRemoteIdChanged( 206 void BookmarkServerClusterService::EnhancedBookmarkRemoteIdChanged(
201 const BookmarkNode* node, 207 const BookmarkNode* node,
202 const std::string& old_remote_id, 208 const std::string& old_remote_id,
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 return false; 312 return false;
307 stars_ids.push_back(stars_id); 313 stars_ids.push_back(stars_id);
308 } 314 }
309 output.insert(std::make_pair(key, stars_ids)); 315 output.insert(std::make_pair(key, stars_ids));
310 } 316 }
311 out_map->swap(output); 317 out_map->swap(output);
312 return true; 318 return true;
313 } 319 }
314 320
315 } // namespace enhanced_bookmarks 321 } // namespace enhanced_bookmarks
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698