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 #include "base/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 | 269 |
270 // Deletes itself. | 270 // Deletes itself. |
271 // TODO(gab): Use ExternalProcessImporterHost on Linux as well. | 271 // TODO(gab): Use ExternalProcessImporterHost on Linux as well. |
272 ImporterHost* host; | 272 ImporterHost* host; |
273 #if defined(OS_MACOSX) || defined(OS_WIN) | 273 #if defined(OS_MACOSX) || defined(OS_WIN) |
274 host = new ExternalProcessImporterHost; | 274 host = new ExternalProcessImporterHost; |
275 #else | 275 #else |
276 host = new ImporterHost; | 276 host = new ImporterHost; |
277 #endif | 277 #endif |
278 host->SetObserver(observer); | 278 host->SetObserver(observer); |
279 host->StartImportSettings(source_profile, browser()->profile(), | 279 host->StartImportSettings(source_profile, |
280 items, make_scoped_refptr(writer)); | 280 browser()->profile(), |
| 281 items, |
| 282 make_scoped_refptr(writer).get()); |
281 base::MessageLoop::current()->Run(); | 283 base::MessageLoop::current()->Run(); |
282 } | 284 } |
283 | 285 |
284 base::ScopedTempDir temp_dir_; | 286 base::ScopedTempDir temp_dir_; |
285 base::FilePath profile_path_; | 287 base::FilePath profile_path_; |
286 base::FilePath app_path_; | 288 base::FilePath app_path_; |
287 }; | 289 }; |
288 | 290 |
289 IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest, | 291 IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest, |
290 MAYBE_IMPORTER(Firefox30Importer)) { | 292 MAYBE_IMPORTER(Firefox30Importer)) { |
291 scoped_refptr<Firefox3Observer> observer(new Firefox3Observer()); | 293 scoped_refptr<Firefox3Observer> observer(new Firefox3Observer()); |
292 Firefox3xImporterBrowserTest("firefox3_profile", observer.get(), | 294 Firefox3xImporterBrowserTest("firefox3_profile", observer.get(), |
293 observer.get(), true); | 295 observer.get(), true); |
294 } | 296 } |
295 | 297 |
296 IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest, | 298 IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest, |
297 MAYBE_IMPORTER(Firefox35Importer)) { | 299 MAYBE_IMPORTER(Firefox35Importer)) { |
298 bool import_search_engines = false; | 300 bool import_search_engines = false; |
299 scoped_refptr<Firefox3Observer> observer( | 301 scoped_refptr<Firefox3Observer> observer( |
300 new Firefox3Observer(import_search_engines)); | 302 new Firefox3Observer(import_search_engines)); |
301 Firefox3xImporterBrowserTest("firefox35_profile", observer.get(), | 303 Firefox3xImporterBrowserTest("firefox35_profile", observer.get(), |
302 observer.get(), import_search_engines); | 304 observer.get(), import_search_engines); |
303 } | 305 } |
OLD | NEW |