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

Unified Diff: ppapi/cpp/url_loader.cc

Issue 9381010: Convert resources to take an instance key instead of an Instance*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: USELESS PATCH TITLE Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/cpp/url_loader.h ('k') | ppapi/cpp/url_request_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/url_loader.cc
diff --git a/ppapi/cpp/url_loader.cc b/ppapi/cpp/url_loader.cc
index a2cef702d623c73cbb7dfd158545ec56202082a9..73855e94c126fd9952117b5b438865781564bc9c 100644
--- a/ppapi/cpp/url_loader.cc
+++ b/ppapi/cpp/url_loader.cc
@@ -8,7 +8,7 @@
#include "ppapi/c/pp_errors.h"
#include "ppapi/cpp/completion_callback.h"
#include "ppapi/cpp/file_ref.h"
-#include "ppapi/cpp/instance.h"
+#include "ppapi/cpp/instance_handle.h"
#include "ppapi/cpp/module.h"
#include "ppapi/cpp/module_impl.h"
#include "ppapi/cpp/url_request_info.h"
@@ -27,21 +27,13 @@ template <> const char* interface_name<PPB_URLLoader>() {
URLLoader::URLLoader(PP_Resource resource) : Resource(resource) {
}
-// TODO(brettw) remove this when NaCl is updated.
-URLLoader::URLLoader(const Instance& instance) {
+URLLoader::URLLoader(const InstanceHandle& instance) {
if (!has_interface<PPB_URLLoader>())
return;
PassRefFromConstructor(get_interface<PPB_URLLoader>()->Create(
instance.pp_instance()));
}
-URLLoader::URLLoader(Instance* instance) {
- if (!has_interface<PPB_URLLoader>())
- return;
- PassRefFromConstructor(get_interface<PPB_URLLoader>()->Create(
- instance->pp_instance()));
-}
-
URLLoader::URLLoader(const URLLoader& other) : Resource(other) {
}
@@ -81,7 +73,7 @@ bool URLLoader::GetDownloadProgress(
URLResponseInfo URLLoader::GetResponseInfo() const {
if (!has_interface<PPB_URLLoader>())
return URLResponseInfo();
- return URLResponseInfo(URLResponseInfo::PassRef(),
+ return URLResponseInfo(PASS_REF,
get_interface<PPB_URLLoader>()->GetResponseInfo(
pp_resource()));
}
« no previous file with comments | « ppapi/cpp/url_loader.h ('k') | ppapi/cpp/url_request_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698