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

Unified Diff: ppapi/cpp/url_loader.cc

Issue 4747001: Move URLLoader, URLRequestInfo, and URLResponseInfo out of the dev directory... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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
===================================================================
--- ppapi/cpp/url_loader.cc (revision 65458)
+++ ppapi/cpp/url_loader.cc (working copy)
@@ -2,66 +2,55 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ppapi/cpp/dev/url_loader_dev.h"
+#include "ppapi/cpp/url_loader.h"
-#include "ppapi/c/dev/ppb_url_loader_dev.h"
+#include "ppapi/c/ppb_url_loader.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/cpp/common.h"
#include "ppapi/cpp/completion_callback.h"
#include "ppapi/cpp/dev/file_ref_dev.h"
-#include "ppapi/cpp/dev/url_request_info_dev.h"
-#include "ppapi/cpp/dev/url_response_info_dev.h"
#include "ppapi/cpp/instance.h"
#include "ppapi/cpp/module.h"
#include "ppapi/cpp/module_impl.h"
+#include "ppapi/cpp/url_request_info.h"
+#include "ppapi/cpp/url_response_info.h"
namespace {
-DeviceFuncs<PPB_URLLoader_Dev> url_loader_f(PPB_URLLOADER_DEV_INTERFACE);
+DeviceFuncs<PPB_URLLoader> url_loader_f(PPB_URLLOADER_INTERFACE);
} // namespace
namespace pp {
-URLLoader_Dev::URLLoader_Dev(PP_Resource resource) : Resource(resource) {
+URLLoader::URLLoader(PP_Resource resource) : Resource(resource) {
}
-URLLoader_Dev::URLLoader_Dev(const Instance& instance) {
+URLLoader::URLLoader(const Instance& instance) {
if (!url_loader_f)
return;
PassRefFromConstructor(url_loader_f->Create(instance.pp_instance()));
}
-URLLoader_Dev::URLLoader_Dev(const URLLoader_Dev& other)
- : Resource(other) {
+URLLoader::URLLoader(const URLLoader& other) : Resource(other) {
}
-URLLoader_Dev& URLLoader_Dev::operator=(const URLLoader_Dev& other) {
- URLLoader_Dev copy(other);
- swap(copy);
- return *this;
-}
-
-void URLLoader_Dev::swap(URLLoader_Dev& other) {
- Resource::swap(other);
-}
-
-int32_t URLLoader_Dev::Open(const URLRequestInfo_Dev& request_info,
- const CompletionCallback& cc) {
+int32_t URLLoader::Open(const URLRequestInfo& request_info,
+ const CompletionCallback& cc) {
if (!url_loader_f)
return PP_ERROR_NOINTERFACE;
return url_loader_f->Open(pp_resource(), request_info.pp_resource(),
cc.pp_completion_callback());
}
-int32_t URLLoader_Dev::FollowRedirect(const CompletionCallback& cc) {
+int32_t URLLoader::FollowRedirect(const CompletionCallback& cc) {
if (!url_loader_f)
return PP_ERROR_NOINTERFACE;
return url_loader_f->FollowRedirect(pp_resource(),
cc.pp_completion_callback());
}
-bool URLLoader_Dev::GetUploadProgress(int64_t* bytes_sent,
+bool URLLoader::GetUploadProgress(int64_t* bytes_sent,
int64_t* total_bytes_to_be_sent) const {
if (!url_loader_f)
return false;
@@ -70,7 +59,7 @@
total_bytes_to_be_sent));
}
-bool URLLoader_Dev::GetDownloadProgress(
+bool URLLoader::GetDownloadProgress(
int64_t* bytes_received,
int64_t* total_bytes_to_be_received) const {
if (!url_loader_f)
@@ -81,16 +70,16 @@
total_bytes_to_be_received));
}
-URLResponseInfo_Dev URLLoader_Dev::GetResponseInfo() const {
+URLResponseInfo URLLoader::GetResponseInfo() const {
if (!url_loader_f)
- return URLResponseInfo_Dev();
- return URLResponseInfo_Dev(URLResponseInfo_Dev::PassRef(),
- url_loader_f->GetResponseInfo(pp_resource()));
+ return URLResponseInfo();
+ return URLResponseInfo(URLResponseInfo::PassRef(),
+ url_loader_f->GetResponseInfo(pp_resource()));
}
-int32_t URLLoader_Dev::ReadResponseBody(char* buffer,
- int32_t bytes_to_read,
- const CompletionCallback& cc) {
+int32_t URLLoader::ReadResponseBody(char* buffer,
+ int32_t bytes_to_read,
+ const CompletionCallback& cc) {
if (!url_loader_f)
return PP_ERROR_NOINTERFACE;
return url_loader_f->ReadResponseBody(pp_resource(),
@@ -99,14 +88,14 @@
cc.pp_completion_callback());
}
-int32_t URLLoader_Dev::FinishStreamingToFile(const CompletionCallback& cc) {
+int32_t URLLoader::FinishStreamingToFile(const CompletionCallback& cc) {
if (!url_loader_f)
return PP_ERROR_NOINTERFACE;
return url_loader_f->FinishStreamingToFile(pp_resource(),
cc.pp_completion_callback());
}
-void URLLoader_Dev::Close() {
+void URLLoader::Close() {
if (!url_loader_f)
return;
url_loader_f->Close(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