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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/sync_engine.cc

Issue 1965963003: Use new API to download blobs from Google Drive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "chrome/browser/sync_file_system/drive_backend/sync_engine.h" 5 #include "chrome/browser/sync_file_system/drive_backend/sync_engine.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 std::unique_ptr<drive::DriveServiceInterface> 69 std::unique_ptr<drive::DriveServiceInterface>
70 SyncEngine::DriveServiceFactory::CreateDriveService( 70 SyncEngine::DriveServiceFactory::CreateDriveService(
71 OAuth2TokenService* oauth2_token_service, 71 OAuth2TokenService* oauth2_token_service,
72 net::URLRequestContextGetter* url_request_context_getter, 72 net::URLRequestContextGetter* url_request_context_getter,
73 base::SequencedTaskRunner* blocking_task_runner) { 73 base::SequencedTaskRunner* blocking_task_runner) {
74 return std::unique_ptr< 74 return std::unique_ptr<
75 drive::DriveServiceInterface>(new drive::DriveAPIService( 75 drive::DriveServiceInterface>(new drive::DriveAPIService(
76 oauth2_token_service, url_request_context_getter, blocking_task_runner, 76 oauth2_token_service, url_request_context_getter, blocking_task_runner,
77 GURL(google_apis::DriveApiUrlGenerator::kBaseUrlForProduction), 77 GURL(google_apis::DriveApiUrlGenerator::kBaseUrlForProduction),
78 GURL(google_apis::DriveApiUrlGenerator::kBaseDownloadUrlForProduction),
79 GURL(google_apis::DriveApiUrlGenerator::kBaseThumbnailUrlForProduction), 78 GURL(google_apis::DriveApiUrlGenerator::kBaseThumbnailUrlForProduction),
80 std::string() /* custom_user_agent */)); 79 std::string() /* custom_user_agent */));
81 } 80 }
82 81
83 class SyncEngine::WorkerObserver : public SyncWorkerInterface::Observer { 82 class SyncEngine::WorkerObserver : public SyncWorkerInterface::Observer {
84 public: 83 public:
85 WorkerObserver(base::SequencedTaskRunner* ui_task_runner, 84 WorkerObserver(base::SequencedTaskRunner* ui_task_runner,
86 base::WeakPtr<SyncEngine> sync_engine) 85 base::WeakPtr<SyncEngine> sync_engine)
87 : ui_task_runner_(ui_task_runner), 86 : ui_task_runner_(ui_task_runner),
88 sync_engine_(sync_engine) { 87 sync_engine_(sync_engine) {
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 776
778 SyncStatusCallback SyncEngine::TrackCallback( 777 SyncStatusCallback SyncEngine::TrackCallback(
779 const SyncStatusCallback& callback) { 778 const SyncStatusCallback& callback) {
780 return callback_tracker_.Register( 779 return callback_tracker_.Register(
781 base::Bind(callback, SYNC_STATUS_ABORT), 780 base::Bind(callback, SYNC_STATUS_ABORT),
782 callback); 781 callback);
783 } 782 }
784 783
785 } // namespace drive_backend 784 } // namespace drive_backend
786 } // namespace sync_file_system 785 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc ('k') | components/drive/service/drive_api_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698