OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/sync_file_system/drive_backend_v1/fake_drive_uploader.h
" | 5 #include "chrome/browser/sync_file_system/drive_backend_v1/fake_drive_uploader.h
" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 base::Bind(callback, | 42 base::Bind(callback, |
43 google_apis::HTTP_SUCCESS, | 43 google_apis::HTTP_SUCCESS, |
44 GURL(), | 44 GURL(), |
45 base::Passed(&entry))); | 45 base::Passed(&entry))); |
46 } | 46 } |
47 | 47 |
48 void DidGetResourceEntryForUploadExisting( | 48 void DidGetResourceEntryForUploadExisting( |
49 const UploadCompletionCallback& callback, | 49 const UploadCompletionCallback& callback, |
50 GDataErrorCode error, | 50 GDataErrorCode error, |
51 scoped_ptr<ResourceEntry> entry) { | 51 scoped_ptr<ResourceEntry> entry) { |
52 ASSERT_EQ(google_apis::HTTP_SUCCESS, error); | |
53 ASSERT_TRUE(entry); | |
54 base::MessageLoopProxy::current()->PostTask( | 52 base::MessageLoopProxy::current()->PostTask( |
55 FROM_HERE, | 53 FROM_HERE, |
56 base::Bind(callback, | 54 base::Bind(callback, |
57 google_apis::HTTP_SUCCESS, | 55 error, |
58 GURL(), | 56 GURL(), |
59 base::Passed(&entry))); | 57 base::Passed(&entry))); |
60 } | 58 } |
61 | 59 |
62 } // namespace | 60 } // namespace |
63 | 61 |
64 FakeDriveServiceWrapper::FakeDriveServiceWrapper() | 62 FakeDriveServiceWrapper::FakeDriveServiceWrapper() |
65 : make_directory_conflict_(false) {} | 63 : make_directory_conflict_(false) {} |
66 | 64 |
67 FakeDriveServiceWrapper::~FakeDriveServiceWrapper() {} | 65 FakeDriveServiceWrapper::~FakeDriveServiceWrapper() {} |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 const UploadCompletionCallback& callback, | 137 const UploadCompletionCallback& callback, |
140 const ProgressCallback& progress_callback) { | 138 const ProgressCallback& progress_callback) { |
141 // At the moment, sync file system doesn't support resuming of the uploading. | 139 // At the moment, sync file system doesn't support resuming of the uploading. |
142 // So this method shouldn't be reached. | 140 // So this method shouldn't be reached. |
143 NOTREACHED(); | 141 NOTREACHED(); |
144 return CancelCallback(); | 142 return CancelCallback(); |
145 } | 143 } |
146 | 144 |
147 } // namespace drive_backend | 145 } // namespace drive_backend |
148 } // namespace sync_file_system | 146 } // namespace sync_file_system |
OLD | NEW |