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

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

Issue 12670013: Out-of-process import on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge up to r196136 + modifications in extracted CLs Created 7 years, 8 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) 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 importer_list_->GetSourceProfileAt(browser_index); 102 importer_list_->GetSourceProfileAt(browser_index);
103 uint16 supported_items = source_profile.services_supported; 103 uint16 supported_items = source_profile.services_supported;
104 104
105 uint16 import_services = (selected_items & supported_items); 105 uint16 import_services = (selected_items & supported_items);
106 if (import_services) { 106 if (import_services) {
107 base::FundamentalValue state(true); 107 base::FundamentalValue state(true);
108 web_ui()->CallJavascriptFunction("ImportDataOverlay.setImportingState", 108 web_ui()->CallJavascriptFunction("ImportDataOverlay.setImportingState",
109 state); 109 state);
110 import_did_succeed_ = false; 110 import_did_succeed_ = false;
111 111
112 // TODO(csilv): Out-of-process import has only been qualified on MacOS X, 112 // TODO(gab): Make Linux use OOP import as well (http://crbug.com/56816) and
113 // so we will only use it on that platform since it is required. Remove this 113 // get rid of these ugly ifdefs.
114 // conditional logic once oop import is qualified for Linux/Windows. 114 #if defined(OS_MACOSX) || defined(OS_WIN)
115 // http://crbug.com/22142
116 #if defined(OS_MACOSX)
117 importer_host_ = new ExternalProcessImporterHost; 115 importer_host_ = new ExternalProcessImporterHost;
118 #else 116 #else
119 importer_host_ = new ImporterHost; 117 importer_host_ = new ImporterHost;
120 #endif 118 #endif
121 importer_host_->SetObserver(this); 119 importer_host_->SetObserver(this);
122 importer_host_->set_browser( 120 importer_host_->set_browser(
123 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents())); 121 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents()));
124 Profile* profile = Profile::FromWebUI(web_ui()); 122 Profile* profile = Profile::FromWebUI(web_ui());
125 importer_host_->StartImportSettings(source_profile, profile, 123 importer_host_->StartImportSettings(source_profile, profile,
126 import_services, 124 import_services,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 web_ui()->CallJavascriptFunction("ImportDataOverlay.confirmSuccess"); 185 web_ui()->CallJavascriptFunction("ImportDataOverlay.confirmSuccess");
188 } else { 186 } else {
189 base::FundamentalValue state(false); 187 base::FundamentalValue state(false);
190 web_ui()->CallJavascriptFunction("ImportDataOverlay.setImportingState", 188 web_ui()->CallJavascriptFunction("ImportDataOverlay.setImportingState",
191 state); 189 state);
192 web_ui()->CallJavascriptFunction("ImportDataOverlay.dismiss"); 190 web_ui()->CallJavascriptFunction("ImportDataOverlay.dismiss");
193 } 191 }
194 } 192 }
195 193
196 } // namespace options 194 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698