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

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

Issue 9844006: GData downloads cleanup (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: asanka review feedback 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( 47 download_observer_->Initialize(uploader_.get(), download_manager,
48 file_system_->GetGDataTempDownloadFolderPath(), 48 file_system_->GetGDataTempDownloadFolderPath());
49 uploader_.get(), download_manager);
50 49
51 sync_client_->Initialize(); 50 sync_client_->Initialize();
52 } 51 }
53 52
54 void GDataSystemService::Shutdown() { 53 void GDataSystemService::Shutdown() {
55 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 54 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
56 55
57 // These should shut down here as they depend on |file_system_|. 56 // These should shut down here as they depend on |file_system_|.
58 sync_client_.reset(); 57 sync_client_.reset();
59 download_observer_.reset(); 58 download_observer_.reset();
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 99 }
101 100
102 ProfileKeyedService* GDataSystemServiceFactory::BuildServiceInstanceFor( 101 ProfileKeyedService* GDataSystemServiceFactory::BuildServiceInstanceFor(
103 Profile* profile) const { 102 Profile* profile) const {
104 GDataSystemService* service = new GDataSystemService(profile); 103 GDataSystemService* service = new GDataSystemService(profile);
105 service->Initialize(); 104 service->Initialize();
106 return service; 105 return service;
107 } 106 }
108 107
109 } // namespace gdata 108 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_files.h ('k') | chrome/browser/chromeos/gdata/gdata_upload_file_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698