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

Side by Side Diff: content/browser/gpu/gpu_process_host.cc

Issue 667943003: Standardize usage of virtual/override/final in content/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « content/browser/gpu/gpu_process_host.h ('k') | content/browser/gpu/gpu_process_host_ui_shim.h » ('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) 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 : public SandboxedProcessLauncherDelegate { 146 : public SandboxedProcessLauncherDelegate {
147 public: 147 public:
148 GpuSandboxedProcessLauncherDelegate(base::CommandLine* cmd_line, 148 GpuSandboxedProcessLauncherDelegate(base::CommandLine* cmd_line,
149 ChildProcessHost* host) 149 ChildProcessHost* host)
150 #if defined(OS_WIN) 150 #if defined(OS_WIN)
151 : cmd_line_(cmd_line) {} 151 : cmd_line_(cmd_line) {}
152 #elif defined(OS_POSIX) 152 #elif defined(OS_POSIX)
153 : ipc_fd_(host->TakeClientFileDescriptor()) {} 153 : ipc_fd_(host->TakeClientFileDescriptor()) {}
154 #endif 154 #endif
155 155
156 virtual ~GpuSandboxedProcessLauncherDelegate() {} 156 ~GpuSandboxedProcessLauncherDelegate() override {}
157 157
158 #if defined(OS_WIN) 158 #if defined(OS_WIN)
159 virtual bool ShouldSandbox() override { 159 virtual bool ShouldSandbox() override {
160 bool sandbox = !cmd_line_->HasSwitch(switches::kDisableGpuSandbox); 160 bool sandbox = !cmd_line_->HasSwitch(switches::kDisableGpuSandbox);
161 if(! sandbox) { 161 if(! sandbox) {
162 DVLOG(1) << "GPU sandbox is disabled"; 162 DVLOG(1) << "GPU sandbox is disabled";
163 } 163 }
164 return sandbox; 164 return sandbox;
165 } 165 }
166 166
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 log_file_path.c_str()); 243 log_file_path.c_str());
244 if (result != sandbox::SBOX_ALL_OK) { 244 if (result != sandbox::SBOX_ALL_OK) {
245 *success = false; 245 *success = false;
246 return; 246 return;
247 } 247 }
248 } 248 }
249 } 249 }
250 } 250 }
251 #elif defined(OS_POSIX) 251 #elif defined(OS_POSIX)
252 252
253 virtual base::ScopedFD TakeIpcFd() override { 253 base::ScopedFD TakeIpcFd() override { return ipc_fd_.Pass(); }
254 return ipc_fd_.Pass();
255 }
256 #endif // OS_WIN 254 #endif // OS_WIN
257 255
258 private: 256 private:
259 #if defined(OS_WIN) 257 #if defined(OS_WIN)
260 base::CommandLine* cmd_line_; 258 base::CommandLine* cmd_line_;
261 #elif defined(OS_POSIX) 259 #elif defined(OS_POSIX)
262 base::ScopedFD ipc_fd_; 260 base::ScopedFD ipc_fd_;
263 #endif // OS_WIN 261 #endif // OS_WIN
264 }; 262 };
265 263
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); 1060 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader");
1063 ClientIdToShaderCacheMap::iterator iter = 1061 ClientIdToShaderCacheMap::iterator iter =
1064 client_id_to_shader_cache_.find(client_id); 1062 client_id_to_shader_cache_.find(client_id);
1065 // If the cache doesn't exist then this is an off the record profile. 1063 // If the cache doesn't exist then this is an off the record profile.
1066 if (iter == client_id_to_shader_cache_.end()) 1064 if (iter == client_id_to_shader_cache_.end())
1067 return; 1065 return;
1068 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); 1066 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader);
1069 } 1067 }
1070 1068
1071 } // namespace content 1069 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | content/browser/gpu/gpu_process_host_ui_shim.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698