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