OLD | NEW |
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 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 void AddFileHandler(const std::string& id) { | 32 void AddFileHandler(const std::string& id) { |
33 file_handlers_.insert(id); | 33 file_handlers_.insert(id); |
34 } | 34 } |
35 | 35 |
36 void Reset() { | 36 void Reset() { |
37 protected_.clear(); | 37 protected_.clear(); |
38 unlimited_.clear(); | 38 unlimited_.clear(); |
39 file_handlers_.clear(); | 39 file_handlers_.clear(); |
40 } | 40 } |
41 | 41 |
| 42 void NotifyChanged() { |
| 43 SpecialStoragePolicy::NotifyObservers(); |
| 44 } |
| 45 |
42 private: | 46 private: |
43 std::set<GURL> protected_; | 47 std::set<GURL> protected_; |
44 std::set<GURL> unlimited_; | 48 std::set<GURL> unlimited_; |
45 std::set<std::string> file_handlers_; | 49 std::set<std::string> file_handlers_; |
46 }; | 50 }; |
47 } // namespace quota | 51 } // namespace quota |
48 | 52 |
49 #endif // WEBKIT_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_ | 53 #endif // WEBKIT_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_ |
OLD | NEW |