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

Side by Side Diff: content/browser/plugin_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/plugin_process_host.h ('k') | content/browser/plugin_service_impl.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/plugin_process_host.h" 5 #include "content/browser/plugin_process_host.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #elif defined(OS_POSIX) 9 #elif defined(OS_POSIX)
10 #include <utility> // for pair<> 10 #include <utility> // for pair<>
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // NOTE: changes to this class need to be reviewed by the security team. 97 // NOTE: changes to this class need to be reviewed by the security team.
98 class PluginSandboxedProcessLauncherDelegate 98 class PluginSandboxedProcessLauncherDelegate
99 : public SandboxedProcessLauncherDelegate { 99 : public SandboxedProcessLauncherDelegate {
100 public: 100 public:
101 explicit PluginSandboxedProcessLauncherDelegate(ChildProcessHost* host) 101 explicit PluginSandboxedProcessLauncherDelegate(ChildProcessHost* host)
102 #if defined(OS_POSIX) 102 #if defined(OS_POSIX)
103 : ipc_fd_(host->TakeClientFileDescriptor()) 103 : ipc_fd_(host->TakeClientFileDescriptor())
104 #endif // OS_POSIX 104 #endif // OS_POSIX
105 {} 105 {}
106 106
107 virtual ~PluginSandboxedProcessLauncherDelegate() {} 107 ~PluginSandboxedProcessLauncherDelegate() override {}
108 108
109 #if defined(OS_WIN) 109 #if defined(OS_WIN)
110 virtual bool ShouldSandbox() override { 110 virtual bool ShouldSandbox() override {
111 return false; 111 return false;
112 } 112 }
113 113
114 #elif defined(OS_POSIX) 114 #elif defined(OS_POSIX)
115 virtual base::ScopedFD TakeIpcFd() override { 115 base::ScopedFD TakeIpcFd() override { return ipc_fd_.Pass(); }
116 return ipc_fd_.Pass();
117 }
118 #endif // OS_WIN 116 #endif // OS_WIN
119 117
120 private: 118 private:
121 #if defined(OS_POSIX) 119 #if defined(OS_POSIX)
122 base::ScopedFD ipc_fd_; 120 base::ScopedFD ipc_fd_;
123 #endif // OS_POSIX 121 #endif // OS_POSIX
124 122
125 DISALLOW_COPY_AND_ASSIGN(PluginSandboxedProcessLauncherDelegate); 123 DISALLOW_COPY_AND_ASSIGN(PluginSandboxedProcessLauncherDelegate);
126 }; 124 };
127 125
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 427
430 void PluginProcessHost::GetContexts(const ResourceHostMsg_Request& request, 428 void PluginProcessHost::GetContexts(const ResourceHostMsg_Request& request,
431 ResourceContext** resource_context, 429 ResourceContext** resource_context,
432 net::URLRequestContext** request_context) { 430 net::URLRequestContext** request_context) {
433 *resource_context = 431 *resource_context =
434 resource_context_map_[request.origin_pid].resource_context; 432 resource_context_map_[request.origin_pid].resource_context;
435 *request_context = (*resource_context)->GetRequestContext(); 433 *request_context = (*resource_context)->GetRequestContext();
436 } 434 }
437 435
438 } // namespace content 436 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/plugin_process_host.h ('k') | content/browser/plugin_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698