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

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

Issue 7386002: Rename CommandLine::GetCommandLineString(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge. Created 9 years, 5 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/options_ui.h" 5 #include "chrome/browser/ui/webui/options/options_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 ++iter) { 293 ++iter) {
294 static_cast<OptionsPageUIHandler*>(*iter)->Uninitialize(); 294 static_cast<OptionsPageUIHandler*>(*iter)->Uninitialize();
295 } 295 }
296 } 296 }
297 297
298 // Override. 298 // Override.
299 void OptionsUI::RenderViewCreated(RenderViewHost* render_view_host) { 299 void OptionsUI::RenderViewCreated(RenderViewHost* render_view_host) {
300 std::string command_line_string; 300 std::string command_line_string;
301 301
302 #if defined(OS_WIN) 302 #if defined(OS_WIN)
303 std::wstring wstr = CommandLine::ForCurrentProcess()->command_line_string(); 303 std::wstring wstr = CommandLine::ForCurrentProcess()->GetCommandLineString();
304 command_line_string = WideToASCII(wstr); 304 command_line_string = WideToASCII(wstr);
305 #else 305 #else
306 command_line_string = CommandLine::ForCurrentProcess()->command_line_string(); 306 command_line_string =
307 CommandLine::ForCurrentProcess()->GetCommandLineString();
307 #endif 308 #endif
308 309
309 render_view_host->SetWebUIProperty("commandLineString", command_line_string); 310 render_view_host->SetWebUIProperty("commandLineString", command_line_string);
310 WebUI::RenderViewCreated(render_view_host); 311 WebUI::RenderViewCreated(render_view_host);
311 } 312 }
312 313
313 void OptionsUI::DidBecomeActiveForReusedRenderView() { 314 void OptionsUI::DidBecomeActiveForReusedRenderView() {
314 // When the renderer is re-used (e.g., for back/forward navigation within 315 // When the renderer is re-used (e.g., for back/forward navigation within
315 // options), the handlers are torn down and rebuilt, so are no longer 316 // options), the handlers are torn down and rebuilt, so are no longer
316 // initialized, but the web page's DOM may remain intact, in which case onload 317 // initialized, but the web page's DOM may remain intact, in which case onload
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 OptionsPageUIHandler* handler_raw) { 351 OptionsPageUIHandler* handler_raw) {
351 scoped_ptr<OptionsPageUIHandler> handler(handler_raw); 352 scoped_ptr<OptionsPageUIHandler> handler(handler_raw);
352 DCHECK(handler.get()); 353 DCHECK(handler.get());
353 // Add only if handler's service is enabled. 354 // Add only if handler's service is enabled.
354 if (handler->IsEnabled()) { 355 if (handler->IsEnabled()) {
355 handler->GetLocalizedValues(localized_strings); 356 handler->GetLocalizedValues(localized_strings);
356 // Add handler to the list and also pass the ownership. 357 // Add handler to the list and also pass the ownership.
357 AddMessageHandler(handler.release()->Attach(this)); 358 AddMessageHandler(handler.release()->Attach(this));
358 } 359 }
359 } 360 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/about_page_handler.cc ('k') | chrome/browser/web_applications/web_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698