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

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

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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_DRIVE_SERVICE_INTERFACE_H_ 5 #ifndef CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_
6 #define CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ 6 #define CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "google_apis/drive/auth_service_interface.h" 11 #include "google_apis/drive/auth_service_interface.h"
12 #include "google_apis/drive/base_requests.h" 12 #include "google_apis/drive/base_requests.h"
13 #include "google_apis/drive/drive_api_requests.h" 13 #include "google_apis/drive/drive_api_requests.h"
14 #include "google_apis/drive/drive_common_callbacks.h" 14 #include "google_apis/drive/drive_common_callbacks.h"
15 15
16 namespace base { 16 namespace base {
17 class Time; 17 class Time;
18 } 18 }
19 19
20 namespace user_manager {
21 class UserID;
22 }
23
20 namespace drive { 24 namespace drive {
21 25
22 // Observer interface for DriveServiceInterface. 26 // Observer interface for DriveServiceInterface.
23 class DriveServiceObserver { 27 class DriveServiceObserver {
24 public: 28 public:
25 // Triggered when the service gets ready to send requests. 29 // Triggered when the service gets ready to send requests.
26 virtual void OnReadyToSendRequests() {} 30 virtual void OnReadyToSendRequests() {}
27 31
28 // Called when the refresh token was found to be invalid. 32 // Called when the refresh token was found to be invalid.
29 virtual void OnRefreshTokenInvalid() {} 33 virtual void OnRefreshTokenInvalid() {}
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 451
448 // Uninstalls a Drive app with the id |app_id|. |callback| must not be null. 452 // Uninstalls a Drive app with the id |app_id|. |callback| must not be null.
449 virtual google_apis::CancelCallback UninstallApp( 453 virtual google_apis::CancelCallback UninstallApp(
450 const std::string& app_id, 454 const std::string& app_id,
451 const google_apis::EntryActionCallback& callback) = 0; 455 const google_apis::EntryActionCallback& callback) = 0;
452 456
453 // Authorizes the account |email| to access |resource_id| as a |role|. 457 // Authorizes the account |email| to access |resource_id| as a |role|.
454 // |callback| must not be null. 458 // |callback| must not be null.
455 virtual google_apis::CancelCallback AddPermission( 459 virtual google_apis::CancelCallback AddPermission(
456 const std::string& resource_id, 460 const std::string& resource_id,
457 const std::string& email, 461 const user_manager::UserID& user_id,
458 google_apis::drive::PermissionRole role, 462 google_apis::drive::PermissionRole role,
459 const google_apis::EntryActionCallback& callback) = 0; 463 const google_apis::EntryActionCallback& callback) = 0;
460 464
461 // Starts batch request and returns |BatchRequestConfigurator|. 465 // Starts batch request and returns |BatchRequestConfigurator|.
462 virtual scoped_ptr<BatchRequestConfiguratorInterface> StartBatchRequest() = 0; 466 virtual scoped_ptr<BatchRequestConfiguratorInterface> StartBatchRequest() = 0;
463 }; 467 };
464 468
465 } // namespace drive 469 } // namespace drive
466 470
467 #endif // CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ 471 #endif // CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698