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

Side by Side Diff: content/browser/dom_storage/dom_storage_context_impl.h

Issue 9963107: Persist sessionStorage on disk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: session only rules 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ 5 #ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_
6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ 6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "content/public/browser/dom_storage_context.h" 10 #include "content/public/browser/dom_storage_context.h"
(...skipping 12 matching lines...) Expand all
23 public: 23 public:
24 // If |data_path| is empty, nothing will be saved to disk. 24 // If |data_path| is empty, nothing will be saved to disk.
25 DOMStorageContextImpl(const FilePath& data_path, 25 DOMStorageContextImpl(const FilePath& data_path,
26 quota::SpecialStoragePolicy* special_storage_policy); 26 quota::SpecialStoragePolicy* special_storage_policy);
27 27
28 // DOMStorageContext implementation. 28 // DOMStorageContext implementation.
29 virtual void GetUsageInfo(const GetUsageInfoCallback& callback) OVERRIDE; 29 virtual void GetUsageInfo(const GetUsageInfoCallback& callback) OVERRIDE;
30 virtual void DeleteOrigin(const GURL& origin) OVERRIDE; 30 virtual void DeleteOrigin(const GURL& origin) OVERRIDE;
31 virtual scoped_refptr<content::SessionStorageNamespace> 31 virtual scoped_refptr<content::SessionStorageNamespace>
32 RecreateSessionStorage(const std::string& persistent_id) OVERRIDE; 32 RecreateSessionStorage(const std::string& persistent_id) OVERRIDE;
33 virtual void StartScavengingUnusedSessionStorage() OVERRIDE;
33 34
34 // Called to free up memory that's not strictly needed. 35 // Called to free up memory that's not strictly needed.
35 void PurgeMemory(); 36 void PurgeMemory();
36 37
37 // Used by content settings to alter the behavior around 38 // Used by content settings to alter the behavior around
38 // what data to keep and what data to discard at shutdown. 39 // what data to keep and what data to discard at shutdown.
39 // The policy is not so straight forward to describe, see 40 // The policy is not so straight forward to describe, see
40 // the implementation for details. 41 // the implementation for details.
41 void SetForceKeepSessionState(); 42 void SetForceKeepSessionState();
42 43
43 // Called when the BrowserContext/Profile is going away. 44 // Called when the BrowserContext/Profile is going away.
44 void Shutdown(); 45 void Shutdown();
45 46
46 private: 47 private:
47 friend class DOMStorageMessageFilter; // for access to context() 48 friend class DOMStorageMessageFilter; // for access to context()
48 friend class SessionStorageNamespaceImpl; // ditto 49 friend class SessionStorageNamespaceImpl; // ditto
49 friend class base::RefCountedThreadSafe<DOMStorageContextImpl>; 50 friend class base::RefCountedThreadSafe<DOMStorageContextImpl>;
50 51
51 virtual ~DOMStorageContextImpl(); 52 virtual ~DOMStorageContextImpl();
52 dom_storage::DomStorageContext* context() const { return context_.get(); } 53 dom_storage::DomStorageContext* context() const { return context_.get(); }
53 54
54 scoped_refptr<dom_storage::DomStorageContext> context_; 55 scoped_refptr<dom_storage::DomStorageContext> context_;
55 56
56 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContextImpl); 57 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContextImpl);
57 }; 58 };
58 59
59 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ 60 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698