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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_system_service.cc

Issue 10198003: gdata: Get rid of GetGDataCacheTmpDirectory() and friends (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 8 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 | Annotate | Revision Log
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/gdata/gdata_system_service.h" 5 #include "chrome/browser/chromeos/gdata/gdata_system_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/download/download_service.h" 10 #include "chrome/browser/download/download_service.h"
(...skipping 26 matching lines...) Expand all
37 37
38 void GDataSystemService::Initialize() { 38 void GDataSystemService::Initialize() {
39 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 39 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
40 40
41 file_system_->Initialize(); 41 file_system_->Initialize();
42 42
43 content::DownloadManager* download_manager = 43 content::DownloadManager* download_manager =
44 g_browser_process->download_status_updater() ? 44 g_browser_process->download_status_updater() ?
45 DownloadServiceFactory::GetForProfile(profile_)->GetDownloadManager() : 45 DownloadServiceFactory::GetForProfile(profile_)->GetDownloadManager() :
46 NULL; 46 NULL;
47 download_observer_->Initialize(uploader_.get(), download_manager, 47 download_observer_->Initialize(
48 file_system_->GetGDataTempDownloadFolderPath()); 48 uploader_.get(),
49 download_manager,
50 file_system_->GetCacheDirectoryPath(
51 GDataRootDirectory::CACHE_TYPE_TMP_DOWNLOADS));
49 52
50 sync_client_->Initialize(); 53 sync_client_->Initialize();
51 } 54 }
52 55
53 void GDataSystemService::Shutdown() { 56 void GDataSystemService::Shutdown() {
54 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 57 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
55 58
56 // These should shut down here as they depend on |file_system_|. 59 // These should shut down here as they depend on |file_system_|.
57 sync_client_.reset(); 60 sync_client_.reset();
58 download_observer_.reset(); 61 download_observer_.reset();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 95 }
93 96
94 ProfileKeyedService* GDataSystemServiceFactory::BuildServiceInstanceFor( 97 ProfileKeyedService* GDataSystemServiceFactory::BuildServiceInstanceFor(
95 Profile* profile) const { 98 Profile* profile) const {
96 GDataSystemService* service = new GDataSystemService(profile); 99 GDataSystemService* service = new GDataSystemService(profile);
97 service->Initialize(); 100 service->Initialize();
98 return service; 101 return service;
99 } 102 }
100 103
101 } // namespace gdata 104 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_sync_client_unittest.cc ('k') | chrome/browser/chromeos/gdata/gdata_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698