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

Side by Side Diff: components/nacl/renderer/nexe_load_manager.cc

Issue 2849633002: Get rid of base::SharedMemory::NULLHandle(); (Closed)
Patch Set: Rebase. Created 3 years, 7 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
OLDNEW
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 <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 std::string LookupAttribute(const std::map<std::string, std::string>& args, 74 std::string LookupAttribute(const std::map<std::string, std::string>& args,
75 const std::string& key) { 75 const std::string& key) {
76 std::map<std::string, std::string>::const_iterator it = args.find(key); 76 std::map<std::string, std::string>::const_iterator it = args.find(key);
77 if (it != args.end()) 77 if (it != args.end())
78 return it->second; 78 return it->second;
79 return std::string(); 79 return std::string();
80 } 80 }
81 81
82 } // namespace 82 } // namespace
83 83
84 NexeLoadManager::NexeLoadManager( 84 NexeLoadManager::NexeLoadManager(PP_Instance pp_instance)
85 PP_Instance pp_instance)
86 : pp_instance_(pp_instance), 85 : pp_instance_(pp_instance),
87 nacl_ready_state_(PP_NACL_READY_STATE_UNSENT), 86 nacl_ready_state_(PP_NACL_READY_STATE_UNSENT),
88 nexe_error_reported_(false), 87 nexe_error_reported_(false),
89 is_installed_(false), 88 is_installed_(false),
90 exit_status_(-1), 89 exit_status_(-1),
91 nexe_size_(0), 90 nexe_size_(0),
92 plugin_instance_(content::PepperPluginInstance::Get(pp_instance)), 91 plugin_instance_(content::PepperPluginInstance::Get(pp_instance)),
93 nonsfi_(false), 92 nonsfi_(false),
94 crash_info_shmem_handle_(base::SharedMemory::NULLHandle()),
95 weak_factory_(this) { 93 weak_factory_(this) {
96 set_exit_status(-1); 94 set_exit_status(-1);
97 SetLastError(""); 95 SetLastError("");
98 HistogramEnumerateOsArch(GetSandboxArch()); 96 HistogramEnumerateOsArch(GetSandboxArch());
99 if (plugin_instance_) { 97 if (plugin_instance_) {
100 plugin_base_url_ = plugin_instance_->GetContainer()->GetDocument().Url(); 98 plugin_base_url_ = plugin_instance_->GetContainer()->GetDocument().Url();
101 } 99 }
102 } 100 }
103 101
104 NexeLoadManager::~NexeLoadManager() { 102 NexeLoadManager::~NexeLoadManager() {
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 // to provide error handling. 440 // to provide error handling.
443 } 441 }
444 442
445 void NexeLoadManager::CopyCrashLogToJsConsole(const std::string& crash_log) { 443 void NexeLoadManager::CopyCrashLogToJsConsole(const std::string& crash_log) {
446 base::StringTokenizer t(crash_log, "\n"); 444 base::StringTokenizer t(crash_log, "\n");
447 while (t.GetNext()) 445 while (t.GetNext())
448 LogToConsole(t.token()); 446 LogToConsole(t.token());
449 } 447 }
450 448
451 } // namespace nacl 449 } // namespace nacl
OLDNEW
« no previous file with comments | « components/nacl/common/nacl_types.cc ('k') | content/browser/media/capture/web_contents_video_capture_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698