diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-01 20:38:10 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-01 20:38:10 +0000 |
commit | f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8 (patch) | |
tree | 6ccdd87ccfc89adbcb372c517559fa61fbc6c6b2 /webkit/glue/media | |
parent | d1666539b57bf8552e203d355fd09909d36f9732 (diff) | |
download | chromium_src-f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8.zip chromium_src-f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8.tar.gz chromium_src-f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8.tar.bz2 |
Begin CompletionCallback switchover.
Rename CompletionCallback to OldCompletionCallback in preparation for introducing a new CompletionCallback based on base::Callback.
Also renames other CompletionCallback types like CancelableCompletionCallback and TestCompletionCallback and CompletionCallbackImpl. All using sed with s/CompletionCallback/OldCompletionCallback/g.
BUG=98719
TEST=none
Review URL: http://codereview.chromium.org/8070013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103650 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/media')
-rw-r--r-- | webkit/glue/media/buffered_data_source_unittest.cc | 8 | ||||
-rw-r--r-- | webkit/glue/media/buffered_resource_loader.cc | 4 | ||||
-rw-r--r-- | webkit/glue/media/buffered_resource_loader.h | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/webkit/glue/media/buffered_data_source_unittest.cc b/webkit/glue/media/buffered_data_source_unittest.cc index 4b10e79..1a7c28c 100644 --- a/webkit/glue/media/buffered_data_source_unittest.cc +++ b/webkit/glue/media/buffered_data_source_unittest.cc @@ -74,12 +74,12 @@ class MockBufferedResourceLoader : public BufferedResourceLoader { : BufferedResourceLoader(GURL(), 0, 0, new media::MediaLog()) { } - MOCK_METHOD3(Start, void(net::CompletionCallback* read_callback, + MOCK_METHOD3(Start, void(net::OldCompletionCallback* read_callback, const base::Closure& network_callback, WebFrame* frame)); MOCK_METHOD0(Stop, void()); MOCK_METHOD4(Read, void(int64 position, int read_size, uint8* buffer, - net::CompletionCallback* callback)); + net::OldCompletionCallback* callback)); MOCK_METHOD0(content_length, int64()); MOCK_METHOD0(instance_size, int64()); MOCK_METHOD0(range_supported, bool()); @@ -225,7 +225,7 @@ class BufferedDataSourceTest : public testing::Test { } void InvokeStartCallback( - net::CompletionCallback* callback, + net::OldCompletionCallback* callback, const base::Closure& network_callback, WebFrame* frame) { callback->RunWithParams(Tuple1<int>(error_)); @@ -234,7 +234,7 @@ class BufferedDataSourceTest : public testing::Test { } void InvokeReadCallback(int64 position, int size, uint8* buffer, - net::CompletionCallback* callback) { + net::OldCompletionCallback* callback) { if (error_ > 0) memcpy(buffer, data_ + static_cast<int>(position), error_); callback->RunWithParams(Tuple1<int>(error_)); diff --git a/webkit/glue/media/buffered_resource_loader.cc b/webkit/glue/media/buffered_resource_loader.cc index 44ebc75..07f5729 100644 --- a/webkit/glue/media/buffered_resource_loader.cc +++ b/webkit/glue/media/buffered_resource_loader.cc @@ -89,7 +89,7 @@ BufferedResourceLoader::~BufferedResourceLoader() { url_loader_->cancel(); } -void BufferedResourceLoader::Start(net::CompletionCallback* start_callback, +void BufferedResourceLoader::Start(net::OldCompletionCallback* start_callback, const base::Closure& event_callback, WebFrame* frame) { // Make sure we have not started. @@ -172,7 +172,7 @@ void BufferedResourceLoader::Stop() { void BufferedResourceLoader::Read(int64 position, int read_size, uint8* buffer, - net::CompletionCallback* read_callback) { + net::OldCompletionCallback* read_callback) { DCHECK(!read_callback_.get()); DCHECK(buffer_.get()); DCHECK(read_callback); diff --git a/webkit/glue/media/buffered_resource_loader.h b/webkit/glue/media/buffered_resource_loader.h index 0d1a4dd..a9a1520 100644 --- a/webkit/glue/media/buffered_resource_loader.h +++ b/webkit/glue/media/buffered_resource_loader.h @@ -73,7 +73,7 @@ class BufferedResourceLoader // An error code that indicates the request has failed. // |event_callback| is called when the response is completed, data is // received, the request is suspended or resumed. - virtual void Start(net::CompletionCallback* callback, + virtual void Start(net::OldCompletionCallback* callback, const base::Closure& event_callback, WebKit::WebFrame* frame); @@ -92,7 +92,7 @@ class BufferedResourceLoader // - net::ERR_CACHE_MISS // The read was made too far away from the current buffered position. virtual void Read(int64 position, int read_size, - uint8* buffer, net::CompletionCallback* callback); + uint8* buffer, net::OldCompletionCallback* callback); // Returns the position of the last byte buffered. Returns // |kPositionNotSpecified| if such value is not available. @@ -261,14 +261,14 @@ class BufferedResourceLoader base::Closure event_callback_; // Members used during request start. - scoped_ptr<net::CompletionCallback> start_callback_; + scoped_ptr<net::OldCompletionCallback> start_callback_; int64 offset_; int64 content_length_; int64 instance_size_; // Members used during a read operation. They should be reset after each // read has completed or failed. - scoped_ptr<net::CompletionCallback> read_callback_; + scoped_ptr<net::OldCompletionCallback> read_callback_; int64 read_position_; size_t read_size_; uint8* read_buffer_; |