summaryrefslogtreecommitdiffstats
path: root/webkit/database
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-01 22:05:28 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-01 22:05:28 +0000
commitd0af7203fccbb273cd4ee112b12ca93c18441efa (patch)
tree6410ef23531cf87aac1981a74326ced5a25fa0df /webkit/database
parent7f71e75e4eb1decfdc52f28b2ec48671d09f373b (diff)
downloadchromium_src-d0af7203fccbb273cd4ee112b12ca93c18441efa.zip
chromium_src-d0af7203fccbb273cd4ee112b12ca93c18441efa.tar.gz
chromium_src-d0af7203fccbb273cd4ee112b12ca93c18441efa.tar.bz2
Revert "FBTF: Another big ctor/dtor cleanup found by automated tools."
This reverts commit 27ea47d65cf8767f350113d5ad9e25170efde811 (r61237). BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3609005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61240 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/database')
-rw-r--r--webkit/database/database_tracker.cc33
-rw-r--r--webkit/database/database_tracker.h32
2 files changed, 25 insertions, 40 deletions
diff --git a/webkit/database/database_tracker.cc b/webkit/database/database_tracker.cc
index 46e9dc1..a23d9f1 100644
--- a/webkit/database/database_tracker.cc
+++ b/webkit/database/database_tracker.cc
@@ -45,39 +45,6 @@ static const int kCurrentVersion = 2;
static const int kCompatibleVersion = 1;
static const char* kExtensionOriginIdentifierPrefix = "chrome-extension_";
-OriginInfo::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::~OriginInfo() {}
-
-void OriginInfo::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 OriginInfo::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 OriginInfo::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();
-}
-
-OriginInfo::OriginInfo(const string16& origin, int64 total_size, int64 quota)
- : origin_(origin), total_size_(total_size), quota_(quota) {}
-
DatabaseTracker::DatabaseTracker(const FilePath& profile_path,
bool is_incognito)
: is_initialized_(false),
diff --git a/webkit/database/database_tracker.h b/webkit/database/database_tracker.h
index 08a66b2..4976a91 100644
--- a/webkit/database/database_tracker.h
+++ b/webkit/database/database_tracker.h
@@ -36,20 +36,38 @@ class QuotaTable;
// This class is used to store information about all databases in an origin.
class OriginInfo {
public:
- OriginInfo(const OriginInfo& origin_info);
- ~OriginInfo();
-
+ 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_) {}
const string16& GetOrigin() const { return origin_; }
int64 TotalSize() const { return total_size_; }
int64 Quota() const { return quota_; }
- void GetAllDatabaseNames(std::vector<string16>* databases) const;
- int64 GetDatabaseSize(const string16& database_name) const;
- string16 GetDatabaseDescription(const string16& database_name) const;
+ 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();
+ }
protected:
typedef std::map<string16, std::pair<int64, string16> > DatabaseInfoMap;
- OriginInfo(const string16& origin, int64 total_size, int64 quota);
+ OriginInfo(const string16& origin, int64 total_size, int64 quota)
+ : origin_(origin), total_size_(total_size), quota_(quota) { }
string16 origin_;
int64 total_size_;