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

Side by Side Diff: chrome/browser/chromeos/drive/drive_system_service.cc

Issue 11804004: Add base_url to DriveApiUrlGenerator. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Introduce kBaseUrlForProduction in DriveApiUrlGenerator Created 7 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
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_system_service.h" 5 #include "chrome/browser/chromeos/drive/drive_system_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chromeos/drive/drive_api_service.h" 10 #include "chrome/browser/chromeos/drive/drive_api_service.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 base::SequencedWorkerPool* blocking_pool = BrowserThread::GetBlockingPool(); 117 base::SequencedWorkerPool* blocking_pool = BrowserThread::GetBlockingPool();
118 blocking_task_runner_ = blocking_pool->GetSequencedTaskRunner( 118 blocking_task_runner_ = blocking_pool->GetSequencedTaskRunner(
119 blocking_pool->GetSequenceToken()); 119 blocking_pool->GetSequenceToken());
120 120
121 event_logger_.reset(new EventLogger(kEventLogHistorySize)); 121 event_logger_.reset(new EventLogger(kEventLogHistorySize));
122 if (test_drive_service) { 122 if (test_drive_service) {
123 drive_service_.reset(test_drive_service); 123 drive_service_.reset(test_drive_service);
124 } else if (google_apis::util::IsDriveV2ApiEnabled()) { 124 } else if (google_apis::util::IsDriveV2ApiEnabled()) {
125 drive_service_.reset(new DriveAPIService( 125 drive_service_.reset(new DriveAPIService(
126 g_browser_process->system_request_context(), 126 g_browser_process->system_request_context(),
127 GURL(google_apis::DriveApiUrlGenerator::kBaseUrlForProduction),
127 GetDriveUserAgent())); 128 GetDriveUserAgent()));
128 } else { 129 } else {
129 drive_service_.reset(new google_apis::GDataWapiService( 130 drive_service_.reset(new google_apis::GDataWapiService(
130 g_browser_process->system_request_context(), 131 g_browser_process->system_request_context(),
131 GURL(google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction), 132 GURL(google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction),
132 GetDriveUserAgent())); 133 GetDriveUserAgent()));
133 } 134 }
134 cache_.reset(new DriveCache(!test_cache_root.empty() ? test_cache_root : 135 cache_.reset(new DriveCache(!test_cache_root.empty() ? test_cache_root :
135 DriveCache::GetCacheRootPath(profile), 136 DriveCache::GetCacheRootPath(profile),
136 blocking_task_runner_, 137 blocking_task_runner_,
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 if (factory_for_test_.is_null()) 410 if (factory_for_test_.is_null())
410 service = new DriveSystemService(profile, NULL, FilePath(), NULL); 411 service = new DriveSystemService(profile, NULL, FilePath(), NULL);
411 else 412 else
412 service = factory_for_test_.Run(profile); 413 service = factory_for_test_.Run(profile);
413 414
414 service->Initialize(); 415 service->Initialize();
415 return service; 416 return service;
416 } 417 }
417 418
418 } // namespace drive 419 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/drive_api_service.cc ('k') | chrome/browser/google_apis/drive_api_url_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698