| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "webkit/browser/dom_storage/session_storage_database.h" | 5 #include "webkit/browser/dom_storage/session_storage_database.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| 11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "googleurl/src/gurl.h" | |
| 14 #include "third_party/leveldatabase/src/include/leveldb/db.h" | 13 #include "third_party/leveldatabase/src/include/leveldb/db.h" |
| 15 #include "third_party/leveldatabase/src/include/leveldb/iterator.h" | 14 #include "third_party/leveldatabase/src/include/leveldb/iterator.h" |
| 16 #include "third_party/leveldatabase/src/include/leveldb/options.h" | 15 #include "third_party/leveldatabase/src/include/leveldb/options.h" |
| 17 #include "third_party/leveldatabase/src/include/leveldb/status.h" | 16 #include "third_party/leveldatabase/src/include/leveldb/status.h" |
| 18 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h" | 17 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h" |
| 18 #include "url/gurl.h" |
| 19 | 19 |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 const char session_storage_uma_name[] = "SessionStorageDatabase.Open"; | 23 const char session_storage_uma_name[] = "SessionStorageDatabase.Open"; |
| 24 | 24 |
| 25 enum SessionStorageUMA { | 25 enum SessionStorageUMA { |
| 26 SESSION_STORAGE_UMA_SUCCESS, | 26 SESSION_STORAGE_UMA_SUCCESS, |
| 27 SESSION_STORAGE_UMA_RECREATED, | 27 SESSION_STORAGE_UMA_RECREATED, |
| 28 SESSION_STORAGE_UMA_FAIL, | 28 SESSION_STORAGE_UMA_FAIL, |
| (...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 std::string SessionStorageDatabase::MapKey(const std::string& map_id, | 667 std::string SessionStorageDatabase::MapKey(const std::string& map_id, |
| 668 const std::string& key) { | 668 const std::string& key) { |
| 669 return base::StringPrintf("map-%s-%s", map_id.c_str(), key.c_str()); | 669 return base::StringPrintf("map-%s-%s", map_id.c_str(), key.c_str()); |
| 670 } | 670 } |
| 671 | 671 |
| 672 const char* SessionStorageDatabase::NextMapIdKey() { | 672 const char* SessionStorageDatabase::NextMapIdKey() { |
| 673 return "next-map-id"; | 673 return "next-map-id"; |
| 674 } | 674 } |
| 675 | 675 |
| 676 } // namespace dom_storage | 676 } // namespace dom_storage |
| OLD | NEW |