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

Side by Side Diff: chrome/browser/mock_browsing_data_cookie_helper.h

Issue 10805015: Move browsing_data_helper files into a separate directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix chrome_frame build Created 8 years, 5 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_MOCK_BROWSING_DATA_COOKIE_HELPER_H_
6 #define CHROME_BROWSER_MOCK_BROWSING_DATA_COOKIE_HELPER_H_
7
8 #include <map>
9 #include <string>
10
11 #include "chrome/browser/browsing_data_cookie_helper.h"
12 #include "net/cookies/canonical_cookie.h"
13
14 // Mock for BrowsingDataCookieHelper.
15 class MockBrowsingDataCookieHelper : public BrowsingDataCookieHelper {
16 public:
17 explicit MockBrowsingDataCookieHelper(
18 net::URLRequestContextGetter* request_context_getter);
19
20 // BrowsingDataCookieHelper methods.
21 virtual void StartFetching(
22 const net::CookieMonster::GetCookieListCallback &callback) OVERRIDE;
23 virtual void DeleteCookie(const net::CanonicalCookie& cookie) OVERRIDE;
24
25 // Adds some cookie samples.
26 void AddCookieSamples(const GURL& url, const std::string& cookie_line);
27
28 // Notifies the callback.
29 void Notify();
30
31 // Marks all cookies as existing.
32 void Reset();
33
34 // Returns true if all cookies since the last Reset() invocation were
35 // deleted.
36 bool AllDeleted();
37
38 private:
39 virtual ~MockBrowsingDataCookieHelper();
40
41 net::CookieMonster::GetCookieListCallback callback_;
42
43 net::CookieList cookie_list_;
44
45 // Stores which cookies exist.
46 std::map<const std::string, bool> cookies_;
47 };
48
49 #endif // CHROME_BROWSER_MOCK_BROWSING_DATA_COOKIE_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/mock_browsing_data_appcache_helper.cc ('k') | chrome/browser/mock_browsing_data_cookie_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698