| OLD | NEW | 
|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "content/browser/dom_storage/local_storage_context_mojo.h" | 5 #include "content/browser/dom_storage/local_storage_context_mojo.h" | 
| 6 | 6 | 
| 7 #include <inttypes.h> | 7 #include <inttypes.h> | 
| 8 #include <cctype>  // for std::isalnum | 8 #include <cctype>  // for std::isalnum | 
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" | 
| 10 #include "base/metrics/histogram_functions.h" | 10 #include "base/metrics/histogram_functions.h" | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
| 21 #include "content/browser/dom_storage/dom_storage_task_runner.h" | 21 #include "content/browser/dom_storage/dom_storage_task_runner.h" | 
| 22 #include "content/browser/dom_storage/local_storage_database.pb.h" | 22 #include "content/browser/dom_storage/local_storage_database.pb.h" | 
| 23 #include "content/browser/leveldb_wrapper_impl.h" | 23 #include "content/browser/leveldb_wrapper_impl.h" | 
| 24 #include "content/common/dom_storage/dom_storage_types.h" | 24 #include "content/common/dom_storage/dom_storage_types.h" | 
| 25 #include "content/public/browser/local_storage_usage_info.h" | 25 #include "content/public/browser/local_storage_usage_info.h" | 
| 26 #include "services/file/public/interfaces/constants.mojom.h" | 26 #include "services/file/public/interfaces/constants.mojom.h" | 
| 27 #include "services/service_manager/public/cpp/connector.h" | 27 #include "services/service_manager/public/cpp/connector.h" | 
| 28 #include "sql/connection.h" | 28 #include "sql/connection.h" | 
| 29 #include "storage/browser/quota/special_storage_policy.h" | 29 #include "storage/browser/quota/special_storage_policy.h" | 
| 30 #include "third_party/leveldatabase/env_chromium.h" | 30 #include "third_party/leveldatabase/env_chromium.h" | 
|  | 31 // third_party/webrtc/base/thread_checker.h leaks the define | 
|  | 32 // EXCLUSIVE_LOCKS_REQUIRED and more which collide with the same define in | 
|  | 33 // third_party/leveldatabase/src/port/thread_annotations. | 
|  | 34 #undef EXCLUSIVE_LOCKS_REQUIRED | 
|  | 35 #undef SHARED_LOCKS_REQUIRED | 
|  | 36 #undef LOCKS_EXCLUDED | 
|  | 37 #undef LOCK_RETURNED | 
|  | 38 #undef LOCKABLE | 
|  | 39 #undef SCOPED_LOCKABLE | 
|  | 40 #undef EXCLUSIVE_LOCK_FUNCTION | 
|  | 41 #undef SHARED_LOCK_FUNCTION | 
|  | 42 #undef EXCLUSIVE_TRYLOCK_FUNCTION | 
|  | 43 #undef SHARED_TRYLOCK_FUNCTION | 
|  | 44 #undef UNLOCK_FUNCTION | 
|  | 45 #undef NO_THREAD_SAFETY_ANALYSIS | 
| 31 | 46 | 
| 32 namespace content { | 47 namespace content { | 
| 33 | 48 | 
| 34 // LevelDB database schema | 49 // LevelDB database schema | 
| 35 // ======================= | 50 // ======================= | 
| 36 // | 51 // | 
| 37 // Version 1 (in sorted order): | 52 // Version 1 (in sorted order): | 
| 38 //   key: "VERSION" | 53 //   key: "VERSION" | 
| 39 //   value: "1" | 54 //   value: "1" | 
| 40 // | 55 // | 
| (...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 944     UMA_HISTOGRAM_ENUMERATION("LocalStorageContext.OpenError", result, | 959     UMA_HISTOGRAM_ENUMERATION("LocalStorageContext.OpenError", result, | 
| 945                               OpenResult::MAX); | 960                               OpenResult::MAX); | 
| 946   } | 961   } | 
| 947   if (open_result_histogram_) { | 962   if (open_result_histogram_) { | 
| 948     base::UmaHistogramEnumeration(open_result_histogram_, result, | 963     base::UmaHistogramEnumeration(open_result_histogram_, result, | 
| 949                                   OpenResult::MAX); | 964                                   OpenResult::MAX); | 
| 950   } | 965   } | 
| 951 } | 966 } | 
| 952 | 967 | 
| 953 }  // namespace content | 968 }  // namespace content | 
| OLD | NEW | 
|---|