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

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

Issue 10066044: RefCounted types should not have public destructors, webkit/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implementation ordering 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/quota/mock_quota_manager.cc ('k') | webkit/quota/mock_special_storage_policy.cc » ('j') | 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_MOCK_SPECIAL_STORAGE_POLICY_H_ 5 #ifndef WEBKIT_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_
6 #define WEBKIT_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_ 6 #define WEBKIT_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "googleurl/src/gurl.h" 11 #include "googleurl/src/gurl.h"
12 #include "webkit/quota/special_storage_policy.h" 12 #include "webkit/quota/special_storage_policy.h"
13 13
14 namespace quota { 14 namespace quota {
15 15
16 class MockSpecialStoragePolicy : public quota::SpecialStoragePolicy { 16 class MockSpecialStoragePolicy : public quota::SpecialStoragePolicy {
17 public: 17 public:
18 MockSpecialStoragePolicy(); 18 MockSpecialStoragePolicy();
19 virtual ~MockSpecialStoragePolicy();
20 19
21 virtual bool IsStorageProtected(const GURL& origin) OVERRIDE; 20 virtual bool IsStorageProtected(const GURL& origin) OVERRIDE;
22 virtual bool IsStorageUnlimited(const GURL& origin) OVERRIDE; 21 virtual bool IsStorageUnlimited(const GURL& origin) OVERRIDE;
23 virtual bool IsStorageSessionOnly(const GURL& origin) OVERRIDE; 22 virtual bool IsStorageSessionOnly(const GURL& origin) OVERRIDE;
24 virtual bool IsFileHandler(const std::string& extension_id) OVERRIDE; 23 virtual bool IsFileHandler(const std::string& extension_id) OVERRIDE;
25 virtual bool HasSessionOnlyOrigins() OVERRIDE; 24 virtual bool HasSessionOnlyOrigins() OVERRIDE;
26 25
27 void AddProtected(const GURL& origin) { 26 void AddProtected(const GURL& origin) {
28 protected_.insert(origin); 27 protected_.insert(origin);
29 } 28 }
(...skipping 19 matching lines...) Expand all
49 unlimited_.clear(); 48 unlimited_.clear();
50 session_only_.clear(); 49 session_only_.clear();
51 file_handlers_.clear(); 50 file_handlers_.clear();
52 all_unlimited_ = false; 51 all_unlimited_ = false;
53 } 52 }
54 53
55 void NotifyChanged() { 54 void NotifyChanged() {
56 SpecialStoragePolicy::NotifyObservers(); 55 SpecialStoragePolicy::NotifyObservers();
57 } 56 }
58 57
58 protected:
59 virtual ~MockSpecialStoragePolicy();
60
59 private: 61 private:
60 std::set<GURL> protected_; 62 std::set<GURL> protected_;
61 std::set<GURL> unlimited_; 63 std::set<GURL> unlimited_;
62 std::set<GURL> session_only_; 64 std::set<GURL> session_only_;
63 std::set<std::string> file_handlers_; 65 std::set<std::string> file_handlers_;
64 66
65 bool all_unlimited_; 67 bool all_unlimited_;
66 }; 68 };
67 } // namespace quota 69 } // namespace quota
68 70
69 #endif // WEBKIT_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_ 71 #endif // WEBKIT_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_
OLDNEW
« no previous file with comments | « webkit/quota/mock_quota_manager.cc ('k') | webkit/quota/mock_special_storage_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698