OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_ERROR_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_ERROR_H_ |
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_ERROR_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_ERROR_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include <stdint.h> |
| 9 |
9 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
10 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
11 | 12 |
12 namespace content { | 13 namespace content { |
13 | 14 |
14 class IndexedDBDatabaseError { | 15 class IndexedDBDatabaseError { |
15 public: | 16 public: |
16 IndexedDBDatabaseError(); | 17 IndexedDBDatabaseError(); |
17 explicit IndexedDBDatabaseError(uint16 code); | 18 explicit IndexedDBDatabaseError(uint16_t code); |
18 IndexedDBDatabaseError(uint16 code, const char* message); | 19 IndexedDBDatabaseError(uint16_t code, const char* message); |
19 IndexedDBDatabaseError(uint16 code, const base::string16& message); | 20 IndexedDBDatabaseError(uint16_t code, const base::string16& message); |
20 ~IndexedDBDatabaseError(); | 21 ~IndexedDBDatabaseError(); |
21 | 22 |
22 IndexedDBDatabaseError& operator=(const IndexedDBDatabaseError& rhs); | 23 IndexedDBDatabaseError& operator=(const IndexedDBDatabaseError& rhs); |
23 | 24 |
24 uint16 code() const { return code_; } | 25 uint16_t code() const { return code_; } |
25 const base::string16& message() const { return message_; } | 26 const base::string16& message() const { return message_; } |
26 | 27 |
27 private: | 28 private: |
28 uint16 code_ = 0; | 29 uint16_t code_ = 0; |
29 base::string16 message_; | 30 base::string16 message_; |
30 }; | 31 }; |
31 | 32 |
32 } // namespace content | 33 } // namespace content |
33 | 34 |
34 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_ERROR_H_ | 35 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_ERROR_H_ |
OLD | NEW |