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

Side by Side Diff: chrome/renderer/render_process.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 unified diff | Download patch
« no previous file with comments | « chrome/plugin/webplugin_delegate_stub.cc ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <windows.h> 5 #include <windows.h>
6 #include <objidl.h> 6 #include <objidl.h>
7 #include <mlang.h> 7 #include <mlang.h>
8 8
9 #include "chrome/renderer/render_process.h" 9 #include "chrome/renderer/render_process.h"
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 GdiInitializeLanguagePack gdi_init_lpk = 56 GdiInitializeLanguagePack gdi_init_lpk =
57 reinterpret_cast<GdiInitializeLanguagePack>(GetProcAddress( 57 reinterpret_cast<GdiInitializeLanguagePack>(GetProcAddress(
58 GetModuleHandle(L"GDI32.DLL"), 58 GetModuleHandle(L"GDI32.DLL"),
59 "GdiInitializeLanguagePack")); 59 "GdiInitializeLanguagePack"));
60 DCHECK(gdi_init_lpk); 60 DCHECK(gdi_init_lpk);
61 if (gdi_init_lpk) { 61 if (gdi_init_lpk) {
62 gdi_init_lpk(0); 62 gdi_init_lpk(0);
63 } 63 }
64 } 64 }
65 65
66 CommandLine command_line; 66 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
67 if (command_line.HasSwitch(switches::kJavaScriptFlags)) { 67 if (command_line.HasSwitch(switches::kJavaScriptFlags)) {
68 webkit_glue::SetJavaScriptFlags( 68 webkit_glue::SetJavaScriptFlags(
69 command_line.GetSwitchValue(switches::kJavaScriptFlags)); 69 command_line.GetSwitchValue(switches::kJavaScriptFlags));
70 } 70 }
71 if (command_line.HasSwitch(switches::kPlaybackMode) || 71 if (command_line.HasSwitch(switches::kPlaybackMode) ||
72 command_line.HasSwitch(switches::kRecordMode)) { 72 command_line.HasSwitch(switches::kRecordMode)) {
73 webkit_glue::SetRecordPlaybackMode(true); 73 webkit_glue::SetRecordPlaybackMode(true);
74 } 74 }
75 75
76 if (command_line.HasSwitch(switches::kInProcessPlugins) || 76 if (command_line.HasSwitch(switches::kInProcessPlugins) ||
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 5000 /* 5 seconds */); 200 5000 /* 5 seconds */);
201 } 201 }
202 202
203 void RenderProcess::Cleanup() { 203 void RenderProcess::Cleanup() {
204 #ifndef NDEBUG 204 #ifndef NDEBUG
205 // log important leaked objects 205 // log important leaked objects
206 webkit_glue::CheckForLeaks(); 206 webkit_glue::CheckForLeaks();
207 #endif 207 #endif
208 } 208 }
209 209
OLDNEW
« no previous file with comments | « chrome/plugin/webplugin_delegate_stub.cc ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698