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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_download_observer.h

Issue 10704026: Reland DownloadItem::Observer::OnDownloadDestroyed() replaces DownloadItem::REMOVING (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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 #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
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
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__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698