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

Side by Side Diff: ppapi/native_client/src/trusted/plugin/pnacl_resources.cc

Issue 10377157: Refactor Pnacl coordinator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sehr comments Created 8 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 | Annotate | Revision Log
OLDNEW
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 "native_client/src/trusted/plugin/pnacl_resources.h" 5 #include "native_client/src/trusted/plugin/pnacl_resources.h"
6 6
7 #include "native_client/src/include/portability_io.h" 7 #include "native_client/src/include/portability_io.h"
8 #include "native_client/src/shared/platform/nacl_check.h" 8 #include "native_client/src/shared/platform/nacl_check.h"
9 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h" 9 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h"
10 #include "native_client/src/trusted/plugin/manifest.h" 10 #include "native_client/src/trusted/plugin/manifest.h"
11 #include "native_client/src/trusted/plugin/plugin.h" 11 #include "native_client/src/trusted/plugin/plugin.h"
12 #include "native_client/src/trusted/plugin/pnacl_coordinator.h" 12 #include "native_client/src/trusted/plugin/pnacl_coordinator.h"
13 #include "native_client/src/trusted/plugin/utility.h" 13 #include "native_client/src/trusted/plugin/utility.h"
14 14
15 #include "ppapi/c/pp_errors.h" 15 #include "ppapi/c/pp_errors.h"
16 16
17 namespace plugin { 17 namespace plugin {
18 18
19 const char PnaclUrls::kExtensionOrigin[] =
20 "chrome-extension://gcodniebolpnpaiggndmcmmfpldlknih/";
21 const char PnaclUrls::kLlcUrl[] = "llc";
22 const char PnaclUrls::kLdUrl[] = "ld";
23
19 PnaclResources::~PnaclResources() { 24 PnaclResources::~PnaclResources() {
20 for (std::map<nacl::string, nacl::DescWrapper*>::iterator 25 for (std::map<nacl::string, nacl::DescWrapper*>::iterator
21 i = resource_wrappers_.begin(), e = resource_wrappers_.end(); 26 i = resource_wrappers_.begin(), e = resource_wrappers_.end();
22 i != e; 27 i != e;
23 ++i) { 28 ++i) {
24 delete i->second; 29 delete i->second;
25 } 30 }
26 resource_wrappers_.clear(); 31 resource_wrappers_.clear();
27 } 32 }
28 33
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 coordinator_->ReportPpapiError(pp_error, 76 coordinator_->ReportPpapiError(pp_error,
72 "PnaclResources::ResourceReady failed."); 77 "PnaclResources::ResourceReady failed.");
73 } else { 78 } else {
74 resource_wrappers_[url] = 79 resource_wrappers_[url] =
75 plugin_->wrapper_factory()->MakeFileDesc(fd, O_RDONLY); 80 plugin_->wrapper_factory()->MakeFileDesc(fd, O_RDONLY);
76 delayed_callback_->RunIfTime(); 81 delayed_callback_->RunIfTime();
77 } 82 }
78 } 83 }
79 84
80 } // namespace plugin 85 } // namespace plugin
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698