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

Side by Side Diff: chrome/browser/chromeos/drive/drive_integration_service.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 (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 #include "chrome/browser/chromeos/drive/drive_integration_service.h" 5 #include "chrome/browser/chromeos/drive/drive_integration_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 ProfileOAuth2TokenService* oauth_service = 231 ProfileOAuth2TokenService* oauth_service =
232 ProfileOAuth2TokenServiceFactory::GetForProfile(profile); 232 ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
233 233
234 if (test_drive_service) { 234 if (test_drive_service) {
235 drive_service_.reset(test_drive_service); 235 drive_service_.reset(test_drive_service);
236 } else { 236 } else {
237 drive_service_.reset(new DriveAPIService( 237 drive_service_.reset(new DriveAPIService(
238 oauth_service, g_browser_process->system_request_context(), 238 oauth_service, g_browser_process->system_request_context(),
239 blocking_task_runner_.get(), 239 blocking_task_runner_.get(),
240 GURL(google_apis::DriveApiUrlGenerator::kBaseUrlForProduction), 240 GURL(google_apis::DriveApiUrlGenerator::kBaseUrlForProduction),
241 GURL(google_apis::DriveApiUrlGenerator::kBaseDownloadUrlForProduction),
242 GURL(google_apis::DriveApiUrlGenerator::kBaseThumbnailUrlForProduction), 241 GURL(google_apis::DriveApiUrlGenerator::kBaseThumbnailUrlForProduction),
243 GetDriveUserAgent())); 242 GetDriveUserAgent()));
244 } 243 }
245 scheduler_.reset(new JobScheduler( 244 scheduler_.reset(new JobScheduler(
246 profile_->GetPrefs(), 245 profile_->GetPrefs(),
247 logger_.get(), 246 logger_.get(),
248 drive_service_.get(), 247 drive_service_.get(),
249 blocking_task_runner_.get())); 248 blocking_task_runner_.get()));
250 metadata_storage_.reset(new internal::ResourceMetadataStorage( 249 metadata_storage_.reset(new internal::ResourceMetadataStorage(
251 cache_root_directory_.Append(kMetadataDirectory), 250 cache_root_directory_.Append(kMetadataDirectory),
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 profile, preference_watcher, 642 profile, preference_watcher,
644 NULL, std::string(), base::FilePath(), NULL); 643 NULL, std::string(), base::FilePath(), NULL);
645 } else { 644 } else {
646 service = factory_for_test_->Run(profile); 645 service = factory_for_test_->Run(profile);
647 } 646 }
648 647
649 return service; 648 return service;
650 } 649 }
651 650
652 } // namespace drive 651 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698