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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend_v1/fake_api_util_unittest.cc

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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
OLDNEW
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_api_util.h" 5 #include "chrome/browser/sync_file_system/drive_backend_v1/fake_api_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "google_apis/drive/gdata_errorcode.h" 12 #include "google_apis/drive/gdata_errorcode.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 #include "webkit/common/blob/scoped_file.h" 14 #include "storage/common/blob/scoped_file.h"
15 15
16 namespace sync_file_system { 16 namespace sync_file_system {
17 namespace drive_backend { 17 namespace drive_backend {
18 18
19 namespace { 19 namespace {
20 20
21 void DidDownloadFile(google_apis::GDataErrorCode* error_out, 21 void DidDownloadFile(google_apis::GDataErrorCode* error_out,
22 std::string* file_md5_out, 22 std::string* file_md5_out,
23 google_apis::GDataErrorCode error, 23 google_apis::GDataErrorCode error,
24 const std::string& file_md5, 24 const std::string& file_md5,
25 int64 file_size, 25 int64 file_size,
26 const base::Time& updated_time, 26 const base::Time& updated_time,
27 webkit_blob::ScopedFile downloaded_file) { 27 storage::ScopedFile downloaded_file) {
28 *error_out = error; 28 *error_out = error;
29 *file_md5_out = file_md5; 29 *file_md5_out = file_md5;
30 } 30 }
31 31
32 void DidGetChangeList(google_apis::GDataErrorCode* error_out, 32 void DidGetChangeList(google_apis::GDataErrorCode* error_out,
33 scoped_ptr<google_apis::ResourceList>* change_list_out, 33 scoped_ptr<google_apis::ResourceList>* change_list_out,
34 google_apis::GDataErrorCode error, 34 google_apis::GDataErrorCode error,
35 scoped_ptr<google_apis::ResourceList> change_list) { 35 scoped_ptr<google_apis::ResourceList> change_list) {
36 *error_out = error; 36 *error_out = error;
37 *change_list_out = change_list.Pass(); 37 *change_list_out = change_list.Pass();
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 api_util.DeleteFile( 132 api_util.DeleteFile(
133 resource_id, std::string(), base::Bind(&DidDeleteFile, &error)); 133 resource_id, std::string(), base::Bind(&DidDeleteFile, &error));
134 message_loop.RunUntilIdle(); 134 message_loop.RunUntilIdle();
135 135
136 EXPECT_EQ(google_apis::HTTP_SUCCESS, error); 136 EXPECT_EQ(google_apis::HTTP_SUCCESS, error);
137 EXPECT_TRUE(api_util.remote_resources().find(resource_id)->second.deleted); 137 EXPECT_TRUE(api_util.remote_resources().find(resource_id)->second.deleted);
138 } 138 }
139 139
140 } // namespace drive_backend 140 } // namespace drive_backend
141 } // namespace sync_file_system 141 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698