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

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

Issue 7633016: Test cleanup: Using MockSpecialStoragePolicy instead of local subclasses of SpecialStoragePolicy. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Keeping up to date with trunk. 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
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 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
(...skipping 15 matching lines...) Expand all
26 } 26 }
27 27
28 void AddUnlimited(const GURL& origin) { 28 void AddUnlimited(const GURL& origin) {
29 unlimited_.insert(origin); 29 unlimited_.insert(origin);
30 } 30 }
31 31
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 SetAllUnlimited(bool all_unlimited) {
37 all_unlimited_ = all_unlimited;
38 }
39
36 void Reset() { 40 void Reset() {
37 protected_.clear(); 41 protected_.clear();
38 unlimited_.clear(); 42 unlimited_.clear();
39 file_handlers_.clear(); 43 file_handlers_.clear();
40 } 44 }
41 45
42 void NotifyChanged() { 46 void NotifyChanged() {
43 SpecialStoragePolicy::NotifyObservers(); 47 SpecialStoragePolicy::NotifyObservers();
44 } 48 }
45 49
46 private: 50 private:
47 std::set<GURL> protected_; 51 std::set<GURL> protected_;
48 std::set<GURL> unlimited_; 52 std::set<GURL> unlimited_;
49 std::set<std::string> file_handlers_; 53 std::set<std::string> file_handlers_;
54
55 bool all_unlimited_;
50 }; 56 };
51 } // namespace quota 57 } // namespace quota
52 58
53 #endif // WEBKIT_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_ 59 #endif // WEBKIT_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_
OLDNEW
« no previous file with comments | « webkit/fileapi/sandbox_mount_point_provider_unittest.cc ('k') | webkit/quota/mock_special_storage_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698