| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/common/indexed_db_key.h" | 5 #include "chrome/common/indexed_db_key.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" | 8 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" |
| 9 | 9 |
| 10 using WebKit::WebIDBKey; | 10 using WebKit::WebIDBKey; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 IndexedDBKey::operator WebIDBKey() const { | 49 IndexedDBKey::operator WebIDBKey() const { |
| 50 switch (type_) { | 50 switch (type_) { |
| 51 case WebIDBKey::NullType: | 51 case WebIDBKey::NullType: |
| 52 return WebIDBKey::createNull(); | 52 return WebIDBKey::createNull(); |
| 53 case WebIDBKey::StringType: | 53 case WebIDBKey::StringType: |
| 54 return WebIDBKey(string_); | 54 return WebIDBKey(string_); |
| 55 case WebIDBKey::NumberType: | 55 case WebIDBKey::NumberType: |
| 56 return WebIDBKey(number_); | 56 return WebIDBKey(number_); |
| 57 case WebIDBKey::InvalidType: | 57 case WebIDBKey::InvalidType: |
| 58 return WebIDBKey::createInvalid(); | 58 return WebIDBKey::createInvalid(); |
| 59 default: |
| 60 // TODO(hans): Implement the WebIDBKey::DateType case once that is added |
| 61 // WebKit side, and then remove this temporary default: clause. |
| 62 return WebIDBKey::createInvalid(); |
| 59 } | 63 } |
| 60 NOTREACHED(); | 64 NOTREACHED(); |
| 61 return WebIDBKey::createInvalid(); | 65 return WebIDBKey::createInvalid(); |
| 62 } | 66 } |
| OLD | NEW |