Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(807)

Side by Side Diff: trunk/src/chrome/browser/importer/ie_importer_browsertest_win.cc

Issue 15968002: Revert 201837 "OOP import on Windows." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <shlguid.h> 9 #include <shlguid.h>
10 #include <urlhist.h> 10 #include <urlhist.h>
(...skipping 12 matching lines...) Expand all
23 #include "base/stl_util.h" 23 #include "base/stl_util.h"
24 #include "base/string16.h" 24 #include "base/string16.h"
25 #include "base/string_util.h" 25 #include "base/string_util.h"
26 #include "base/utf_string_conversions.h" 26 #include "base/utf_string_conversions.h"
27 #include "base/win/registry.h" 27 #include "base/win/registry.h"
28 #include "base/win/scoped_comptr.h" 28 #include "base/win/scoped_comptr.h"
29 #include "base/win/scoped_propvariant.h" 29 #include "base/win/scoped_propvariant.h"
30 #include "base/win/windows_version.h" 30 #include "base/win/windows_version.h"
31 #include "chrome/browser/bookmarks/imported_bookmark_entry.h" 31 #include "chrome/browser/bookmarks/imported_bookmark_entry.h"
32 #include "chrome/browser/favicon/imported_favicon_usage.h" 32 #include "chrome/browser/favicon/imported_favicon_usage.h"
33 #include "chrome/browser/importer/external_process_importer_host.h"
34 #include "chrome/browser/importer/ie_importer.h" 33 #include "chrome/browser/importer/ie_importer.h"
35 #include "chrome/browser/importer/ie_importer_utils_win.h" 34 #include "chrome/browser/importer/ie_importer_utils_win.h"
36 #include "chrome/browser/importer/ie_importer_test_registry_overrider_win.h" 35 #include "chrome/browser/importer/ie_importer_test_registry_overrider_win.h"
37 #include "chrome/browser/importer/importer_bridge.h" 36 #include "chrome/browser/importer/importer_bridge.h"
38 #include "chrome/browser/importer/importer_data_types.h" 37 #include "chrome/browser/importer/importer_data_types.h"
39 #include "chrome/browser/importer/importer_host.h" 38 #include "chrome/browser/importer/importer_host.h"
40 #include "chrome/browser/importer/importer_progress_observer.h" 39 #include "chrome/browser/importer/importer_progress_observer.h"
41 #include "chrome/browser/importer/importer_unittest_utils.h" 40 #include "chrome/browser/importer/importer_unittest_utils.h"
42 #include "chrome/browser/importer/pstore_declarations.h" 41 #include "chrome/browser/importer/pstore_declarations.h"
43 #include "chrome/browser/search_engines/template_url.h" 42 #include "chrome/browser/search_engines/template_url.h"
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 // Sets up a special history link. 477 // Sets up a special history link.
479 base::win::ScopedComPtr<IUrlHistoryStg2> url_history_stg2; 478 base::win::ScopedComPtr<IUrlHistoryStg2> url_history_stg2;
480 res = url_history_stg2.CreateInstance(CLSID_CUrlHistory, NULL, 479 res = url_history_stg2.CreateInstance(CLSID_CUrlHistory, NULL,
481 CLSCTX_INPROC_SERVER); 480 CLSCTX_INPROC_SERVER);
482 ASSERT_TRUE(res == S_OK); 481 ASSERT_TRUE(res == S_OK);
483 res = url_history_stg2->AddUrl(kIEIdentifyUrl, kIEIdentifyTitle, 0); 482 res = url_history_stg2->AddUrl(kIEIdentifyUrl, kIEIdentifyTitle, 0);
484 ASSERT_TRUE(res == S_OK); 483 ASSERT_TRUE(res == S_OK);
485 484
486 // Starts to import the above settings. 485 // Starts to import the above settings.
487 // Deletes itself. 486 // Deletes itself.
488 ImporterHost* host = new ExternalProcessImporterHost; 487 // TODO(gab): Use ExternalProcessImporterHost on Windows.
488 ImporterHost* host = new ImporterHost;
489 TestObserver* observer = new TestObserver(); 489 TestObserver* observer = new TestObserver();
490 host->SetObserver(observer); 490 host->SetObserver(observer);
491 491
492 importer::SourceProfile source_profile; 492 importer::SourceProfile source_profile;
493 source_profile.importer_type = importer::TYPE_IE; 493 source_profile.importer_type = importer::TYPE_IE;
494 source_profile.source_path = temp_dir_.path(); 494 source_profile.source_path = temp_dir_.path();
495 495
496 host->StartImportSettings( 496 host->StartImportSettings(
497 source_profile, 497 source_profile,
498 browser()->profile(), 498 browser()->profile(),
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 base::string16 key_path(importer::GetIEFavoritesOrderKey()); 554 base::string16 key_path(importer::GetIEFavoritesOrderKey());
555 base::win::RegKey key; 555 base::win::RegKey key;
556 ASSERT_EQ(ERROR_SUCCESS, 556 ASSERT_EQ(ERROR_SUCCESS,
557 key.Create(HKEY_CURRENT_USER, key_path.c_str(), KEY_WRITE)); 557 key.Create(HKEY_CURRENT_USER, key_path.c_str(), KEY_WRITE));
558 ASSERT_EQ(ERROR_SUCCESS, 558 ASSERT_EQ(ERROR_SUCCESS,
559 key.WriteValue(L"Order", kBadBinary[i].data, kBadBinary[i].length, 559 key.WriteValue(L"Order", kBadBinary[i].data, kBadBinary[i].length,
560 REG_BINARY)); 560 REG_BINARY));
561 561
562 // Starts to import the above settings. 562 // Starts to import the above settings.
563 // Deletes itself. 563 // Deletes itself.
564 ImporterHost* host = new ExternalProcessImporterHost; 564 // TODO(gab): Use ExternalProcessImporterHost on Windows.
565 ImporterHost* host = new ImporterHost;
565 MalformedFavoritesRegistryTestObserver* observer = 566 MalformedFavoritesRegistryTestObserver* observer =
566 new MalformedFavoritesRegistryTestObserver(); 567 new MalformedFavoritesRegistryTestObserver();
567 host->SetObserver(observer); 568 host->SetObserver(observer);
568 569
569 importer::SourceProfile source_profile; 570 importer::SourceProfile source_profile;
570 source_profile.importer_type = importer::TYPE_IE; 571 source_profile.importer_type = importer::TYPE_IE;
571 source_profile.source_path = temp_dir_.path(); 572 source_profile.source_path = temp_dir_.path();
572 573
573 host->StartImportSettings( 574 host->StartImportSettings(
574 source_profile, 575 source_profile,
575 browser()->profile(), 576 browser()->profile(),
576 importer::FAVORITES, 577 importer::FAVORITES,
577 observer); 578 observer);
578 MessageLoop::current()->Run(); 579 MessageLoop::current()->Run();
579 } 580 }
580 } 581 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698