| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/bookmarks/managed/managed_bookmark_service.h" | 5 #include "components/bookmarks/managed/managed_bookmark_service.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 DISALLOW_COPY_AND_ASSIGN(BookmarkPermanentNodeLoader); | 61 DISALLOW_COPY_AND_ASSIGN(BookmarkPermanentNodeLoader); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 // Returns a list of initialized BookmarkPermanentNodes using |next_node_id| to | 64 // Returns a list of initialized BookmarkPermanentNodes using |next_node_id| to |
| 65 // start assigning id. |next_node_id| is updated as a side effect of calling | 65 // start assigning id. |next_node_id| is updated as a side effect of calling |
| 66 // this method. | 66 // this method. |
| 67 BookmarkPermanentNodeList LoadExtraNodes( | 67 BookmarkPermanentNodeList LoadExtraNodes( |
| 68 ScopedVector<BookmarkPermanentNodeLoader> loaders, | 68 ScopedVector<BookmarkPermanentNodeLoader> loaders, |
| 69 int64_t* next_node_id) { | 69 int64_t* next_node_id) { |
| 70 BookmarkPermanentNodeList extra_nodes; | 70 BookmarkPermanentNodeList extra_nodes; |
| 71 for (const auto& loader : loaders) | 71 for (auto* loader : loaders) |
| 72 extra_nodes.push_back(loader->Load(next_node_id).release()); | 72 extra_nodes.push_back(loader->Load(next_node_id).release()); |
| 73 return extra_nodes; | 73 return extra_nodes; |
| 74 } | 74 } |
| 75 | 75 |
| 76 } // namespace | 76 } // namespace |
| 77 | 77 |
| 78 ManagedBookmarkService::ManagedBookmarkService( | 78 ManagedBookmarkService::ManagedBookmarkService( |
| 79 PrefService* prefs, | 79 PrefService* prefs, |
| 80 const GetManagementDomainCallback& callback) | 80 const GetManagementDomainCallback& callback) |
| 81 : prefs_(prefs), | 81 : prefs_(prefs), |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 } | 179 } |
| 180 | 180 |
| 181 managed_bookmarks_tracker_.reset(); | 181 managed_bookmarks_tracker_.reset(); |
| 182 supervised_bookmarks_tracker_.reset(); | 182 supervised_bookmarks_tracker_.reset(); |
| 183 | 183 |
| 184 managed_node_ = nullptr; | 184 managed_node_ = nullptr; |
| 185 supervised_node_ = nullptr; | 185 supervised_node_ = nullptr; |
| 186 } | 186 } |
| 187 | 187 |
| 188 } // namespace bookmarks | 188 } // namespace bookmarks |
| OLD | NEW |