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

Unified Diff: components/nacl/browser/nacl_process_host.cc

Issue 197693003: Replace --ppapi-keep-alive-throttle command line switch with IPC parameter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move literal to .h to avoid static initializer Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/nacl/browser/nacl_process_host.h ('k') | ppapi/ppapi_shared.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/browser/nacl_process_host.cc
diff --git a/components/nacl/browser/nacl_process_host.cc b/components/nacl/browser/nacl_process_host.cc
index b16b6d86c1fac28c75b4686fb88c16954a6155ba..b8bb6bde096ad30a31403ccfc218bd64b30ed20a 100644
--- a/components/nacl/browser/nacl_process_host.cc
+++ b/components/nacl/browser/nacl_process_host.cc
@@ -48,10 +48,11 @@
#include "ppapi/host/host_factory.h"
#include "ppapi/host/ppapi_host.h"
#include "ppapi/proxy/ppapi_messages.h"
+#include "ppapi/shared_impl/ppapi_constants.h"
#include "ppapi/shared_impl/ppapi_nacl_plugin_args.h"
-#include "ppapi/shared_impl/ppapi_switches.h"
#if defined(OS_POSIX)
+
#include <fcntl.h>
#include "ipc/ipc_channel_posix.h"
@@ -233,6 +234,9 @@ struct NaClProcessHost::NaClInternal {
// -----------------------------------------------------------------------------
+unsigned NaClProcessHost::keepalive_throttle_interval_milliseconds_ =
+ ppapi::kKeepaliveThrottleIntervalDefaultMilliseconds;
+
NaClProcessHost::NaClProcessHost(const GURL& manifest_url,
int render_view_id,
uint32 permission_bits,
@@ -354,6 +358,12 @@ void NaClProcessHost::EarlyStartup() {
NaClBrowser::GetDelegate()->SetDebugPatterns(nacl_debug_mask);
}
+// static
+void NaClProcessHost::SetPpapiKeepAliveThrottleForTesting(
+ unsigned milliseconds) {
+ keepalive_throttle_interval_milliseconds_ = milliseconds;
+}
+
void NaClProcessHost::Launch(
NaClHostMessageFilter* nacl_host_message_filter,
IPC::Message* reply_msg,
@@ -858,10 +868,11 @@ void NaClProcessHost::OnPpapiChannelsCreated(
ppapi::PpapiNaClPluginArgs args;
args.off_the_record = nacl_host_message_filter_->off_the_record();
args.permissions = permissions_;
+ args.keepalive_throttle_interval_milliseconds =
+ keepalive_throttle_interval_milliseconds_;
CommandLine* cmdline = CommandLine::ForCurrentProcess();
DCHECK(cmdline);
std::string flag_whitelist[] = {
- switches::kPpapiKeepAliveThrottle,
switches::kV,
switches::kVModule,
};
« no previous file with comments | « components/nacl/browser/nacl_process_host.h ('k') | ppapi/ppapi_shared.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698