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

Side by Side Diff: webkit/quota/special_storage_policy.h

Issue 7619010: Session-only local storage cleared on exit. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Code review comments (tiny). Created 9 years, 4 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
« no previous file with comments | « webkit/quota/mock_special_storage_policy.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 WEBKIT_QUOTA_SPECIAL_STORAGE_POLICY_H_ 5 #ifndef WEBKIT_QUOTA_SPECIAL_STORAGE_POLICY_H_
6 #define WEBKIT_QUOTA_SPECIAL_STORAGE_POLICY_H_ 6 #define WEBKIT_QUOTA_SPECIAL_STORAGE_POLICY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 24 matching lines...) Expand all
35 // Protected storage is not subject to removal by the browsing data remover. 35 // Protected storage is not subject to removal by the browsing data remover.
36 virtual bool IsStorageProtected(const GURL& origin) = 0; 36 virtual bool IsStorageProtected(const GURL& origin) = 0;
37 37
38 // Unlimited storage is not subject to 'quotas'. 38 // Unlimited storage is not subject to 'quotas'.
39 virtual bool IsStorageUnlimited(const GURL& origin) = 0; 39 virtual bool IsStorageUnlimited(const GURL& origin) = 0;
40 40
41 // Checks if extension identified with |extension_id| is registered as 41 // Checks if extension identified with |extension_id| is registered as
42 // file handler. 42 // file handler.
43 virtual bool IsFileHandler(const std::string& extension_id) = 0; 43 virtual bool IsFileHandler(const std::string& extension_id) = 0;
44 44
45 // Some origins are only allowed to store session-only data which is deleted
46 // when the session ends.
47 virtual bool IsStorageSessionOnly(const GURL& origin) = 0;
48
45 // Adds/removes an observer, the policy does not take 49 // Adds/removes an observer, the policy does not take
46 // ownership of the observer. Should only be called on the IO thread. 50 // ownership of the observer. Should only be called on the IO thread.
47 void AddObserver(Observer* observer); 51 void AddObserver(Observer* observer);
48 void RemoveObserver(Observer* observer); 52 void RemoveObserver(Observer* observer);
49 53
50 protected: 54 protected:
51 friend class base::RefCountedThreadSafe<SpecialStoragePolicy>; 55 friend class base::RefCountedThreadSafe<SpecialStoragePolicy>;
52 virtual ~SpecialStoragePolicy(); 56 virtual ~SpecialStoragePolicy();
53 void NotifyObservers(); 57 void NotifyObservers();
54 58
55 ObserverList<Observer> observers_; 59 ObserverList<Observer> observers_;
56 }; 60 };
57 61
58 } // namespace quota 62 } // namespace quota
59 63
60 #endif // WEBKIT_QUOTA_SPECIAL_STORAGE_POLICY_H_ 64 #endif // WEBKIT_QUOTA_SPECIAL_STORAGE_POLICY_H_
OLDNEW
« no previous file with comments | « webkit/quota/mock_special_storage_policy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698