OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/browsing_data/mock_browsing_data_flash_lso_helper.h" | |
6 | |
7 #include <algorithm> | |
8 | |
9 #include "testing/gtest/include/gtest/gtest.h" | |
10 | |
11 MockBrowsingDataFlashLSOHelper::MockBrowsingDataFlashLSOHelper( | |
12 content::BrowserContext* browser_context) { | |
13 } | |
14 void MockBrowsingDataFlashLSOHelper::StartFetching( | |
15 const GetSitesWithFlashDataCallback& callback) { | |
16 callback_ = callback; | |
17 } | |
18 | |
19 void MockBrowsingDataFlashLSOHelper::DeleteFlashLSOsForSite( | |
20 const std::string& site) { | |
21 std::vector<std::string>::iterator entry = | |
22 std::find(domains_.begin(), domains_.end(), site); | |
23 ASSERT_TRUE(entry != domains_.end()); | |
24 domains_.erase(entry); | |
25 } | |
26 | |
27 void MockBrowsingDataFlashLSOHelper::AddFlashLSODomain( | |
28 const std::string& domain) { | |
29 domains_.push_back(domain); | |
markusheintz_
2012/07/31 15:09:13
s/domain/site/
| |
30 } | |
31 | |
32 void MockBrowsingDataFlashLSOHelper::Notify() { | |
33 callback_.Run(domains_); | |
34 callback_ = GetSitesWithFlashDataCallback(); | |
35 } | |
36 | |
37 bool MockBrowsingDataFlashLSOHelper::AllDeleted() { | |
38 return domains_.empty(); | |
39 } | |
40 | |
41 MockBrowsingDataFlashLSOHelper::~MockBrowsingDataFlashLSOHelper() { | |
42 } | |
OLD | NEW |