OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 // The order of these includes is important. | 5 // The order of these includes is important. |
6 #include <windows.h> | 6 #include <windows.h> |
7 #include <unknwn.h> | 7 #include <unknwn.h> |
8 #include <intshcut.h> | 8 #include <intshcut.h> |
9 #include <propvarutil.h> | 9 #include <propvarutil.h> |
10 #include <shlguid.h> | 10 #include <shlguid.h> |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 ie7_password_count_(0), | 233 ie7_password_count_(0), |
234 importer_items_(importer_items), | 234 importer_items_(importer_items), |
235 ie_version_(ie_version) { | 235 ie_version_(ie_version) { |
236 } | 236 } |
237 | 237 |
238 // importer::ImporterProgressObserver: | 238 // importer::ImporterProgressObserver: |
239 void ImportStarted() override {} | 239 void ImportStarted() override {} |
240 void ImportItemStarted(importer::ImportItem item) override {} | 240 void ImportItemStarted(importer::ImportItem item) override {} |
241 void ImportItemEnded(importer::ImportItem item) override {} | 241 void ImportItemEnded(importer::ImportItem item) override {} |
242 void ImportEnded() override { | 242 void ImportEnded() override { |
243 base::MessageLoop::current()->Quit(); | 243 base::MessageLoop::current()->QuitWhenIdle(); |
244 if (importer_items_ & importer::FAVORITES) { | 244 if (importer_items_ & importer::FAVORITES) { |
245 EXPECT_EQ(arraysize(kIEBookmarks), bookmark_count_); | 245 EXPECT_EQ(arraysize(kIEBookmarks), bookmark_count_); |
246 EXPECT_EQ(arraysize(kIEFaviconGroup), favicon_count_); | 246 EXPECT_EQ(arraysize(kIEFaviconGroup), favicon_count_); |
247 } | 247 } |
248 if (importer_items_ & importer::HISTORY) | 248 if (importer_items_ & importer::HISTORY) |
249 EXPECT_EQ(2, history_count_); | 249 EXPECT_EQ(2, history_count_); |
250 if (importer_items_ & importer::HOME_PAGE) | 250 if (importer_items_ & importer::HOME_PAGE) |
251 EXPECT_EQ(1, homepage_count_); | 251 EXPECT_EQ(1, homepage_count_); |
252 if ((importer_items_ & importer::PASSWORDS) && (ie_version_ == IE7)) | 252 if ((importer_items_ & importer::PASSWORDS) && (ie_version_ == IE7)) |
253 EXPECT_EQ(1, ie7_password_count_); | 253 EXPECT_EQ(1, ie7_password_count_); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 public: | 381 public: |
382 MalformedFavoritesRegistryTestObserver() : ProfileWriter(NULL) { | 382 MalformedFavoritesRegistryTestObserver() : ProfileWriter(NULL) { |
383 bookmark_count_ = 0; | 383 bookmark_count_ = 0; |
384 } | 384 } |
385 | 385 |
386 // importer::ImporterProgressObserver: | 386 // importer::ImporterProgressObserver: |
387 void ImportStarted() override {} | 387 void ImportStarted() override {} |
388 void ImportItemStarted(importer::ImportItem item) override {} | 388 void ImportItemStarted(importer::ImportItem item) override {} |
389 void ImportItemEnded(importer::ImportItem item) override {} | 389 void ImportItemEnded(importer::ImportItem item) override {} |
390 void ImportEnded() override { | 390 void ImportEnded() override { |
391 base::MessageLoop::current()->Quit(); | 391 base::MessageLoop::current()->QuitWhenIdle(); |
392 EXPECT_EQ(arraysize(kIESortedBookmarks), bookmark_count_); | 392 EXPECT_EQ(arraysize(kIESortedBookmarks), bookmark_count_); |
393 } | 393 } |
394 | 394 |
395 // ProfileWriter: | 395 // ProfileWriter: |
396 bool BookmarkModelIsLoaded() const override { return true; } | 396 bool BookmarkModelIsLoaded() const override { return true; } |
397 bool TemplateURLServiceIsLoaded() const override { return true; } | 397 bool TemplateURLServiceIsLoaded() const override { return true; } |
398 | 398 |
399 void AddPasswordForm(const autofill::PasswordForm& form) override {} | 399 void AddPasswordForm(const autofill::PasswordForm& form) override {} |
400 void AddHistoryPage(const history::URLRows& page, | 400 void AddHistoryPage(const history::URLRows& page, |
401 history::VisitSource visit_source) override {} | 401 history::VisitSource visit_source) override {} |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 source_profile.source_path = temp_dir_.path(); | 646 source_profile.source_path = temp_dir_.path(); |
647 | 647 |
648 host->StartImportSettings( | 648 host->StartImportSettings( |
649 source_profile, | 649 source_profile, |
650 browser()->profile(), | 650 browser()->profile(), |
651 importer::HOME_PAGE, | 651 importer::HOME_PAGE, |
652 observer); | 652 observer); |
653 base::MessageLoop::current()->Run(); | 653 base::MessageLoop::current()->Run(); |
654 } | 654 } |
655 | 655 |
OLD | NEW |