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

Unified Diff: net/url_request/url_request_data_job.cc

Issue 10696135: Offload disk accesses to WorkerPool in ExtensionProtocolHandler (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
Index: net/url_request/url_request_data_job.cc
===================================================================
--- net/url_request/url_request_data_job.cc (revision 145483)
+++ net/url_request/url_request_data_job.cc (working copy)
@@ -7,6 +7,7 @@
#include "net/url_request/url_request_data_job.h"
#include "net/base/data_url.h"
+#include "net/base/net_errors.h"
namespace net {
@@ -20,15 +21,16 @@
return new URLRequestDataJob(request);
}
-bool URLRequestDataJob::GetData(std::string* mime_type,
- std::string* charset,
- std::string* data) const {
+int URLRequestDataJob::GetData(std::string* mime_type,
+ std::string* charset,
+ std::string* data,
+ const CompletionCallback& callback) const {
// Check if data URL is valid. If not, don't bother to try to extract data.
// Otherwise, parse the data from the data URL.
const GURL& url = request_->url();
if (!url.is_valid())
- return false;
- return DataURL::Parse(url, mime_type, charset, data);
+ return ERR_INVALID_URL;
+ return DataURL::Parse(url, mime_type, charset, data)? OK: ERR_INVALID_URL;
}
URLRequestDataJob::~URLRequestDataJob() {

Powered by Google App Engine
This is Rietveld 408576698