| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 return false; | 119 return false; |
| 120 } | 120 } |
| 121 scoped_refptr<ImporterHost> importer_host(new ImporterHost); | 121 scoped_refptr<ImporterHost> importer_host(new ImporterHost); |
| 122 importer_host->set_headless(); | 122 importer_host->set_headless(); |
| 123 | 123 |
| 124 importer::SourceProfile source_profile; | 124 importer::SourceProfile source_profile; |
| 125 source_profile.importer_type = importer::TYPE_BOOKMARKS_FILE; | 125 source_profile.importer_type = importer::TYPE_BOOKMARKS_FILE; |
| 126 source_profile.source_path = file_path; | 126 source_profile.source_path = file_path; |
| 127 | 127 |
| 128 FirstRunImportObserver importer_observer; | 128 FirstRunImportObserver importer_observer; |
| 129 importer::ShowImportProgressDialog(NULL, | 129 importer::ShowImportProgressDialog(importer::FAVORITES, |
| 130 importer::FAVORITES, | |
| 131 importer_host, | 130 importer_host, |
| 132 &importer_observer, | 131 &importer_observer, |
| 133 source_profile, | 132 source_profile, |
| 134 profile, | 133 profile, |
| 135 true); | 134 true); |
| 136 | 135 |
| 137 importer_observer.RunLoop(); | 136 importer_observer.RunLoop(); |
| 138 return importer_observer.import_result(); | 137 return importer_observer.import_result(); |
| 139 } | 138 } |
| 140 | 139 |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 | 516 |
| 518 // Reset the preference and notifications to avoid showing the bubble again. | 517 // Reset the preference and notifications to avoid showing the bubble again. |
| 519 prefs->SetBoolean(prefs::kShouldShowFirstRunBubble, false); | 518 prefs->SetBoolean(prefs::kShouldShowFirstRunBubble, false); |
| 520 | 519 |
| 521 // Show the bubble now and destroy this bubble launcher. | 520 // Show the bubble now and destroy this bubble launcher. |
| 522 browser->ShowFirstRunBubble(); | 521 browser->ShowFirstRunBubble(); |
| 523 delete this; | 522 delete this; |
| 524 } | 523 } |
| 525 | 524 |
| 526 } // namespace first_run | 525 } // namespace first_run |
| OLD | NEW |