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

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

Issue 11434074: browser: Move FindBrowserWithWebContents() into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // so we will only use it on that platform since it is required. Remove this 112 // so we will only use it on that platform since it is required. Remove this
113 // conditional logic once oop import is qualified for Linux/Windows. 113 // conditional logic once oop import is qualified for Linux/Windows.
114 // http://crbug.com/22142 114 // http://crbug.com/22142
115 #if defined(OS_MACOSX) 115 #if defined(OS_MACOSX)
116 importer_host_ = new ExternalProcessImporterHost; 116 importer_host_ = new ExternalProcessImporterHost;
117 #else 117 #else
118 importer_host_ = new ImporterHost; 118 importer_host_ = new ImporterHost;
119 #endif 119 #endif
120 importer_host_->SetObserver(this); 120 importer_host_->SetObserver(this);
121 importer_host_->set_browser( 121 importer_host_->set_browser(
122 browser::FindBrowserWithWebContents(web_ui()->GetWebContents())); 122 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents()));
123 Profile* profile = Profile::FromWebUI(web_ui()); 123 Profile* profile = Profile::FromWebUI(web_ui());
124 importer_host_->StartImportSettings(source_profile, profile, 124 importer_host_->StartImportSettings(source_profile, profile,
125 import_services, 125 import_services,
126 new ProfileWriter(profile), false); 126 new ProfileWriter(profile), false);
127 } else { 127 } else {
128 LOG(WARNING) << "There were no settings to import from '" 128 LOG(WARNING) << "There were no settings to import from '"
129 << source_profile.importer_name << "'."; 129 << source_profile.importer_name << "'.";
130 } 130 }
131 } 131 }
132 132
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 web_ui()->CallJavascriptFunction("ImportDataOverlay.confirmSuccess"); 183 web_ui()->CallJavascriptFunction("ImportDataOverlay.confirmSuccess");
184 } else { 184 } else {
185 base::FundamentalValue state(false); 185 base::FundamentalValue state(false);
186 web_ui()->CallJavascriptFunction("ImportDataOverlay.setImportingState", 186 web_ui()->CallJavascriptFunction("ImportDataOverlay.setImportingState",
187 state); 187 state);
188 web_ui()->CallJavascriptFunction("ImportDataOverlay.dismiss"); 188 web_ui()->CallJavascriptFunction("ImportDataOverlay.dismiss");
189 } 189 }
190 } 190 }
191 191
192 } // namespace options 192 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698