| 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 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 Loading... |
| 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 |
| OLD | NEW |