12a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved. 22a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 32a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// found in the LICENSE file. 42a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 57d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#ifndef CHROME_BROWSER_DRIVE_DRIVE_API_SERVICE_H_ 67d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#define CHROME_BROWSER_DRIVE_DRIVE_API_SERVICE_H_ 72a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 82a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include <string> 92a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 10eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch#include "base/memory/ref_counted.h" 112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "base/memory/scoped_ptr.h" 122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "base/observer_list.h" 137d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#include "chrome/browser/drive/drive_service_interface.h" 14a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)#include "google_apis/drive/auth_service_interface.h" 15a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)#include "google_apis/drive/auth_service_observer.h" 16a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)#include "google_apis/drive/drive_api_url_generator.h" 17a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)#include "google_apis/drive/gdata_wapi_url_generator.h" 182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class GURL; 20558790d6acca3451cf3a6b497803a5f07d0bec58Ben Murdochclass OAuth2TokenService; 212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)namespace base { 232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class FilePath; 24f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)class SequencedTaskRunner; 25eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch} 26eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch 27eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdochnamespace google_apis { 28eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdochclass RequestSender; 292a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)} 302a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 312a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)namespace net { 322a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class URLRequestContextGetter; 332a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)} // namespace net 342a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 35eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdochnamespace drive { 362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 37868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// This class provides Drive request calls using Drive V2 API. 38868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Details of API call are abstracted in each request class and this class 392a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// works as a thin wrapper for the API. 402a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class DriveAPIService : public DriveServiceInterface, 41eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch public google_apis::AuthServiceObserver { 422a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public: 43558790d6acca3451cf3a6b497803a5f07d0bec58Ben Murdoch // |oauth2_token_service| is used for obtaining OAuth2 access tokens. 442a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // |url_request_context_getter| is used to initialize URLFetcher. 45eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch // |blocking_task_runner| is used to run blocking tasks (like parsing JSON). 462a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // |base_url| is used to generate URLs for communication with the drive API. 47eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch // |base_download_url| is used to generate URLs for downloading file from the 48eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch // drive API. 49a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles) // |wapi_base_url| is used to generate URLs for shared_url. Unfortunately, 50a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles) // the share_url is not yet supported on Drive API v2, so as a fallback, 51a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles) // we use GData WAPI. 522a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // |custom_user_agent| will be used for the User-Agent header in HTTP 532a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // requests issues through the service if the value is not empty. 542a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DriveAPIService( 55558790d6acca3451cf3a6b497803a5f07d0bec58Ben Murdoch OAuth2TokenService* oauth2_token_service, 562a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) net::URLRequestContextGetter* url_request_context_getter, 57f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) base::SequencedTaskRunner* blocking_task_runner, 582a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const GURL& base_url, 59eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch const GURL& base_download_url, 60a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles) const GURL& wapi_base_url, 612a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& custom_user_agent); 622a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual ~DriveAPIService(); 632a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 642a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // DriveServiceInterface Overrides 6568043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles) virtual void Initialize(const std::string& account_id) OVERRIDE; 662a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual void AddObserver(DriveServiceObserver* observer) OVERRIDE; 672a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual void RemoveObserver(DriveServiceObserver* observer) OVERRIDE; 68868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) virtual bool CanSendRequest() const OVERRIDE; 692a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual bool HasAccessToken() const OVERRIDE; 707dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch virtual void RequestAccessToken( 717dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch const google_apis::AuthStatusCallback& callback) OVERRIDE; 722a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual bool HasRefreshToken() const OVERRIDE; 732a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual void ClearAccessToken() OVERRIDE; 742a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual void ClearRefreshToken() OVERRIDE; 752a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual std::string GetRootResourceId() const OVERRIDE; 7646d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles) virtual google_apis::CancelCallback GetAllFileList( 7746d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles) const google_apis::FileListCallback& callback) OVERRIDE; 7846d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles) virtual google_apis::CancelCallback GetFileListInDirectory( 79c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) const std::string& directory_resource_id, 8046d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles) const google_apis::FileListCallback& callback) OVERRIDE; 81eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch virtual google_apis::CancelCallback Search( 822a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& search_query, 8346d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles) const google_apis::FileListCallback& callback) OVERRIDE; 84eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch virtual google_apis::CancelCallback SearchByTitle( 85c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) const std::string& title, 862a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& directory_resource_id, 8746d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles) const google_apis::FileListCallback& callback) OVERRIDE; 88eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch virtual google_apis::CancelCallback GetChangeList( 89c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) int64 start_changestamp, 90cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) const google_apis::ChangeListCallback& callback) OVERRIDE; 91424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles) virtual google_apis::CancelCallback GetRemainingChangeList( 9258537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) const GURL& next_link, 93cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) const google_apis::ChangeListCallback& callback) OVERRIDE; 94424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles) virtual google_apis::CancelCallback GetRemainingFileList( 9558537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) const GURL& next_link, 9646d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles) const google_apis::FileListCallback& callback) OVERRIDE; 9746d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles) virtual google_apis::CancelCallback GetFileResource( 982a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& resource_id, 9946d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles) const google_apis::FileResourceCallback& callback) OVERRIDE; 100bbcdd45c55eb7c4641ab97aef9889b0fc828e7d3Ben Murdoch virtual google_apis::CancelCallback GetShareUrl( 101bbcdd45c55eb7c4641ab97aef9889b0fc828e7d3Ben Murdoch const std::string& resource_id, 102bbcdd45c55eb7c4641ab97aef9889b0fc828e7d3Ben Murdoch const GURL& embed_origin, 103bbcdd45c55eb7c4641ab97aef9889b0fc828e7d3Ben Murdoch const google_apis::GetShareUrlCallback& callback) OVERRIDE; 104eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch virtual google_apis::CancelCallback GetAboutResource( 105424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles) const google_apis::AboutResourceCallback& callback) OVERRIDE; 106eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch virtual google_apis::CancelCallback GetAppList( 107424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles) const google_apis::AppListCallback& callback) OVERRIDE; 108eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch virtual google_apis::CancelCallback DeleteResource( 1092a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& resource_id, 1102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& etag, 111eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch const google_apis::EntryActionCallback& callback) OVERRIDE; 1125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual google_apis::CancelCallback TrashResource( 1135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const std::string& resource_id, 1145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const google_apis::EntryActionCallback& callback) OVERRIDE; 115eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch virtual google_apis::CancelCallback DownloadFile( 1162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const base::FilePath& local_cache_path, 117eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch const std::string& resource_id, 118eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch const google_apis::DownloadActionCallback& download_action_callback, 119eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch const google_apis::GetContentCallback& get_content_callback, 120eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch const google_apis::ProgressCallback& progress_callback) OVERRIDE; 121eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch virtual google_apis::CancelCallback CopyResource( 12290dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) const std::string& resource_id, 12390dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) const std::string& parent_resource_id, 1247dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch const std::string& new_title, 12568043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles) const base::Time& last_modified, 12646d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles) const google_apis::FileResourceCallback& callback) OVERRIDE; 127f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) virtual google_apis::CancelCallback UpdateResource( 1283551c9c881056c480085172ff9840cab31610854Torne (Richard Coles) const std::string& resource_id, 1293551c9c881056c480085172ff9840cab31610854Torne (Richard Coles) const std::string& parent_resource_id, 1303551c9c881056c480085172ff9840cab31610854Torne (Richard Coles) const std::string& new_title, 13168043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles) const base::Time& last_modified, 132f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) const base::Time& last_viewed_by_me, 13346d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles) const google_apis::FileResourceCallback& callback) OVERRIDE; 134eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch virtual google_apis::CancelCallback AddResourceToDirectory( 1352a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& parent_resource_id, 1362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& resource_id, 137eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch const google_apis::EntryActionCallback& callback) OVERRIDE; 138eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch virtual google_apis::CancelCallback RemoveResourceFromDirectory( 1392a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& parent_resource_id, 1402a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& resource_id, 141eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch const google_apis::EntryActionCallback& callback) OVERRIDE; 142eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch virtual google_apis::CancelCallback AddNewDirectory( 1432a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& parent_resource_id, 1447dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch const std::string& directory_title, 1455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const AddNewDirectoryOptions& options, 14646d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles) const google_apis::FileResourceCallback& callback) OVERRIDE; 147eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch virtual google_apis::CancelCallback InitiateUploadNewFile( 1482a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& content_type, 1492a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) int64 content_length, 1502a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& parent_resource_id, 1512a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& title, 1525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const InitiateUploadNewFileOptions& options, 153eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch const google_apis::InitiateUploadCallback& callback) OVERRIDE; 154eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch virtual google_apis::CancelCallback InitiateUploadExistingFile( 1552a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& content_type, 1562a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) int64 content_length, 1572a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& resource_id, 1585d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const InitiateUploadExistingFileOptions& options, 159eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch const google_apis::InitiateUploadCallback& callback) OVERRIDE; 160eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch virtual google_apis::CancelCallback ResumeUpload( 1612a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const GURL& upload_url, 1622a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) int64 start_position, 1632a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) int64 end_position, 1642a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) int64 content_length, 1652a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& content_type, 166a93a17c8d99d686bd4a1511e5504e5e6cc9fcadfTorne (Richard Coles) const base::FilePath& local_file_path, 16746d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles) const google_apis::drive::UploadRangeCallback& callback, 168eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch const google_apis::ProgressCallback& progress_callback) OVERRIDE; 169eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch virtual google_apis::CancelCallback GetUploadStatus( 1702a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const GURL& upload_url, 1712a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) int64 content_length, 17246d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles) const google_apis::drive::UploadRangeCallback& callback) OVERRIDE; 173eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch virtual google_apis::CancelCallback AuthorizeApp( 1742a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& resource_id, 1752a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& app_id, 176eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch const google_apis::AuthorizeAppCallback& callback) OVERRIDE; 1775d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual google_apis::CancelCallback UninstallApp( 1785d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const std::string& app_id, 1795d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const google_apis::EntryActionCallback& callback) OVERRIDE; 180a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) virtual google_apis::CancelCallback AddPermission( 181a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) const std::string& resource_id, 182a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) const std::string& email, 183a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) google_apis::drive::PermissionRole role, 184a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) const google_apis::EntryActionCallback& callback) OVERRIDE; 1852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 1862a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) private: 1872a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // AuthServiceObserver override. 1882a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual void OnOAuth2RefreshTokenChanged() OVERRIDE; 1892a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 190558790d6acca3451cf3a6b497803a5f07d0bec58Ben Murdoch OAuth2TokenService* oauth2_token_service_; 1914e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles) scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; 192f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 193eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch scoped_ptr<google_apis::RequestSender> sender_; 1942a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) ObserverList<DriveServiceObserver> observers_; 195eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch google_apis::DriveApiUrlGenerator url_generator_; 196a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles) google_apis::GDataWapiUrlGenerator wapi_url_generator_; 1972a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string custom_user_agent_; 1982a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 1992a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(DriveAPIService); 2002a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}; 2012a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 202eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch} // namespace drive 2032a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 2047d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#endif // CHROME_BROWSER_DRIVE_DRIVE_API_SERVICE_H_ 205