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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/fake_drive_service_helper.h

Issue 881723002: Remove google_apis::ResourceEntry and related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_FAKE_DRIVE_SERVICE_HELPER_ H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_FAKE_DRIVE_SERVICE_HELPER_ H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_FAKE_DRIVE_SERVICE_HELPER_ H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_FAKE_DRIVE_SERVICE_HELPER_ H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
11 #include "chrome/browser/drive/drive_uploader.h" 11 #include "chrome/browser/drive/drive_uploader.h"
12 #include "chrome/browser/drive/fake_drive_service.h" 12 #include "chrome/browser/drive/fake_drive_service.h"
13 #include "google_apis/drive/gdata_wapi_parser.h"
14 13
15 namespace base { 14 namespace base {
16 class FilePath; 15 class FilePath;
17 } 16 }
18 17
19 namespace sync_file_system { 18 namespace sync_file_system {
20 namespace drive_backend { 19 namespace drive_backend {
21 20
22 class FakeDriveServiceHelper { 21 class FakeDriveServiceHelper {
23 public: 22 public:
(...skipping 30 matching lines...) Expand all
54 google_apis::GDataErrorCode AddResourceToDirectory( 53 google_apis::GDataErrorCode AddResourceToDirectory(
55 const std::string& parent_folder_id, 54 const std::string& parent_folder_id,
56 const std::string& file_id); 55 const std::string& file_id);
57 google_apis::GDataErrorCode RemoveResourceFromDirectory( 56 google_apis::GDataErrorCode RemoveResourceFromDirectory(
58 const std::string& parent_folder_id, 57 const std::string& parent_folder_id,
59 const std::string& file_id); 58 const std::string& file_id);
60 google_apis::GDataErrorCode GetSyncRootFolderID( 59 google_apis::GDataErrorCode GetSyncRootFolderID(
61 std::string* sync_root_folder_id); 60 std::string* sync_root_folder_id);
62 google_apis::GDataErrorCode ListFilesInFolder( 61 google_apis::GDataErrorCode ListFilesInFolder(
63 const std::string& folder_id, 62 const std::string& folder_id,
64 ScopedVector<google_apis::ResourceEntry>* entries); 63 ScopedVector<google_apis::FileResource>* entries);
65 google_apis::GDataErrorCode SearchByTitle( 64 google_apis::GDataErrorCode SearchByTitle(
66 const std::string& folder_id, 65 const std::string& folder_id,
67 const std::string& title, 66 const std::string& title,
68 ScopedVector<google_apis::ResourceEntry>* entries); 67 ScopedVector<google_apis::FileResource>* entries);
68
69 google_apis::GDataErrorCode GetFileResource( 69 google_apis::GDataErrorCode GetFileResource(
70 const std::string& file_id, 70 const std::string& file_id,
71 scoped_ptr<google_apis::FileResource>* entry); 71 scoped_ptr<google_apis::FileResource>* entry);
72 google_apis::GDataErrorCode ReadFile( 72 google_apis::GDataErrorCode ReadFile(
73 const std::string& file_id, 73 const std::string& file_id,
74 std::string* file_content); 74 std::string* file_content);
75 google_apis::GDataErrorCode GetAboutResource( 75 google_apis::GDataErrorCode GetAboutResource(
76 scoped_ptr<google_apis::AboutResource>* about_resource); 76 scoped_ptr<google_apis::AboutResource>* about_resource);
77 77
78 base::FilePath base_dir_path() { return base_dir_.path(); } 78 base::FilePath base_dir_path() { return base_dir_.path(); }
79 79
80 private: 80 private:
81 google_apis::GDataErrorCode CompleteListing( 81 google_apis::GDataErrorCode CompleteListing(
82 scoped_ptr<google_apis::FileList> list, 82 scoped_ptr<google_apis::FileList> list,
83 ScopedVector<google_apis::ResourceEntry>* entries); 83 ScopedVector<google_apis::FileResource>* entries);
84 84
85 void Initialize(); 85 void Initialize();
86 86
87 base::FilePath WriteToTempFile(const std::string& content); 87 base::FilePath WriteToTempFile(const std::string& content);
88 88
89 base::ScopedTempDir base_dir_; 89 base::ScopedTempDir base_dir_;
90 base::FilePath temp_dir_; 90 base::FilePath temp_dir_;
91 91
92 // Not own. 92 // Not own.
93 drive::FakeDriveService* fake_drive_service_; 93 drive::FakeDriveService* fake_drive_service_;
94 drive::DriveUploaderInterface* drive_uploader_; 94 drive::DriveUploaderInterface* drive_uploader_;
95 95
96 std::string sync_root_folder_title_; 96 std::string sync_root_folder_title_;
97 }; 97 };
98 98
99 } // namespace drive_backend 99 } // namespace drive_backend
100 } // namespace sync_file_system 100 } // namespace sync_file_system
101 101
102 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_FAKE_DRIVE_SERVICE_HELP ER_H_ 102 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_FAKE_DRIVE_SERVICE_HELP ER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698