| 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 "components/nacl/browser/nacl_process_host.h" | 5 #include "components/nacl/browser/nacl_process_host.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 render_view_id_, | 800 render_view_id_, |
| 801 profile_directory_)); | 801 profile_directory_)); |
| 802 ppapi_host_->SetOnKeepaliveCallback( | 802 ppapi_host_->SetOnKeepaliveCallback( |
| 803 NaClBrowser::GetDelegate()->GetOnKeepaliveCallback()); | 803 NaClBrowser::GetDelegate()->GetOnKeepaliveCallback()); |
| 804 | 804 |
| 805 ppapi::PpapiNaClChannelArgs args; | 805 ppapi::PpapiNaClChannelArgs args; |
| 806 args.off_the_record = nacl_host_message_filter_->off_the_record(); | 806 args.off_the_record = nacl_host_message_filter_->off_the_record(); |
| 807 args.permissions = permissions_; | 807 args.permissions = permissions_; |
| 808 CommandLine* cmdline = CommandLine::ForCurrentProcess(); | 808 CommandLine* cmdline = CommandLine::ForCurrentProcess(); |
| 809 DCHECK(cmdline); | 809 DCHECK(cmdline); |
| 810 std::string flag_whitelist[] = {switches::kV, switches::kVModule}; | 810 std::string flag_whitelist[] = { |
| 811 switches::kPpapiKeepAliveThrottle, |
| 812 switches::kV, |
| 813 switches::kVModule, |
| 814 }; |
| 811 for (size_t i = 0; i < arraysize(flag_whitelist); ++i) { | 815 for (size_t i = 0; i < arraysize(flag_whitelist); ++i) { |
| 812 std::string value = cmdline->GetSwitchValueASCII(flag_whitelist[i]); | 816 std::string value = cmdline->GetSwitchValueASCII(flag_whitelist[i]); |
| 813 if (!value.empty()) { | 817 if (!value.empty()) { |
| 814 args.switch_names.push_back(flag_whitelist[i]); | 818 args.switch_names.push_back(flag_whitelist[i]); |
| 815 args.switch_values.push_back(value); | 819 args.switch_values.push_back(value); |
| 816 } | 820 } |
| 817 } | 821 } |
| 818 | 822 |
| 819 ppapi_host_->GetPpapiHost()->AddHostFactoryFilter( | 823 ppapi_host_->GetPpapiHost()->AddHostFactoryFilter( |
| 820 scoped_ptr<ppapi::host::HostFactory>( | 824 scoped_ptr<ppapi::host::HostFactory>( |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1018 process_handle.Take(), info, | 1022 process_handle.Take(), info, |
| 1019 base::MessageLoopProxy::current(), | 1023 base::MessageLoopProxy::current(), |
| 1020 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, | 1024 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, |
| 1021 weak_factory_.GetWeakPtr())); | 1025 weak_factory_.GetWeakPtr())); |
| 1022 return true; | 1026 return true; |
| 1023 } | 1027 } |
| 1024 } | 1028 } |
| 1025 #endif | 1029 #endif |
| 1026 | 1030 |
| 1027 } // namespace nacl | 1031 } // namespace nacl |
| OLD | NEW |