| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/tools/test_shell/simple_file_writer.h" | 5 #include "webkit/tools/test_shell/simple_file_writer.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
| 9 #include "net/url_request/url_request_context.h" | 9 #include "net/url_request/url_request_context.h" |
| 10 #include "webkit/fileapi/file_system_callback_dispatcher.h" | 10 #include "webkit/fileapi/file_system_callback_dispatcher.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 } | 89 } |
| 90 | 90 |
| 91 ~CallbackDispatcher() { | 91 ~CallbackDispatcher() { |
| 92 proxy_->ClearOperation(); | 92 proxy_->ClearOperation(); |
| 93 } | 93 } |
| 94 | 94 |
| 95 virtual void DidSucceed() { | 95 virtual void DidSucceed() { |
| 96 proxy_->DidSucceed(); | 96 proxy_->DidSucceed(); |
| 97 } | 97 } |
| 98 | 98 |
| 99 virtual void DidGetLocalPath(const FilePath& local_path) { |
| 100 NOTREACHED(); |
| 101 } |
| 102 |
| 99 virtual void DidFail(base::PlatformFileError error_code) { | 103 virtual void DidFail(base::PlatformFileError error_code) { |
| 100 proxy_->DidFail(error_code); | 104 proxy_->DidFail(error_code); |
| 101 } | 105 } |
| 102 | 106 |
| 103 virtual void DidWrite(int64 bytes, bool complete) { | 107 virtual void DidWrite(int64 bytes, bool complete) { |
| 104 proxy_->DidWrite(bytes, complete); | 108 proxy_->DidWrite(bytes, complete); |
| 105 } | 109 } |
| 106 | 110 |
| 107 virtual void DidReadMetadata( | 111 virtual void DidReadMetadata( |
| 108 const base::PlatformFileInfo&, | 112 const base::PlatformFileInfo&, |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 } | 200 } |
| 197 | 201 |
| 198 void SimpleFileWriter::DoWrite( | 202 void SimpleFileWriter::DoWrite( |
| 199 const GURL& path, const GURL& blob_url, int64 offset) { | 203 const GURL& path, const GURL& blob_url, int64 offset) { |
| 200 io_thread_proxy_->Write(path, blob_url, offset); | 204 io_thread_proxy_->Write(path, blob_url, offset); |
| 201 } | 205 } |
| 202 | 206 |
| 203 void SimpleFileWriter::DoCancel() { | 207 void SimpleFileWriter::DoCancel() { |
| 204 io_thread_proxy_->Cancel(); | 208 io_thread_proxy_->Cancel(); |
| 205 } | 209 } |
| OLD | NEW |