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

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

Issue 15968002: Revert 201837 "OOP import on Windows." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 7 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
Property Changes:
Deleted: svn:mergeinfo
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(gab): Make Linux use OOP import as well (http://crbug.com/56816) and 112 // TODO(csilv): Out-of-process import has only been qualified on MacOS X,
113 // get rid of these ugly ifdefs. 113 // so we will only use it on that platform since it is required. Remove this
114 #if defined(OS_MACOSX) || defined(OS_WIN) 114 // conditional logic once oop import is qualified for Linux/Windows.
115 // The Google Toolbar importer doesn't work for the out-of-process import. 115 // http://crbug.com/22142
116 // This is the only entry point for this importer (it is never used on first 116 #if defined(OS_MACOSX)
117 // run). See discussion on http://crbug.com/219419 for details. 117 importer_host_ = new ExternalProcessImporterHost;
118 if (source_profile.importer_type == importer::TYPE_GOOGLE_TOOLBAR5)
119 importer_host_ = new ImporterHost;
120 else
121 importer_host_ = new ExternalProcessImporterHost;
122 #else 118 #else
123 importer_host_ = new ImporterHost; 119 importer_host_ = new ImporterHost;
124 #endif 120 #endif
125 importer_host_->SetObserver(this); 121 importer_host_->SetObserver(this);
126 importer_host_->set_browser( 122 importer_host_->set_browser(
127 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents())); 123 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents()));
128 Profile* profile = Profile::FromWebUI(web_ui()); 124 Profile* profile = Profile::FromWebUI(web_ui());
129 importer_host_->StartImportSettings(source_profile, profile, 125 importer_host_->StartImportSettings(source_profile, profile,
130 import_services, 126 import_services,
131 new ProfileWriter(profile)); 127 new ProfileWriter(profile));
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 web_ui()->CallJavascriptFunction("ImportDataOverlay.confirmSuccess"); 187 web_ui()->CallJavascriptFunction("ImportDataOverlay.confirmSuccess");
192 } else { 188 } else {
193 base::FundamentalValue state(false); 189 base::FundamentalValue state(false);
194 web_ui()->CallJavascriptFunction("ImportDataOverlay.setImportingState", 190 web_ui()->CallJavascriptFunction("ImportDataOverlay.setImportingState",
195 state); 191 state);
196 web_ui()->CallJavascriptFunction("ImportDataOverlay.dismiss"); 192 web_ui()->CallJavascriptFunction("ImportDataOverlay.dismiss");
197 } 193 }
198 } 194 }
199 195
200 } // namespace options 196 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698