OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |