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

Side by Side Diff: chrome/browser/drive/fake_drive_service.h

Issue 881403003: Rename gdata_errorcode.h to drive_api_error_codes.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typos in BUILD.gn 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 (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 "base/threading/thread_checker.h" 9 #include "base/threading/thread_checker.h"
10 #include "chrome/browser/drive/drive_service_interface.h" 10 #include "chrome/browser/drive/drive_service_interface.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 const std::string& product_id, 47 const std::string& product_id,
48 const std::string& create_url, 48 const std::string& create_url,
49 bool is_removable); 49 bool is_removable);
50 50
51 // Removes an app by product id. 51 // Removes an app by product id.
52 void RemoveAppByProductId(const std::string& product_id); 52 void RemoveAppByProductId(const std::string& product_id);
53 53
54 // Returns true if the service knows the given drive app id. 54 // Returns true if the service knows the given drive app id.
55 bool HasApp(const std::string& app_id) const; 55 bool HasApp(const std::string& app_id) const;
56 56
57 // Changes the offline state. All functions fail with GDATA_NO_CONNECTION 57 // Changes the offline state. All functions fail with DRIVE_NO_CONNECTION
58 // when offline. By default the offline state is false. 58 // when offline. By default the offline state is false.
59 void set_offline(bool offline) { offline_ = offline; } 59 void set_offline(bool offline) { offline_ = offline; }
60 60
61 // GetAllFileList never returns result when this is set to true. 61 // GetAllFileList never returns result when this is set to true.
62 // Used to emulate the real server's slowness. 62 // Used to emulate the real server's slowness.
63 void set_never_return_all_file_list(bool value) { 63 void set_never_return_all_file_list(bool value) {
64 never_return_all_file_list_ = value; 64 never_return_all_file_list_ = value;
65 } 65 }
66 66
67 // Changes the default max results returned from GetAllFileList(). 67 // Changes the default max results returned from GetAllFileList().
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 303
304 // Sets the last modified time for an entry specified by |resource_id|. 304 // Sets the last modified time for an entry specified by |resource_id|.
305 // On success, returns HTTP_SUCCESS with the parsed entry. 305 // On success, returns HTTP_SUCCESS with the parsed entry.
306 // |callback| must not be null. 306 // |callback| must not be null.
307 void SetLastModifiedTime( 307 void SetLastModifiedTime(
308 const std::string& resource_id, 308 const std::string& resource_id,
309 const base::Time& last_modified_time, 309 const base::Time& last_modified_time,
310 const google_apis::FileResourceCallback& callback); 310 const google_apis::FileResourceCallback& callback);
311 311
312 // Sets the user's permission for an entry specified by |resource_id|. 312 // Sets the user's permission for an entry specified by |resource_id|.
313 google_apis::GDataErrorCode SetUserPermission( 313 google_apis::DriveApiErrorCode SetUserPermission(
314 const std::string& resource_id, 314 const std::string& resource_id,
315 google_apis::drive::PermissionRole user_permission); 315 google_apis::drive::PermissionRole user_permission);
316 316
317 void AddChangeObserver(ChangeObserver* observer); 317 void AddChangeObserver(ChangeObserver* observer);
318 void RemoveChangeObserver(ChangeObserver* observer); 318 void RemoveChangeObserver(ChangeObserver* observer);
319 319
320 private: 320 private:
321 struct EntryInfo; 321 struct EntryInfo;
322 struct UploadSession; 322 struct UploadSession;
323 323
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 ObserverList<ChangeObserver> change_observers_; 393 ObserverList<ChangeObserver> change_observers_;
394 394
395 base::WeakPtrFactory<FakeDriveService> weak_ptr_factory_; 395 base::WeakPtrFactory<FakeDriveService> weak_ptr_factory_;
396 396
397 DISALLOW_COPY_AND_ASSIGN(FakeDriveService); 397 DISALLOW_COPY_AND_ASSIGN(FakeDriveService);
398 }; 398 };
399 399
400 } // namespace drive 400 } // namespace drive
401 401
402 #endif // CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_ 402 #endif // CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698