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 "chrome/utility/importer/edge_importer_win.h" | 5 #include "chrome/utility/importer/edge_importer_win.h" |
6 | 6 |
7 #include <Shlobj.h> | 7 #include <Shlobj.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 } | 147 } |
148 } | 148 } |
149 } | 149 } |
150 } | 150 } |
151 | 151 |
152 } // namespace | 152 } // namespace |
153 | 153 |
154 EdgeImporter::EdgeImporter() {} | 154 EdgeImporter::EdgeImporter() {} |
155 | 155 |
156 void EdgeImporter::StartImport(const importer::SourceProfile& source_profile, | 156 void EdgeImporter::StartImport(const importer::SourceProfile& source_profile, |
157 uint16 items, | 157 uint16_t items, |
158 ImporterBridge* bridge) { | 158 ImporterBridge* bridge) { |
159 bridge_ = bridge; | 159 bridge_ = bridge; |
160 bridge_->NotifyStarted(); | 160 bridge_->NotifyStarted(); |
161 source_path_ = source_profile.source_path; | 161 source_path_ = source_profile.source_path; |
162 | 162 |
163 if ((items & importer::FAVORITES) && !cancelled()) { | 163 if ((items & importer::FAVORITES) && !cancelled()) { |
164 bridge_->NotifyItemStarted(importer::FAVORITES); | 164 bridge_->NotifyItemStarted(importer::FAVORITES); |
165 ImportFavorites(); | 165 ImportFavorites(); |
166 bridge_->NotifyItemEnded(importer::FAVORITES); | 166 bridge_->NotifyItemEnded(importer::FAVORITES); |
167 } | 167 } |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 // With tree built sort the children of each node including the root. | 279 // With tree built sort the children of each node including the root. |
280 std::sort(root_entry.children.begin(), root_entry.children.end(), | 280 std::sort(root_entry.children.begin(), root_entry.children.end(), |
281 EdgeFavoriteEntryComparator()); | 281 EdgeFavoriteEntryComparator()); |
282 for (auto& entry : database_entries) { | 282 for (auto& entry : database_entries) { |
283 std::sort(entry.second.children.begin(), entry.second.children.end(), | 283 std::sort(entry.second.children.begin(), entry.second.children.end(), |
284 EdgeFavoriteEntryComparator()); | 284 EdgeFavoriteEntryComparator()); |
285 } | 285 } |
286 std::vector<base::string16> path; | 286 std::vector<base::string16> path; |
287 BuildBookmarkEntries(root_entry, false, bookmarks, favicons, &path); | 287 BuildBookmarkEntries(root_entry, false, bookmarks, favicons, &path); |
288 } | 288 } |
OLD | NEW |