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

Side by Side Diff: chrome/browser/apps/drive/drive_service_bridge.cc

Issue 861133002: Remove WAPI-related code, except the type definition of ResourceEntry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to review comments. Created 5 years, 11 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/change_list_loader.h » ('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 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/drive/drive_api_service.h" 10 #include "chrome/browser/drive/drive_api_service.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); 76 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
77 77
78 ProfileOAuth2TokenService* token_service = 78 ProfileOAuth2TokenService* token_service =
79 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_); 79 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_);
80 drive_service_.reset(new drive::DriveAPIService( 80 drive_service_.reset(new drive::DriveAPIService(
81 token_service, 81 token_service,
82 profile_->GetRequestContext(), 82 profile_->GetRequestContext(),
83 drive_task_runner.get(), 83 drive_task_runner.get(),
84 GURL(google_apis::DriveApiUrlGenerator::kBaseUrlForProduction), 84 GURL(google_apis::DriveApiUrlGenerator::kBaseUrlForProduction),
85 GURL(google_apis::DriveApiUrlGenerator::kBaseDownloadUrlForProduction), 85 GURL(google_apis::DriveApiUrlGenerator::kBaseDownloadUrlForProduction),
86 GURL(google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction),
87 std::string() /* custom_user_agent */)); 86 std::string() /* custom_user_agent */));
88 SigninManagerBase* signin_manager = 87 SigninManagerBase* signin_manager =
89 SigninManagerFactory::GetForProfile(profile_); 88 SigninManagerFactory::GetForProfile(profile_);
90 drive_service_->Initialize(signin_manager->GetAuthenticatedAccountId()); 89 drive_service_->Initialize(signin_manager->GetAuthenticatedAccountId());
91 drive_service_->AddObserver(this); 90 drive_service_->AddObserver(this);
92 91
93 drive::DriveNotificationManager* drive_notification_manager = 92 drive::DriveNotificationManager* drive_notification_manager =
94 drive::DriveNotificationManagerFactory::GetForBrowserContext(profile_); 93 drive::DriveNotificationManagerFactory::GetForBrowserContext(profile_);
95 if (drive_notification_manager) 94 if (drive_notification_manager)
96 drive_notification_manager->AddObserver(this); 95 drive_notification_manager->AddObserver(this);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } 128 }
130 129
131 // static 130 // static
132 void DriveServiceBridge::AppendDependsOnFactories( 131 void DriveServiceBridge::AppendDependsOnFactories(
133 std::set<BrowserContextKeyedServiceFactory*>* factories) { 132 std::set<BrowserContextKeyedServiceFactory*>* factories) {
134 DCHECK(factories); 133 DCHECK(factories);
135 factories->insert(ProfileOAuth2TokenServiceFactory::GetInstance()); 134 factories->insert(ProfileOAuth2TokenServiceFactory::GetInstance());
136 factories->insert(SigninManagerFactory::GetInstance()); 135 factories->insert(SigninManagerFactory::GetInstance());
137 factories->insert(drive::DriveNotificationManagerFactory::GetInstance()); 136 factories->insert(drive::DriveNotificationManagerFactory::GetInstance());
138 } 137 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/change_list_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698