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

Side by Side Diff: content/public/test/download_test_observer.h

Issue 10915180: Make DownloadHistory observe manager, items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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 CONTENT_TEST_DOWNLOAD_TEST_OBSERVER_H_ 5 #ifndef CONTENT_TEST_DOWNLOAD_TEST_OBSERVER_H_
6 #define CONTENT_TEST_DOWNLOAD_TEST_OBSERVER_H_ 6 #define CONTENT_TEST_DOWNLOAD_TEST_OBSERVER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 void WaitForFinished(); 82 void WaitForFinished();
83 83
84 // Return true if everything's happened that we're configured for. 84 // Return true if everything's happened that we're configured for.
85 bool IsFinished() const; 85 bool IsFinished() const;
86 86
87 // DownloadItem::Observer 87 // DownloadItem::Observer
88 virtual void OnDownloadUpdated(DownloadItem* download) OVERRIDE; 88 virtual void OnDownloadUpdated(DownloadItem* download) OVERRIDE;
89 virtual void OnDownloadDestroyed(DownloadItem* download) OVERRIDE; 89 virtual void OnDownloadDestroyed(DownloadItem* download) OVERRIDE;
90 90
91 // DownloadManager::Observer 91 // DownloadManager::Observer
92 virtual void ModelChanged(DownloadManager* manager) OVERRIDE; 92 virtual void OnDownloadCreated(
93 DownloadManager* manager, DownloadItem* download) OVERRIDE;
93 94
94 size_t NumDangerousDownloadsSeen() const; 95 size_t NumDangerousDownloadsSeen() const;
95 96
96 size_t NumDownloadsSeenInState(DownloadItem::DownloadState state) const; 97 size_t NumDownloadsSeenInState(DownloadItem::DownloadState state) const;
97 98
98 protected: 99 protected:
99 // Only to be called by derived classes' constructors. 100 // Only to be called by derived classes' constructors.
100 virtual void Init(); 101 virtual void Init();
101 102
102 // Called to see if a download item is in a final state. 103 // Called to see if a download item is in a final state.
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 286
286 // We are in the message loop. 287 // We are in the message loop.
287 bool waiting_; 288 bool waiting_;
288 289
289 DISALLOW_COPY_AND_ASSIGN(DownloadTestItemCreationObserver); 290 DISALLOW_COPY_AND_ASSIGN(DownloadTestItemCreationObserver);
290 }; 291 };
291 292
292 } // namespace content` 293 } // namespace content`
293 294
294 #endif // CONTENT_TEST_DOWNLOAD_TEST_OBSERVER_H_ 295 #endif // CONTENT_TEST_DOWNLOAD_TEST_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698