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/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 } | 125 } |
126 scoped_refptr<ImporterHost> importer_host(new ImporterHost); | 126 scoped_refptr<ImporterHost> importer_host(new ImporterHost); |
127 importer_host->set_headless(); | 127 importer_host->set_headless(); |
128 | 128 |
129 importer::SourceProfile source_profile; | 129 importer::SourceProfile source_profile; |
130 source_profile.importer_type = importer::TYPE_BOOKMARKS_FILE; | 130 source_profile.importer_type = importer::TYPE_BOOKMARKS_FILE; |
131 source_profile.source_path = file_path; | 131 source_profile.source_path = file_path; |
132 | 132 |
133 FirstRunImportObserver importer_observer; | 133 FirstRunImportObserver importer_observer; |
134 importer::ShowImportProgressDialog(importer::FAVORITES, | 134 importer::ShowImportProgressDialog(importer::FAVORITES, |
135 importer_host, | 135 importer_host.get(), |
136 &importer_observer, | 136 &importer_observer, |
137 source_profile, | 137 source_profile, |
138 profile, | 138 profile, |
139 true); | 139 true); |
140 | 140 |
141 importer_observer.RunLoop(); | 141 importer_observer.RunLoop(); |
142 return importer_observer.import_result(); | 142 return importer_observer.import_result(); |
143 } | 143 } |
144 | 144 |
145 } // namespace | 145 } // namespace |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 | 555 |
556 // Reset the preference and notifications to avoid showing the bubble again. | 556 // Reset the preference and notifications to avoid showing the bubble again. |
557 prefs->SetBoolean(prefs::kShouldShowFirstRunBubble, false); | 557 prefs->SetBoolean(prefs::kShouldShowFirstRunBubble, false); |
558 | 558 |
559 // Show the bubble now and destroy this bubble launcher. | 559 // Show the bubble now and destroy this bubble launcher. |
560 browser->ShowFirstRunBubble(); | 560 browser->ShowFirstRunBubble(); |
561 delete this; | 561 delete this; |
562 } | 562 } |
563 | 563 |
564 } // namespace first_run | 564 } // namespace first_run |
OLD | NEW |