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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
47 // check if the download is ready to complete. | 47 // check if the download is ready to complete. |
48 static bool IsReadyToComplete(content::DownloadItem* download); | 48 static bool IsReadyToComplete(content::DownloadItem* download); |
49 | 49 |
50 // Returns the count of bytes confirmed as uploaded so far for |download|. | 50 // Returns the count of bytes confirmed as uploaded so far for |download|. |
51 static int64 GetUploadedBytes(content::DownloadItem* download); | 51 static int64 GetUploadedBytes(content::DownloadItem* download); |
52 | 52 |
53 // Returns the progress of the upload of |download| as a percentage. If the | 53 // Returns the progress of the upload of |download| as a percentage. If the |
54 // progress is unknown, returns -1. | 54 // progress is unknown, returns -1. |
55 static int PercentComplete(content::DownloadItem* download); | 55 static int PercentComplete(content::DownloadItem* download); |
56 | 56 |
57 static void GetGDataTempDownloadPath(const FilePath& gdata_tmp_download_dir, | |
asanka
2012/03/26 16:50:14
Should mention here that it will create the tempor
achuithb
2012/03/26 19:51:39
Done.
| |
58 FilePath* gdata_tmp_download_path); | |
59 | |
57 private: | 60 private: |
58 // Gets the gdata_path from external data in |download|. | 61 // Gets the gdata_path from external data in |download|. |
59 // GetGDataPath may return an empty path in case SetGDataPath was not | 62 // GetGDataPath may return an empty path in case SetGDataPath was not |
60 // previously called or there was some other internal error | 63 // previously called or there was some other internal error |
61 // (there is a DCHECK for this). | 64 // (there is a DCHECK for this). |
62 static FilePath GetGDataPath(content::DownloadItem* download); | 65 static FilePath GetGDataPath(content::DownloadItem* download); |
63 | 66 |
64 // DownloadManager overrides. | 67 // DownloadManager overrides. |
65 virtual void ManagerGoingDown(content::DownloadManager* manager) OVERRIDE; | 68 virtual void ManagerGoingDown(content::DownloadManager* manager) OVERRIDE; |
66 virtual void ModelChanged(content::DownloadManager* manager) OVERRIDE; | 69 virtual void ModelChanged(content::DownloadManager* manager) OVERRIDE; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
109 | 112 |
110 // Temporary download location directory. | 113 // Temporary download location directory. |
111 FilePath temp_download_path_; | 114 FilePath temp_download_path_; |
112 | 115 |
113 DISALLOW_COPY_AND_ASSIGN(GDataDownloadObserver); | 116 DISALLOW_COPY_AND_ASSIGN(GDataDownloadObserver); |
114 }; | 117 }; |
115 | 118 |
116 } // namespace gdata | 119 } // namespace gdata |
117 | 120 |
118 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOWNLOAD_OBSERVER_H__ | 121 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOWNLOAD_OBSERVER_H__ |
OLD | NEW |