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

Unified Diff: chrome/renderer/render_view.cc

Issue 18248: CommandLine API rework (Closed)
Patch Set: fixes Created 11 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/render_process.cc ('k') | chrome/renderer/renderer_glue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 9927171c8fc24f78c37b57bc59198483e6756d52..8f08add4eff043dd1ada9c7c133989bc32180ca7 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -289,7 +289,7 @@ void RenderView::Init(HWND parent_hwnd,
host_window_ = parent_hwnd;
modal_dialog_event_.reset(modal_dialog_event);
- CommandLine command_line;
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
enable_dom_automation_ =
command_line.HasSwitch(switches::kDomAutomationController);
disable_popup_blocking_ =
@@ -1834,8 +1834,8 @@ static bool ShouldLoadPluginInProcess(const std::string& mime_type,
if (mime_type == "application/x-googlegears") {
*is_gears = true;
- CommandLine cmd;
- return cmd.HasSwitch(switches::kGearsInRenderer);
+ return CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kGearsInRenderer);
}
return false;
« no previous file with comments | « chrome/renderer/render_process.cc ('k') | chrome/renderer/renderer_glue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698