| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/first_run/first_run.h" | 5 #include "chrome/browser/first_run/first_run.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 scoped_refptr<ImporterList> importer_list(new ImporterList); | 341 scoped_refptr<ImporterList> importer_list(new ImporterList); |
| 342 importer_list->DetectSourceProfilesHack(); | 342 importer_list->DetectSourceProfilesHack(); |
| 343 if (!FirstRun::ImportSettings(NULL, | 343 if (!FirstRun::ImportSettings(NULL, |
| 344 importer_list->GetSourceProfileAt(0).importer_type, | 344 importer_list->GetSourceProfileAt(0).importer_type, |
| 345 out_prefs->do_import_items, | 345 out_prefs->do_import_items, |
| 346 FilePath::FromWStringHack(UTF8ToWide(import_bookmarks_path)), | 346 FilePath::FromWStringHack(UTF8ToWide(import_bookmarks_path)), |
| 347 true, NULL)) { | 347 true, NULL)) { |
| 348 LOG(WARNING) << "silent import failed"; | 348 LOG(WARNING) << "silent import failed"; |
| 349 } | 349 } |
| 350 } | 350 } |
| 351 #else | 351 #elif !defined(USE_AURA) |
| 352 if (!import_bookmarks_path.empty()) { | 352 if (!import_bookmarks_path.empty()) { |
| 353 // There are bookmarks to import from a file. | 353 // There are bookmarks to import from a file. |
| 354 FilePath path = FilePath::FromWStringHack(UTF8ToWide( | 354 FilePath path = FilePath::FromWStringHack(UTF8ToWide( |
| 355 import_bookmarks_path)); | 355 import_bookmarks_path)); |
| 356 if (!FirstRun::ImportBookmarks(path)) { | 356 if (!FirstRun::ImportBookmarks(path)) { |
| 357 LOG(WARNING) << "silent bookmark import failed"; | 357 LOG(WARNING) << "silent bookmark import failed"; |
| 358 } | 358 } |
| 359 } | 359 } |
| 360 #endif | 360 #endif |
| 361 | 361 |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 if (!observer->ended()) { | 715 if (!observer->ended()) { |
| 716 observer->set_should_quit_message_loop(); | 716 observer->set_should_quit_message_loop(); |
| 717 MessageLoop::current()->Run(); | 717 MessageLoop::current()->Run(); |
| 718 } | 718 } |
| 719 | 719 |
| 720 // Unfortunately there's no success/fail signal in ImporterHost. | 720 // Unfortunately there's no success/fail signal in ImporterHost. |
| 721 return true; | 721 return true; |
| 722 } | 722 } |
| 723 | 723 |
| 724 #endif // OS_POSIX | 724 #endif // OS_POSIX |
| OLD | NEW |