OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 ExceptionState& exception_state) { | 147 ExceptionState& exception_state) { |
148 IDB_TRACE("IDBFactory::open"); | 148 IDB_TRACE("IDBFactory::open"); |
149 return OpenInternal(script_state, name, IDBDatabaseMetadata::kNoVersion, | 149 return OpenInternal(script_state, name, IDBDatabaseMetadata::kNoVersion, |
150 exception_state); | 150 exception_state); |
151 } | 151 } |
152 | 152 |
153 IDBOpenDBRequest* IDBFactory::deleteDatabase(ScriptState* script_state, | 153 IDBOpenDBRequest* IDBFactory::deleteDatabase(ScriptState* script_state, |
154 const String& name, | 154 const String& name, |
155 ExceptionState& exception_state) { | 155 ExceptionState& exception_state) { |
156 return DeleteDatabaseInternal(script_state, name, exception_state, | 156 return DeleteDatabaseInternal(script_state, name, exception_state, |
157 false /* force_close */); | 157 /*force_close=*/false); |
158 } | 158 } |
159 | 159 |
160 IDBOpenDBRequest* IDBFactory::CloseConnectionsAndDeleteDatabase( | 160 IDBOpenDBRequest* IDBFactory::CloseConnectionsAndDeleteDatabase( |
161 ScriptState* script_state, | 161 ScriptState* script_state, |
162 const String& name, | 162 const String& name, |
163 ExceptionState& exception_state) { | 163 ExceptionState& exception_state) { |
164 return DeleteDatabaseInternal(script_state, name, exception_state, | 164 return DeleteDatabaseInternal(script_state, name, exception_state, |
165 true /* force_close */); | 165 /*force_close=*/true); |
166 } | 166 } |
167 | 167 |
168 IDBOpenDBRequest* IDBFactory::DeleteDatabaseInternal( | 168 IDBOpenDBRequest* IDBFactory::DeleteDatabaseInternal( |
169 ScriptState* script_state, | 169 ScriptState* script_state, |
170 const String& name, | 170 const String& name, |
171 ExceptionState& exception_state, | 171 ExceptionState& exception_state, |
172 bool force_close) { | 172 bool force_close) { |
173 IDB_TRACE("IDBFactory::deleteDatabase"); | 173 IDB_TRACE("IDBFactory::deleteDatabase"); |
174 IDBDatabase::RecordApiCallsHistogram(kIDBDeleteDatabaseCall); | 174 IDBDatabase::RecordApiCallsHistogram(kIDBDeleteDatabaseCall); |
175 if (!IsContextValid(ExecutionContext::From(script_state))) | 175 if (!IsContextValid(ExecutionContext::From(script_state))) |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 if (!second->IsValid()) { | 223 if (!second->IsValid()) { |
224 exception_state.ThrowDOMException(kDataError, | 224 exception_state.ThrowDOMException(kDataError, |
225 IDBDatabase::kNotValidKeyErrorMessage); | 225 IDBDatabase::kNotValidKeyErrorMessage); |
226 return 0; | 226 return 0; |
227 } | 227 } |
228 | 228 |
229 return static_cast<short>(first->Compare(second)); | 229 return static_cast<short>(first->Compare(second)); |
230 } | 230 } |
231 | 231 |
232 } // namespace blink | 232 } // namespace blink |
OLD | NEW |