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

Side by Side Diff: chrome/browser/apps/drive/drive_service_bridge.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
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_integration_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/apps/drive/drive_service_bridge.h" 5 #include "chrome/browser/apps/drive/drive_service_bridge.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 worker_pool->GetSequenceToken(), 77 worker_pool->GetSequenceToken(),
78 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); 78 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
79 79
80 ProfileOAuth2TokenService* token_service = 80 ProfileOAuth2TokenService* token_service =
81 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_); 81 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_);
82 drive_service_.reset(new drive::DriveAPIService( 82 drive_service_.reset(new drive::DriveAPIService(
83 token_service, 83 token_service,
84 profile_->GetRequestContext(), 84 profile_->GetRequestContext(),
85 drive_task_runner.get(), 85 drive_task_runner.get(),
86 GURL(google_apis::DriveApiUrlGenerator::kBaseUrlForProduction), 86 GURL(google_apis::DriveApiUrlGenerator::kBaseUrlForProduction),
87 GURL(google_apis::DriveApiUrlGenerator::kBaseDownloadUrlForProduction),
88 GURL(google_apis::DriveApiUrlGenerator::kBaseThumbnailUrlForProduction), 87 GURL(google_apis::DriveApiUrlGenerator::kBaseThumbnailUrlForProduction),
89 std::string() /* custom_user_agent */)); 88 std::string() /* custom_user_agent */));
90 SigninManagerBase* signin_manager = 89 SigninManagerBase* signin_manager =
91 SigninManagerFactory::GetForProfile(profile_); 90 SigninManagerFactory::GetForProfile(profile_);
92 drive_service_->Initialize(signin_manager->GetAuthenticatedAccountId()); 91 drive_service_->Initialize(signin_manager->GetAuthenticatedAccountId());
93 drive_service_->AddObserver(this); 92 drive_service_->AddObserver(this);
94 93
95 drive::DriveNotificationManager* drive_notification_manager = 94 drive::DriveNotificationManager* drive_notification_manager =
96 drive::DriveNotificationManagerFactory::GetForBrowserContext(profile_); 95 drive::DriveNotificationManagerFactory::GetForBrowserContext(profile_);
97 if (drive_notification_manager) 96 if (drive_notification_manager)
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 } 131 }
133 132
134 // static 133 // static
135 void DriveServiceBridge::AppendDependsOnFactories( 134 void DriveServiceBridge::AppendDependsOnFactories(
136 std::set<BrowserContextKeyedServiceFactory*>* factories) { 135 std::set<BrowserContextKeyedServiceFactory*>* factories) {
137 DCHECK(factories); 136 DCHECK(factories);
138 factories->insert(ProfileOAuth2TokenServiceFactory::GetInstance()); 137 factories->insert(ProfileOAuth2TokenServiceFactory::GetInstance());
139 factories->insert(SigninManagerFactory::GetInstance()); 138 factories->insert(SigninManagerFactory::GetInstance());
140 factories->insert(drive::DriveNotificationManagerFactory::GetInstance()); 139 factories->insert(drive::DriveNotificationManagerFactory::GetInstance());
141 } 140 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_integration_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698