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

Side by Side Diff: chrome/browser/net/clear_on_exit_policy.h

Issue 10407124: Don't force non-session only cookies to be session only cookies, instead delete on shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 6 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 // A wrapper around quota::PersistentStoragePolicy used by the net storage
6 // backends in chrome/browser/net to decide what to delete at shutdown.
7
8 #ifndef CHROME_BROWSER_NET_CLEAR_ON_EXIT_POLICY_H_
9 #define CHROME_BROWSER_NET_CLEAR_ON_EXIT_POLICY_H_
10 #pragma once
11
12 #include <string>
13
14 #include "base/basictypes.h"
15 #include "base/memory/ref_counted.h"
16
17 namespace quota {
18 class SpecialStoragePolicy;
19 }
20
21 class ClearOnExitPolicy : public base::RefCountedThreadSafe<ClearOnExitPolicy> {
22 public:
23 // |special_storage_policy| can be NULL, if no policy is to be applied.
24 // Otherwise, will keep a scoped_refptr to |special_storage_policy|
25 // throughout its lifetime.
26 explicit ClearOnExitPolicy(
27 quota::SpecialStoragePolicy* special_storage_policy);
28
29 // True if there are origins that should be cleared on exit.
30 bool HasClearOnExitOrigins();
31
32 // True if the given origin (defined by the |domain| and whether or not the
33 // |scheme_is_secure|) should be cleared on exit.
34 bool ShouldClearOriginOnExit(const std::string& domain,
35 bool scheme_is_secure);
36
37 private:
38 friend class base::RefCountedThreadSafe<ClearOnExitPolicy>;
39
40 virtual ~ClearOnExitPolicy();
41
42 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_;
43
44 DISALLOW_COPY_AND_ASSIGN(ClearOnExitPolicy);
45 };
46
47 #endif // CHROME_BROWSER_NET_CLEAR_ON_EXIT_POLICY_H_
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_network_delegate.cc ('k') | chrome/browser/net/clear_on_exit_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698