Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(683)

Side by Side Diff: chrome/browser/ui/webui/options/import_data_handler.cc

Issue 7554008: Removal of Profile from content part 6. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Profile helper function, rebase Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/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/callback.h" 10 #include "base/callback.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // TODO(csilv): Out-of-process import has only been qualified on MacOS X, 103 // TODO(csilv): Out-of-process import has only been qualified on MacOS X,
104 // so we will only use it on that platform since it is required. Remove this 104 // so we will only use it on that platform since it is required. Remove this
105 // conditional logic once oop import is qualified for Linux/Windows. 105 // conditional logic once oop import is qualified for Linux/Windows.
106 // http://crbug.com/22142 106 // http://crbug.com/22142
107 #if defined(OS_MACOSX) 107 #if defined(OS_MACOSX)
108 importer_host_ = new ExternalProcessImporterHost; 108 importer_host_ = new ExternalProcessImporterHost;
109 #else 109 #else
110 importer_host_ = new ImporterHost; 110 importer_host_ = new ImporterHost;
111 #endif 111 #endif
112 importer_host_->SetObserver(this); 112 importer_host_->SetObserver(this);
113 Profile* profile = web_ui_->GetProfile(); 113 Profile* profile = Profile::FromWebUI(web_ui_);
114 importer_host_->StartImportSettings(source_profile, profile, 114 importer_host_->StartImportSettings(source_profile, profile,
115 import_services, 115 import_services,
116 new ProfileWriter(profile), false); 116 new ProfileWriter(profile), false);
117 } else { 117 } else {
118 LOG(WARNING) << "There were no settings to import from '" 118 LOG(WARNING) << "There were no settings to import from '"
119 << source_profile.importer_name << "'."; 119 << source_profile.importer_name << "'.";
120 } 120 }
121 } 121 }
122 122
123 void ImportDataHandler::OnSourceProfilesLoaded() { 123 void ImportDataHandler::OnSourceProfilesLoaded() {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 void ImportDataHandler::ImportItemEnded(importer::ImportItem item) { 156 void ImportDataHandler::ImportItemEnded(importer::ImportItem item) {
157 // TODO(csilv): show progress detail in the web view. 157 // TODO(csilv): show progress detail in the web view.
158 } 158 }
159 159
160 void ImportDataHandler::ImportEnded() { 160 void ImportDataHandler::ImportEnded() {
161 importer_host_->SetObserver(NULL); 161 importer_host_->SetObserver(NULL);
162 importer_host_ = NULL; 162 importer_host_ = NULL;
163 163
164 web_ui_->CallJavascriptFunction("ImportDataOverlay.confirmSuccess"); 164 web_ui_->CallJavascriptFunction("ImportDataOverlay.confirmSuccess");
165 } 165 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698