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/ui/webui/options/import_data_handler.h" | 5 #include "chrome/browser/ui/webui/options/import_data_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 importer_host_ = new ExternalProcessImporterHost; | 117 importer_host_ = new ExternalProcessImporterHost; |
118 #else | 118 #else |
119 importer_host_ = new ImporterHost; | 119 importer_host_ = new ImporterHost; |
120 #endif | 120 #endif |
121 importer_host_->SetObserver(this); | 121 importer_host_->SetObserver(this); |
122 importer_host_->set_browser( | 122 importer_host_->set_browser( |
123 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents())); | 123 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents())); |
124 Profile* profile = Profile::FromWebUI(web_ui()); | 124 Profile* profile = Profile::FromWebUI(web_ui()); |
125 importer_host_->StartImportSettings(source_profile, profile, | 125 importer_host_->StartImportSettings(source_profile, profile, |
126 import_services, | 126 import_services, |
127 new ProfileWriter(profile), false); | 127 new ProfileWriter(profile)); |
128 | 128 |
129 importer::LogImporterUseToMetrics("ImportDataHandler", | 129 importer::LogImporterUseToMetrics("ImportDataHandler", |
130 source_profile.importer_type); | 130 source_profile.importer_type); |
131 } else { | 131 } else { |
132 LOG(WARNING) << "There were no settings to import from '" | 132 LOG(WARNING) << "There were no settings to import from '" |
133 << source_profile.importer_name << "'."; | 133 << source_profile.importer_name << "'."; |
134 } | 134 } |
135 } | 135 } |
136 | 136 |
137 void ImportDataHandler::OnSourceProfilesLoaded() { | 137 void ImportDataHandler::OnSourceProfilesLoaded() { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 web_ui()->CallJavascriptFunction("ImportDataOverlay.confirmSuccess"); | 187 web_ui()->CallJavascriptFunction("ImportDataOverlay.confirmSuccess"); |
188 } else { | 188 } else { |
189 base::FundamentalValue state(false); | 189 base::FundamentalValue state(false); |
190 web_ui()->CallJavascriptFunction("ImportDataOverlay.setImportingState", | 190 web_ui()->CallJavascriptFunction("ImportDataOverlay.setImportingState", |
191 state); | 191 state); |
192 web_ui()->CallJavascriptFunction("ImportDataOverlay.dismiss"); | 192 web_ui()->CallJavascriptFunction("ImportDataOverlay.dismiss"); |
193 } | 193 } |
194 } | 194 } |
195 | 195 |
196 } // namespace options | 196 } // namespace options |
OLD | NEW |