Update broken references to image assets
[chromium-blink-merge.git] / chrome / browser / browsing_data / mock_browsing_data_cookie_helper.h
blob21031a32e019d17f5c334dfaa91210d905b18b48
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.
5 #ifndef CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_COOKIE_HELPER_H_
6 #define CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_COOKIE_HELPER_H_
8 #include <map>
9 #include <string>
11 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h"
12 #include "net/cookies/canonical_cookie.h"
14 // Mock for BrowsingDataCookieHelper.
15 class MockBrowsingDataCookieHelper : public BrowsingDataCookieHelper {
16 public:
17 explicit MockBrowsingDataCookieHelper(
18 net::URLRequestContextGetter* request_context_getter);
20 // BrowsingDataCookieHelper methods.
21 void StartFetching(
22 const net::CookieMonster::GetCookieListCallback& callback) override;
23 void DeleteCookie(const net::CanonicalCookie& cookie) override;
25 // Adds some cookie samples.
26 void AddCookieSamples(const GURL& url, const std::string& cookie_line);
28 // Notifies the callback.
29 void Notify();
31 // Marks all cookies as existing.
32 void Reset();
34 // Returns true if all cookies since the last Reset() invocation were
35 // deleted.
36 bool AllDeleted();
38 private:
39 ~MockBrowsingDataCookieHelper() override;
41 net::CookieMonster::GetCookieListCallback callback_;
43 net::CookieList cookie_list_;
45 // Stores which cookies exist.
46 std::map<const std::string, bool> cookies_;
48 DISALLOW_COPY_AND_ASSIGN(MockBrowsingDataCookieHelper);
51 #endif // CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_COOKIE_HELPER_H_