OLD | NEW |
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 "content/renderer/renderer_main_platform_delegate.h" | 5 #include "content/renderer/renderer_main_platform_delegate.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 RendererMainPlatformDelegate::RendererMainPlatformDelegate( | 66 RendererMainPlatformDelegate::RendererMainPlatformDelegate( |
67 const MainFunctionParams& parameters) | 67 const MainFunctionParams& parameters) |
68 : parameters_(parameters), | 68 : parameters_(parameters), |
69 sandbox_test_module_(NULL) { | 69 sandbox_test_module_(NULL) { |
70 } | 70 } |
71 | 71 |
72 RendererMainPlatformDelegate::~RendererMainPlatformDelegate() { | 72 RendererMainPlatformDelegate::~RendererMainPlatformDelegate() { |
73 } | 73 } |
74 | 74 |
75 void RendererMainPlatformDelegate::PlatformInitialize() { | 75 void RendererMainPlatformDelegate::PlatformInitialize() { |
76 const CommandLine& command_line = parameters_.command_line; | 76 const base::CommandLine& command_line = parameters_.command_line; |
77 | 77 |
78 // Be mindful of what resources you acquire here. They can be used by | 78 // Be mindful of what resources you acquire here. They can be used by |
79 // malicious code if the renderer gets compromised. | 79 // malicious code if the renderer gets compromised. |
80 bool no_sandbox = command_line.HasSwitch(switches::kNoSandbox); | 80 bool no_sandbox = command_line.HasSwitch(switches::kNoSandbox); |
81 | 81 |
82 bool use_direct_write = gfx::win::ShouldUseDirectWrite(); | 82 bool use_direct_write = gfx::win::ShouldUseDirectWrite(); |
83 if (!no_sandbox) { | 83 if (!no_sandbox) { |
84 // ICU DateFormat class (used in base/time_format.cc) needs to get the | 84 // ICU DateFormat class (used in base/time_format.cc) needs to get the |
85 // Olson timezone ID by accessing the registry keys under | 85 // Olson timezone ID by accessing the registry keys under |
86 // HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. | 86 // HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. |
(...skipping 29 matching lines...) Expand all Loading... |
116 ::GetUserDefaultLangID(); | 116 ::GetUserDefaultLangID(); |
117 ::GetUserDefaultLCID(); | 117 ::GetUserDefaultLCID(); |
118 | 118 |
119 target_services->LowerToken(); | 119 target_services->LowerToken(); |
120 return true; | 120 return true; |
121 } | 121 } |
122 return false; | 122 return false; |
123 } | 123 } |
124 | 124 |
125 } // namespace content | 125 } // namespace content |
OLD | NEW |