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

Side by Side Diff: chrome/browser/browsing_data/mock_browsing_data_channel_id_helper.h

Issue 356713005: Rename ServerBoundCert => ChannelID to reflect the current name (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix cookies_list.js Created 6 years, 4 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
(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 #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_
7
8 #include <map>
9 #include <string>
10
11 #include "chrome/browser/browsing_data/browsing_data_channel_id_helper.h"
12
13 // Mock for BrowsingDataChannelIDHelper.
14 class MockBrowsingDataChannelIDHelper
15 : public BrowsingDataChannelIDHelper {
16 public:
17 explicit MockBrowsingDataChannelIDHelper();
18
19 // BrowsingDataChannelIDHelper methods.
20 virtual void StartFetching(const FetchResultCallback& callback) OVERRIDE;
21 virtual void DeleteChannelID(const std::string& server_id) OVERRIDE;
22
23 // Adds a channel_id sample.
24 void AddChannelIDSample(const std::string& server_id);
25
26 // Notifies the callback.
27 void Notify();
28
29 // Marks all channel_ids as existing.
30 void Reset();
31
32 // Returns true if all channel_ids since the last Reset() invocation
33 // were deleted.
34 bool AllDeleted();
35
36 private:
37 virtual ~MockBrowsingDataChannelIDHelper();
38
39 FetchResultCallback callback_;
40
41 net::ChannelIDStore::ChannelIDList channel_id_list_;
42
43 // Stores which channel_ids exist.
44 std::map<const std::string, bool> channel_ids_;
45 };
46
47 #endif // CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_CHANNEL_ID_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698