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

Side by Side Diff: content/public/test/mock_download_item.cc

Issue 248713004: [Downloads] Add real observers to MockDownloadItem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with r268551 Created 6 years, 7 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
« no previous file with comments | « content/public/test/mock_download_item.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/public/test/mock_download_item.h" 5 #include "content/public/test/mock_download_item.h"
6 6
7 namespace content { 7 namespace content {
8 8
9 MockDownloadItem::MockDownloadItem() {} 9 MockDownloadItem::MockDownloadItem() {}
10 MockDownloadItem::~MockDownloadItem() {} 10
11 MockDownloadItem::~MockDownloadItem() {
12 FOR_EACH_OBSERVER(Observer, observers_, OnDownloadDestroyed(this));
13 }
14
15 void MockDownloadItem::AddObserver(Observer* observer) {
16 observers_.AddObserver(observer);
17 }
18
19 void MockDownloadItem::RemoveObserver(Observer* observer) {
20 observers_.RemoveObserver(observer);
21 }
22
23 void MockDownloadItem::NotifyObserversDownloadOpened() {
24 FOR_EACH_OBSERVER(Observer, observers_, OnDownloadOpened(this));
25 }
26
27 void MockDownloadItem::NotifyObserversDownloadRemoved() {
28 FOR_EACH_OBSERVER(Observer, observers_, OnDownloadRemoved(this));
29 }
30
31 void MockDownloadItem::NotifyObserversDownloadUpdated() {
32 FOR_EACH_OBSERVER(Observer, observers_, OnDownloadUpdated(this));
33 }
11 34
12 } 35 }
OLDNEW
« no previous file with comments | « content/public/test/mock_download_item.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698