| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 const BookmarkNode* node) { | 191 const BookmarkNode* node) { |
| 192 // Nothing to do. | 192 // Nothing to do. |
| 193 } | 193 } |
| 194 | 194 |
| 195 void BookmarkServerClusterService::EnhancedBookmarkRemoved( | 195 void BookmarkServerClusterService::EnhancedBookmarkRemoved( |
| 196 const BookmarkNode* node) { | 196 const BookmarkNode* node) { |
| 197 // It is possible to remove the entries from the map here, but as those are | 197 // It is possible to remove the entries from the map here, but as those are |
| 198 // filtered in ClustersForBookmark() this is not strictly necessary. | 198 // filtered in ClustersForBookmark() this is not strictly necessary. |
| 199 } | 199 } |
| 200 | 200 |
| 201 void BookmarkServerClusterService::EnhancedBookmarkNodeChanged( |
| 202 const BookmarkNode* node) { |
| 203 // Nothing to do. |
| 204 } |
| 205 |
| 201 void BookmarkServerClusterService::EnhancedBookmarkAllUserNodesRemoved() { | 206 void BookmarkServerClusterService::EnhancedBookmarkAllUserNodesRemoved() { |
| 202 if (!cluster_data_.empty()) { | 207 if (!cluster_data_.empty()) { |
| 203 ClusterMap empty; | 208 ClusterMap empty; |
| 204 SwapModel(&empty); | 209 SwapModel(&empty); |
| 205 } | 210 } |
| 206 } | 211 } |
| 207 | 212 |
| 208 void BookmarkServerClusterService::EnhancedBookmarkRemoteIdChanged( | 213 void BookmarkServerClusterService::EnhancedBookmarkRemoteIdChanged( |
| 209 const BookmarkNode* node, | 214 const BookmarkNode* node, |
| 210 const std::string& old_remote_id, | 215 const std::string& old_remote_id, |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 return false; | 319 return false; |
| 315 stars_ids.push_back(stars_id); | 320 stars_ids.push_back(stars_id); |
| 316 } | 321 } |
| 317 output.insert(std::make_pair(key, stars_ids)); | 322 output.insert(std::make_pair(key, stars_ids)); |
| 318 } | 323 } |
| 319 out_map->swap(output); | 324 out_map->swap(output); |
| 320 return true; | 325 return true; |
| 321 } | 326 } |
| 322 | 327 |
| 323 } // namespace enhanced_bookmarks | 328 } // namespace enhanced_bookmarks |
| OLD | NEW |