diff options
author | paivanof@gmail.com <paivanof@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-23 17:15:10 +0000 |
---|---|---|
committer | paivanof@gmail.com <paivanof@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-23 17:15:10 +0000 |
commit | 36ffc73476203ce0ab507e79e481702e317a6922 (patch) | |
tree | 8dde21160cfeb6e5ae42643470226f19bd2e6b2d /webkit/blob | |
parent | 9b000129350fe5a26574a013c44915b23acf2918 (diff) | |
download | chromium_src-36ffc73476203ce0ab507e79e481702e317a6922.zip chromium_src-36ffc73476203ce0ab507e79e481702e317a6922.tar.gz chromium_src-36ffc73476203ce0ab507e79e481702e317a6922.tar.bz2 |
Offload disk accesses to WorkerPool in ExtensionProtocolHandler
and URLRequestResourceBundleJob.
To achieve that URLRequestSimpleJob::GetData() signature changed
to allow async operation finishing. All places implementing GetData()
are updated.
Patch from Pavel Ivanov <paivanof@gmail.com>
BUG=59849,90207
Review URL: https://chromiumcodereview.appspot.com/10696135
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147869 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/blob')
-rw-r--r-- | webkit/blob/view_blob_internals_job.cc | 11 | ||||
-rw-r--r-- | webkit/blob/view_blob_internals_job.h | 9 |
2 files changed, 12 insertions, 8 deletions
diff --git a/webkit/blob/view_blob_internals_job.cc b/webkit/blob/view_blob_internals_job.cc index 46fd269..e5eb6aa 100644 --- a/webkit/blob/view_blob_internals_job.cc +++ b/webkit/blob/view_blob_internals_job.cc @@ -15,6 +15,7 @@ #include "base/stringprintf.h" #include "base/utf_string_conversions.h" #include "net/base/escape.h" +#include "net/base/net_errors.h" #include "net/url_request/url_request.h" #include "webkit/blob/blob_data.h" #include "webkit/blob/blob_storage_controller.h" @@ -142,9 +143,11 @@ void ViewBlobInternalsJob::DoWorkAsync() { StartAsync(); } -bool ViewBlobInternalsJob::GetData(std::string* mime_type, - std::string* charset, - std::string* data) const { +int ViewBlobInternalsJob::GetData( + std::string* mime_type, + std::string* charset, + std::string* data, + const net::CompletionCallback& callback) const { mime_type->assign("text/html"); charset->assign("UTF-8"); @@ -155,7 +158,7 @@ bool ViewBlobInternalsJob::GetData(std::string* mime_type, else GenerateHTML(data); EndHTML(data); - return true; + return net::OK; } void ViewBlobInternalsJob::GenerateHTML(std::string* out) const { diff --git a/webkit/blob/view_blob_internals_job.h b/webkit/blob/view_blob_internals_job.h index 1167815..24324ca 100644 --- a/webkit/blob/view_blob_internals_job.h +++ b/webkit/blob/view_blob_internals_job.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -28,9 +28,10 @@ class BLOB_EXPORT ViewBlobInternalsJob : public net::URLRequestSimpleJob { BlobStorageController* blob_storage_controller); virtual void Start() OVERRIDE; - virtual bool GetData(std::string* mime_type, - std::string* charset, - std::string* data) const OVERRIDE; + virtual int GetData(std::string* mime_type, + std::string* charset, + std::string* data, + const net::CompletionCallback& callback) const OVERRIDE; virtual bool IsRedirectResponse(GURL* location, int* http_status_code) OVERRIDE; virtual void Kill() OVERRIDE; |