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

Unified Diff: webkit/appcache/view_appcache_internals_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
« no previous file with comments | « net/url_request/url_request_simple_job.cc ('k') | webkit/blob/view_blob_internals_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/view_appcache_internals_job.cc
===================================================================
--- webkit/appcache/view_appcache_internals_job.cc (revision 147715)
+++ webkit/appcache/view_appcache_internals_job.cc (working copy)
@@ -19,6 +19,7 @@
#include "base/utf_string_conversions.h"
#include "net/base/escape.h"
#include "net/base/io_buffer.h"
+#include "net/base/net_errors.h"
#include "net/http/http_response_headers.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_simple_job.h"
@@ -334,9 +335,10 @@
}
// Produces a page containing the listing
- virtual bool GetData(std::string* mime_type,
- std::string* charset,
- std::string* out) const {
+ virtual int GetData(std::string* mime_type,
+ std::string* charset,
+ std::string* out,
+ const net::CompletionCallback& callback) const OVERRIDE {
mime_type->assign("text/html");
charset->assign("UTF-8");
@@ -361,7 +363,7 @@
EmitAppCacheInfoVector(base_url, appcache_service_, appcaches, out);
}
EmitPageEnd(out);
- return true;
+ return net::OK;
}
private:
@@ -384,10 +386,11 @@
RedirectToMainPageJob(net::URLRequest* request, AppCacheService* service)
: BaseInternalsJob(request, service) {}
- virtual bool GetData(std::string* mime_type,
- std::string* charset,
- std::string* data) const {
- return true; // IsRedirectResponse induces a redirect.
+ virtual int GetData(std::string* mime_type,
+ std::string* charset,
+ std::string* data,
+ const net::CompletionCallback& callback) const OVERRIDE {
+ return net::OK; // IsRedirectResponse induces a redirect.
}
virtual bool IsRedirectResponse(GURL* location, int* http_status_code) {
@@ -447,9 +450,10 @@
}
// Produces a page containing the entries listing.
- virtual bool GetData(std::string* mime_type,
- std::string* charset,
- std::string* out) const {
+ virtual int GetData(std::string* mime_type,
+ std::string* charset,
+ std::string* out,
+ const net::CompletionCallback& callback) const OVERRIDE {
mime_type->assign("text/html");
charset->assign("UTF-8");
out->clear();
@@ -466,7 +470,7 @@
out);
}
EmitPageEnd(out);
- return true;
+ return net::OK;
}
private:
@@ -519,9 +523,10 @@
}
// Produces a page containing the response headers and data.
- virtual bool GetData(std::string* mime_type,
- std::string* charset,
- std::string* out) const {
+ virtual int GetData(std::string* mime_type,
+ std::string* charset,
+ std::string* out,
+ const net::CompletionCallback& callback) const OVERRIDE {
mime_type->assign("text/html");
charset->assign("UTF-8");
out->clear();
@@ -544,7 +549,7 @@
out->append("Failed to read response headers and data.<br>");
}
EmitPageEnd(out);
- return true;
+ return net::OK;
}
private:
« no previous file with comments | « net/url_request/url_request_simple_job.cc ('k') | webkit/blob/view_blob_internals_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698