OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_DRIVE_FAKE_DRIVE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_ |
6 #define CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_ | 6 #define CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "chrome/browser/drive/drive_service_interface.h" | 9 #include "chrome/browser/drive/drive_service_interface.h" |
10 | 10 |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 const google_apis::FileResourceCallback& callback); | 277 const google_apis::FileResourceCallback& callback); |
278 | 278 |
279 // Sets the last modified time for an entry specified by |resource_id|. | 279 // Sets the last modified time for an entry specified by |resource_id|. |
280 // On success, returns HTTP_SUCCESS with the parsed entry. | 280 // On success, returns HTTP_SUCCESS with the parsed entry. |
281 // |callback| must not be null. | 281 // |callback| must not be null. |
282 void SetLastModifiedTime( | 282 void SetLastModifiedTime( |
283 const std::string& resource_id, | 283 const std::string& resource_id, |
284 const base::Time& last_modified_time, | 284 const base::Time& last_modified_time, |
285 const google_apis::FileResourceCallback& callback); | 285 const google_apis::FileResourceCallback& callback); |
286 | 286 |
| 287 // Sets the user's permission for an entry specified by |resource_id|. |
| 288 google_apis::GDataErrorCode SetUserPermission( |
| 289 const std::string& resource_id, |
| 290 google_apis::drive::PermissionRole user_permission); |
| 291 |
287 private: | 292 private: |
288 struct EntryInfo; | 293 struct EntryInfo; |
289 struct UploadSession; | 294 struct UploadSession; |
290 | 295 |
291 // Returns a pointer to the entry that matches |resource_id|, or NULL if | 296 // Returns a pointer to the entry that matches |resource_id|, or NULL if |
292 // not found. | 297 // not found. |
293 EntryInfo* FindEntryByResourceId(const std::string& resource_id); | 298 EntryInfo* FindEntryByResourceId(const std::string& resource_id); |
294 | 299 |
295 // Returns a new resource ID, which looks like "resource_id_<num>" where | 300 // Returns a new resource ID, which looks like "resource_id_<num>" where |
296 // <num> is a monotonically increasing number starting from 1. | 301 // <num> is a monotonically increasing number starting from 1. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 GURL share_url_base_; | 356 GURL share_url_base_; |
352 std::string app_json_template_; | 357 std::string app_json_template_; |
353 std::string open_url_format_; | 358 std::string open_url_format_; |
354 | 359 |
355 DISALLOW_COPY_AND_ASSIGN(FakeDriveService); | 360 DISALLOW_COPY_AND_ASSIGN(FakeDriveService); |
356 }; | 361 }; |
357 | 362 |
358 } // namespace drive | 363 } // namespace drive |
359 | 364 |
360 #endif // CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_ | 365 #endif // CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_ |
OLD | NEW |