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 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...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 OnDownloadDestroyed(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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 DownloadMap pending_downloads_; | 155 DownloadMap pending_downloads_; |
156 | 156 |
157 base::WeakPtrFactory<GDataDownloadObserver> weak_ptr_factory_; | 157 base::WeakPtrFactory<GDataDownloadObserver> weak_ptr_factory_; |
158 | 158 |
159 DISALLOW_COPY_AND_ASSIGN(GDataDownloadObserver); | 159 DISALLOW_COPY_AND_ASSIGN(GDataDownloadObserver); |
160 }; | 160 }; |
161 | 161 |
162 } // namespace gdata | 162 } // namespace gdata |
163 | 163 |
164 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOWNLOAD_OBSERVER_H__ | 164 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOWNLOAD_OBSERVER_H__ |
OLD | NEW |