1 // Copyright 2014 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.
5 #ifndef CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_CHANNEL_ID_HELPER_H_
6 #define CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_CHANNEL_ID_HELPER_H_
11 #include "chrome/browser/browsing_data/browsing_data_channel_id_helper.h"
13 // Mock for BrowsingDataChannelIDHelper.
14 class MockBrowsingDataChannelIDHelper
15 : public BrowsingDataChannelIDHelper
{
17 MockBrowsingDataChannelIDHelper();
19 // BrowsingDataChannelIDHelper methods.
20 void StartFetching(const FetchResultCallback
& callback
) override
;
21 void DeleteChannelID(const std::string
& server_id
) override
;
23 // Adds a channel_id sample.
24 void AddChannelIDSample(const std::string
& server_id
);
26 // Notifies the callback.
29 // Marks all channel_ids as existing.
32 // Returns true if all channel_ids since the last Reset() invocation
37 ~MockBrowsingDataChannelIDHelper() override
;
39 FetchResultCallback callback_
;
41 net::ChannelIDStore::ChannelIDList channel_id_list_
;
43 // Stores which channel_ids exist.
44 std::map
<const std::string
, bool> channel_ids_
;
46 DISALLOW_COPY_AND_ASSIGN(MockBrowsingDataChannelIDHelper
);
49 #endif // CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_CHANNEL_ID_HELPER_H_