[Mac] Implement Ambient Light API
[chromium-blink-merge.git] / content / browser / indexed_db / indexed_db_database_error.h
blob25b5ea6ed1cc81cae9614027aa8bd3d4bb3804e1
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_ERROR_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_ERROR_H_
8 #include "base/basictypes.h"
9 #include "base/strings/string16.h"
10 #include "base/strings/utf_string_conversions.h"
12 namespace content {
14 class IndexedDBDatabaseError {
15 public:
16 explicit IndexedDBDatabaseError(uint16 code) : code_(code) {}
17 IndexedDBDatabaseError(uint16 code, const char* message)
18 : code_(code), message_(base::ASCIIToUTF16(message)) {}
19 IndexedDBDatabaseError(uint16 code, const base::string16& message)
20 : code_(code), message_(message) {}
21 ~IndexedDBDatabaseError() {}
23 uint16 code() const { return code_; }
24 const base::string16& message() const { return message_; }
26 private:
27 const uint16 code_;
28 const base::string16 message_;
30 DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabaseError);
33 } // namespace content
35 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_ERROR_H_