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 "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 Loading... |
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 const BookmarkNode* node) { | |
195 // Nothing to do. | |
196 } | |
197 | |
198 void BookmarkServerClusterService::EnhancedBookmarkAllUserNodesRemoved() { | 193 void BookmarkServerClusterService::EnhancedBookmarkAllUserNodesRemoved() { |
199 if (!cluster_data_.empty()) { | 194 if (!cluster_data_.empty()) { |
200 ClusterMap empty; | 195 ClusterMap empty; |
201 SwapModel(&empty); | 196 SwapModel(&empty); |
202 } | 197 } |
203 } | 198 } |
204 | 199 |
205 void BookmarkServerClusterService::EnhancedBookmarkRemoteIdChanged( | 200 void BookmarkServerClusterService::EnhancedBookmarkRemoteIdChanged( |
206 const BookmarkNode* node, | 201 const BookmarkNode* node, |
207 const std::string& old_remote_id, | 202 const std::string& old_remote_id, |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 return false; | 306 return false; |
312 stars_ids.push_back(stars_id); | 307 stars_ids.push_back(stars_id); |
313 } | 308 } |
314 output.insert(std::make_pair(key, stars_ids)); | 309 output.insert(std::make_pair(key, stars_ids)); |
315 } | 310 } |
316 out_map->swap(output); | 311 out_map->swap(output); |
317 return true; | 312 return true; |
318 } | 313 } |
319 | 314 |
320 } // namespace enhanced_bookmarks | 315 } // namespace enhanced_bookmarks |
OLD | NEW |