summaryrefslogtreecommitdiffstats
path: root/webkit/database/database_tracker.h
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/database/database_tracker.h')
-rw-r--r--webkit/database/database_tracker.h32
1 files changed, 7 insertions, 25 deletions
diff --git a/webkit/database/database_tracker.h b/webkit/database/database_tracker.h
index 4976a91..08a66b2 100644
--- a/webkit/database/database_tracker.h
+++ b/webkit/database/database_tracker.h
@@ -36,38 +36,20 @@ class QuotaTable;
// This class is used to store information about all databases in an origin.
class OriginInfo {
public:
- OriginInfo(const OriginInfo& origin_info)
- : origin_(origin_info.origin_),
- total_size_(origin_info.total_size_),
- quota_(origin_info.quota_),
- database_info_(origin_info.database_info_) {}
+ OriginInfo(const OriginInfo& origin_info);
+ ~OriginInfo();
+
const string16& GetOrigin() const { return origin_; }
int64 TotalSize() const { return total_size_; }
int64 Quota() const { return quota_; }
- void GetAllDatabaseNames(std::vector<string16>* databases) const {
- for (DatabaseInfoMap::const_iterator it = database_info_.begin();
- it != database_info_.end(); it++) {
- databases->push_back(it->first);
- }
- }
- int64 GetDatabaseSize(const string16& database_name) const {
- DatabaseInfoMap::const_iterator it = database_info_.find(database_name);
- if (it != database_info_.end())
- return it->second.first;
- return 0;
- }
- string16 GetDatabaseDescription(const string16& database_name) const {
- DatabaseInfoMap::const_iterator it = database_info_.find(database_name);
- if (it != database_info_.end())
- return it->second.second;
- return string16();
- }
+ void GetAllDatabaseNames(std::vector<string16>* databases) const;
+ int64 GetDatabaseSize(const string16& database_name) const;
+ string16 GetDatabaseDescription(const string16& database_name) const;
protected:
typedef std::map<string16, std::pair<int64, string16> > DatabaseInfoMap;
- OriginInfo(const string16& origin, int64 total_size, int64 quota)
- : origin_(origin), total_size_(total_size), quota_(quota) { }
+ OriginInfo(const string16& origin, int64 total_size, int64 quota);
string16 origin_;
int64 total_size_;