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

Side by Side Diff: webkit/tools/test_shell/simple_file_writer.cc

Issue 7477008: Remove explicit keyword from multi-argument constructors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/appcache/appcache_update_job_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 13 matching lines...) Expand all
24 using WebKit::WebURL; 24 using WebKit::WebURL;
25 25
26 net::URLRequestContext* SimpleFileWriter::request_context_ = NULL; 26 net::URLRequestContext* SimpleFileWriter::request_context_ = NULL;
27 27
28 // Helper class to proxy to write and truncate calls to the IO thread, 28 // Helper class to proxy to write and truncate calls to the IO thread,
29 // and to proxy the results back to the main thead. There is a one-to-one 29 // and to proxy the results back to the main thead. There is a one-to-one
30 // relationship between SimpleFileWriters and IOThreadBackends. 30 // relationship between SimpleFileWriters and IOThreadBackends.
31 class SimpleFileWriter::IOThreadProxy 31 class SimpleFileWriter::IOThreadProxy
32 : public base::RefCountedThreadSafe<SimpleFileWriter::IOThreadProxy> { 32 : public base::RefCountedThreadSafe<SimpleFileWriter::IOThreadProxy> {
33 public: 33 public:
34 explicit IOThreadProxy(const base::WeakPtr<SimpleFileWriter>& simple_writer, 34 IOThreadProxy(const base::WeakPtr<SimpleFileWriter>& simple_writer,
35 FileSystemContext* file_system_context) 35 FileSystemContext* file_system_context)
36 : simple_writer_(simple_writer), 36 : simple_writer_(simple_writer),
37 operation_(NULL), 37 operation_(NULL),
38 file_system_context_(file_system_context) { 38 file_system_context_(file_system_context) {
39 // The IO thread needs to be running for this class to work. 39 // The IO thread needs to be running for this class to work.
40 SimpleResourceLoaderBridge::EnsureIOThread(); 40 SimpleResourceLoaderBridge::EnsureIOThread();
41 io_thread_ = SimpleResourceLoaderBridge::GetIoThread(); 41 io_thread_ = SimpleResourceLoaderBridge::GetIoThread();
42 main_thread_ = base::MessageLoopProxy::CreateForCurrentThread(); 42 main_thread_ = base::MessageLoopProxy::CreateForCurrentThread();
43 } 43 }
44 44
45 virtual ~IOThreadProxy() { 45 virtual ~IOThreadProxy() {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 196 }
197 197
198 void SimpleFileWriter::DoWrite( 198 void SimpleFileWriter::DoWrite(
199 const GURL& path, const GURL& blob_url, int64 offset) { 199 const GURL& path, const GURL& blob_url, int64 offset) {
200 io_thread_proxy_->Write(path, blob_url, offset); 200 io_thread_proxy_->Write(path, blob_url, offset);
201 } 201 }
202 202
203 void SimpleFileWriter::DoCancel() { 203 void SimpleFileWriter::DoCancel() {
204 io_thread_proxy_->Cancel(); 204 io_thread_proxy_->Cancel();
205 } 205 }
OLDNEW
« no previous file with comments | « webkit/appcache/appcache_update_job_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698