| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/renderer/nexe_load_manager.h" | 5 #include "components/nacl/renderer/nexe_load_manager.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/containers/scoped_ptr_hash_map.h" | 8 #include "base/containers/scoped_ptr_hash_map.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 PP_Instance pp_instance) | 90 PP_Instance pp_instance) |
| 91 : pp_instance_(pp_instance), | 91 : pp_instance_(pp_instance), |
| 92 nacl_ready_state_(PP_NACL_READY_STATE_UNSENT), | 92 nacl_ready_state_(PP_NACL_READY_STATE_UNSENT), |
| 93 nexe_error_reported_(false), | 93 nexe_error_reported_(false), |
| 94 is_installed_(false), | 94 is_installed_(false), |
| 95 exit_status_(-1), | 95 exit_status_(-1), |
| 96 nexe_size_(0), | 96 nexe_size_(0), |
| 97 plugin_instance_(content::PepperPluginInstance::Get(pp_instance)), | 97 plugin_instance_(content::PepperPluginInstance::Get(pp_instance)), |
| 98 crash_info_shmem_handle_(base::SharedMemory::NULLHandle()), | 98 crash_info_shmem_handle_(base::SharedMemory::NULLHandle()), |
| 99 weak_factory_(this) { | 99 weak_factory_(this) { |
| 100 set_exit_status(-1); |
| 100 SetLastError(""); | 101 SetLastError(""); |
| 101 HistogramEnumerateOsArch(GetSandboxArch()); | 102 HistogramEnumerateOsArch(GetSandboxArch()); |
| 102 if (plugin_instance_) { | 103 if (plugin_instance_) { |
| 103 plugin_base_url_ = | 104 plugin_base_url_ = |
| 104 plugin_instance_->GetContainer()->element().document().url(); | 105 plugin_instance_->GetContainer()->element().document().url(); |
| 105 } | 106 } |
| 106 } | 107 } |
| 107 | 108 |
| 108 NexeLoadManager::~NexeLoadManager() { | 109 NexeLoadManager::~NexeLoadManager() { |
| 109 if (!nexe_error_reported_) { | 110 if (!nexe_error_reported_) { |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 // to provide error handling. | 469 // to provide error handling. |
| 469 } | 470 } |
| 470 | 471 |
| 471 void NexeLoadManager::CopyCrashLogToJsConsole(const std::string& crash_log) { | 472 void NexeLoadManager::CopyCrashLogToJsConsole(const std::string& crash_log) { |
| 472 base::StringTokenizer t(crash_log, "\n"); | 473 base::StringTokenizer t(crash_log, "\n"); |
| 473 while (t.GetNext()) | 474 while (t.GetNext()) |
| 474 LogToConsole(t.token()); | 475 LogToConsole(t.token()); |
| 475 } | 476 } |
| 476 | 477 |
| 477 } // namespace nacl | 478 } // namespace nacl |
| OLD | NEW |