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

Unified 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, 7 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/clear_on_exit_policy.h
diff --git a/chrome/browser/net/clear_on_exit_policy.h b/chrome/browser/net/clear_on_exit_policy.h
new file mode 100644
index 0000000000000000000000000000000000000000..5c34e062a6e81ce3888b4a0fc668a01b4035bc06
--- /dev/null
+++ b/chrome/browser/net/clear_on_exit_policy.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// A wrapper around quota::PersistentStoragePolicy used by the net storage
+// backends in chrome/browser/net to decide what to delete at shutdown.
+
+#ifndef CHROME_BROWSER_NET_CLEAR_ON_EXIT_POLICY_H_
+#define CHROME_BROWSER_NET_CLEAR_ON_EXIT_POLICY_H_
+#pragma once
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
+
+namespace quota {
+class SpecialStoragePolicy;
+}
+
+class ClearOnExitPolicy : public base::RefCountedThreadSafe<ClearOnExitPolicy> {
+ public:
+ // |special_storage_policy| can be NULL, if no policy is to be applied.
+ // Otherwise, will keep a scoped_refptr to |special_storage_policy|
+ // throughout its lifetime.
+ explicit ClearOnExitPolicy(
+ quota::SpecialStoragePolicy* special_storage_policy);
+
+ // True if there are origins that should be cleared on exit.
+ bool HasClearOnExitOrigins();
+
+ // True if the given origin (defined by the |domain| and whether or not the
+ // |scheme_is_secure|) should be cleared on exit.
+ bool ShouldClearOriginOnExit(const std::string& domain,
+ bool scheme_is_secure);
+
+ private:
+ friend class base::RefCountedThreadSafe<ClearOnExitPolicy>;
+
+ virtual ~ClearOnExitPolicy();
+
+ scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_;
+
+ DISALLOW_COPY_AND_ASSIGN(ClearOnExitPolicy);
+};
+
+#endif // CHROME_BROWSER_NET_CLEAR_ON_EXIT_POLICY_H_
« 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