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 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOWNLOAD_OBSERVER_H__ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOWNLOAD_OBSERVER_H__ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOWNLOAD_OBSERVER_H__ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOWNLOAD_OBSERVER_H__ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 static void GetGDataTempDownloadPath(const FilePath& gdata_tmp_download_dir, | 82 static void GetGDataTempDownloadPath(const FilePath& gdata_tmp_download_dir, |
83 FilePath* gdata_tmp_download_path); | 83 FilePath* gdata_tmp_download_path); |
84 | 84 |
85 private: | 85 private: |
86 // DownloadManager overrides. | 86 // DownloadManager overrides. |
87 virtual void ManagerGoingDown(content::DownloadManager* manager) OVERRIDE; | 87 virtual void ManagerGoingDown(content::DownloadManager* manager) OVERRIDE; |
88 virtual void ModelChanged(content::DownloadManager* manager) OVERRIDE; | 88 virtual void ModelChanged(content::DownloadManager* manager) OVERRIDE; |
89 | 89 |
90 // DownloadItem overrides. | 90 // DownloadItem overrides. |
91 virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; | 91 virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; |
92 virtual void OnDownloadOpened(content::DownloadItem* download) OVERRIDE {} | 92 virtual void OnDownloadDestructed(content::DownloadItem* download) OVERRIDE; |
93 | 93 |
94 // Adds/Removes |download| to pending_downloads_. | 94 // Adds/Removes |download| to pending_downloads_. |
95 // Also start/stop observing |download|. | 95 // Also start/stop observing |download|. |
96 void AddPendingDownload(content::DownloadItem* download); | 96 void AddPendingDownload(content::DownloadItem* download); |
97 void RemovePendingDownload(content::DownloadItem* download); | 97 void RemovePendingDownload(content::DownloadItem* download); |
98 | 98 |
99 // Remove our external data and remove our observers from |download| | 99 // Remove our external data and remove our observers from |download| |
100 void DetachFromDownload(content::DownloadItem* download); | 100 void DetachFromDownload(content::DownloadItem* download); |
101 | 101 |
102 // Starts the upload of a downloaded/downloading file. | 102 // Starts the upload of a downloaded/downloading file. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 DownloadMap pending_downloads_; | 134 DownloadMap pending_downloads_; |
135 | 135 |
136 base::WeakPtrFactory<GDataDownloadObserver> weak_ptr_factory_; | 136 base::WeakPtrFactory<GDataDownloadObserver> weak_ptr_factory_; |
137 | 137 |
138 DISALLOW_COPY_AND_ASSIGN(GDataDownloadObserver); | 138 DISALLOW_COPY_AND_ASSIGN(GDataDownloadObserver); |
139 }; | 139 }; |
140 | 140 |
141 } // namespace gdata | 141 } // namespace gdata |
142 | 142 |
143 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOWNLOAD_OBSERVER_H__ | 143 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOWNLOAD_OBSERVER_H__ |
OLD | NEW |