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 #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() {} | |
11 | 10 |
11 MockDownloadItem::~MockDownloadItem() { | |
12 FOR_EACH_OBSERVER(Observer, observers_, OnDownloadDestroyed(this)); | |
12 } | 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::UpdateObservers() { | |
24 FOR_EACH_OBSERVER(Observer, observers_, OnDownloadUpdated(this)); | |
25 } | |
26 | |
27 void MockDownloadItem::UpdateObserversOnOpened() { | |
28 FOR_EACH_OBSERVER(Observer, observers_, OnDownloadOpened(this)); | |
29 } | |
30 | |
31 void MockDownloadItem::UpdateObserversOnRemoved() { | |
32 FOR_EACH_OBSERVER(Observer, observers_, OnDownloadRemoved(this)); | |
33 } | |
34 } | |
Randy Smith (Not in Mondays)
2014/04/23 19:28:35
nit: The file originally had vertical whitespace b
asanka
2014/04/25 21:31:27
Added it back. It was 'git cl format' that removed
| |
OLD | NEW |