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

Side by Side Diff: webkit/appcache/appcache_working_set.h

Issue 3522004: FBTF: Move ctors/dtors into implementation files. Adds ctors/dtors to non-POD structs. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 2 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_APPCACHE_APPCACHE_WORKING_SET_H_ 5 #ifndef WEBKIT_APPCACHE_APPCACHE_WORKING_SET_H_
6 #define WEBKIT_APPCACHE_APPCACHE_WORKING_SET_H_ 6 #define WEBKIT_APPCACHE_APPCACHE_WORKING_SET_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
11 #include "googleurl/src/gurl.h" 11 #include "googleurl/src/gurl.h"
12 12
13 namespace appcache { 13 namespace appcache {
14 14
15 class AppCache; 15 class AppCache;
16 class AppCacheGroup; 16 class AppCacheGroup;
17 class AppCacheResponseInfo; 17 class AppCacheResponseInfo;
18 18
19 // Represents the working set of appcache object instances 19 // Represents the working set of appcache object instances
20 // currently in memory. 20 // currently in memory.
21 class AppCacheWorkingSet { 21 class AppCacheWorkingSet {
22 public: 22 public:
23 typedef std::map<GURL, AppCacheGroup*> GroupMap; 23 typedef std::map<GURL, AppCacheGroup*> GroupMap;
24 24
25 AppCacheWorkingSet() : is_disabled_(false) {} 25 AppCacheWorkingSet();
26 ~AppCacheWorkingSet(); 26 ~AppCacheWorkingSet();
27 27
28 void Disable(); 28 void Disable();
29 bool is_disabled() const { return is_disabled_; } 29 bool is_disabled() const { return is_disabled_; }
30 30
31 void AddCache(AppCache* cache); 31 void AddCache(AppCache* cache);
32 void RemoveCache(AppCache* cache); 32 void RemoveCache(AppCache* cache);
33 AppCache* GetCache(int64 id) { 33 AppCache* GetCache(int64 id) {
34 CacheMap::iterator it = caches_.find(id); 34 CacheMap::iterator it = caches_.find(id);
35 return (it != caches_.end()) ? it->second : NULL; 35 return (it != caches_.end()) ? it->second : NULL;
(...skipping 30 matching lines...) Expand all
66 CacheMap caches_; 66 CacheMap caches_;
67 GroupMap groups_; 67 GroupMap groups_;
68 GroupsByOriginMap groups_by_origin_; // origin -> (manifest -> group) 68 GroupsByOriginMap groups_by_origin_; // origin -> (manifest -> group)
69 ResponseInfoMap response_infos_; 69 ResponseInfoMap response_infos_;
70 bool is_disabled_; 70 bool is_disabled_;
71 }; 71 };
72 72
73 } // namespace appcache 73 } // namespace appcache
74 74
75 #endif // WEBKIT_APPCACHE_APPCACHE_WORKING_SET_H_ 75 #endif // WEBKIT_APPCACHE_APPCACHE_WORKING_SET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698