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/browser/gpu/gpu_process_host.h" | 5 #include "content/browser/gpu/gpu_process_host.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/base_switches.h" | 8 #include "base/base_switches.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_HANDLES, | 245 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_HANDLES, |
246 sandbox::TargetPolicy::HANDLES_DUP_BROKER, | 246 sandbox::TargetPolicy::HANDLES_DUP_BROKER, |
247 L"Section"); | 247 L"Section"); |
248 if (result != sandbox::SBOX_ALL_OK) { | 248 if (result != sandbox::SBOX_ALL_OK) { |
249 *success = false; | 249 *success = false; |
250 return; | 250 return; |
251 } | 251 } |
252 #endif | 252 #endif |
253 | 253 |
254 if (cmd_line_->HasSwitch(switches::kEnableLogging)) { | 254 if (cmd_line_->HasSwitch(switches::kEnableLogging)) { |
255 string16 log_file_path = logging::GetLogFileFullPath(); | 255 base::string16 log_file_path = logging::GetLogFileFullPath(); |
256 if (!log_file_path.empty()) { | 256 if (!log_file_path.empty()) { |
257 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES, | 257 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES, |
258 sandbox::TargetPolicy::FILES_ALLOW_ANY, | 258 sandbox::TargetPolicy::FILES_ALLOW_ANY, |
259 log_file_path.c_str()); | 259 log_file_path.c_str()); |
260 if (result != sandbox::SBOX_ALL_OK) { | 260 if (result != sandbox::SBOX_ALL_OK) { |
261 *success = false; | 261 *success = false; |
262 return; | 262 return; |
263 } | 263 } |
264 } | 264 } |
265 } | 265 } |
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1241 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1241 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
1242 ClientIdToShaderCacheMap::iterator iter = | 1242 ClientIdToShaderCacheMap::iterator iter = |
1243 client_id_to_shader_cache_.find(client_id); | 1243 client_id_to_shader_cache_.find(client_id); |
1244 // If the cache doesn't exist then this is an off the record profile. | 1244 // If the cache doesn't exist then this is an off the record profile. |
1245 if (iter == client_id_to_shader_cache_.end()) | 1245 if (iter == client_id_to_shader_cache_.end()) |
1246 return; | 1246 return; |
1247 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1247 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
1248 } | 1248 } |
1249 | 1249 |
1250 } // namespace content | 1250 } // namespace content |
OLD | NEW |