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

Unified Diff: content/common/indexed_db/indexed_db_key.cc

Issue 1071683002: IndexedDB: Use C++11 in-class member initializers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/indexed_db/indexed_db_key.h ('k') | content/common/indexed_db/indexed_db_key_range.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/indexed_db/indexed_db_key.cc
diff --git a/content/common/indexed_db/indexed_db_key.cc b/content/common/indexed_db/indexed_db_key.cc
index 1a3d72ec7edf9d3f6e39c5afbf66e6eebcfa4b22..c23d3e44e2fef76604685e0ab01996683f9b874f 100644
--- a/content/common/indexed_db/indexed_db_key.cc
+++ b/content/common/indexed_db/indexed_db_key.cc
@@ -5,7 +5,6 @@
#include "content/common/indexed_db/indexed_db_key.h"
#include <string>
-#include "base/logging.h"
namespace content {
@@ -56,18 +55,15 @@ static IndexedDBKey::KeyArray CopyKeyArray(const T& array) {
IndexedDBKey::IndexedDBKey()
: type_(WebIDBKeyTypeNull),
- date_(0),
- number_(0),
size_estimate_(kOverheadSize) {}
IndexedDBKey::IndexedDBKey(WebIDBKeyType type)
- : type_(type), date_(0), number_(0), size_estimate_(kOverheadSize) {
+ : type_(type), size_estimate_(kOverheadSize) {
DCHECK(type == WebIDBKeyTypeNull || type == WebIDBKeyTypeInvalid);
}
IndexedDBKey::IndexedDBKey(double number, WebIDBKeyType type)
: type_(type),
- date_(number),
number_(number),
size_estimate_(kOverheadSize + sizeof(number)) {
DCHECK(type == WebIDBKeyTypeNumber || type == WebIDBKeyTypeDate);
@@ -76,8 +72,6 @@ IndexedDBKey::IndexedDBKey(double number, WebIDBKeyType type)
IndexedDBKey::IndexedDBKey(const KeyArray& array)
: type_(WebIDBKeyTypeArray),
array_(CopyKeyArray(array)),
- date_(0),
- number_(0),
size_estimate_(kOverheadSize + CalculateArraySize(array)) {}
IndexedDBKey::IndexedDBKey(const std::string& binary)
@@ -137,7 +131,6 @@ int IndexedDBKey::CompareTo(const IndexedDBKey& other) const {
case WebIDBKeyTypeString:
return string_.compare(other.string_);
case WebIDBKeyTypeDate:
- return Compare(date_, other.date_);
case WebIDBKeyTypeNumber:
return Compare(number_, other.number_);
case WebIDBKeyTypeInvalid:
« no previous file with comments | « content/common/indexed_db/indexed_db_key.h ('k') | content/common/indexed_db/indexed_db_key_range.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698