Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: content/browser/indexed_db/indexed_db_database_error.h

Issue 15659013: Revert "Migrate the IndexedDB backend from Blink to Chromium" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_ERROR_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_ERROR_H_
7
8 #include "base/basictypes.h"
9 #include "base/logging.h"
10 #include "base/memory/ref_counted.h"
11 #include "base/string16.h"
12 #include "third_party/WebKit/Source/Platform/chromium/public/WebIDBDatabaseError .h"
13
14 namespace content {
15
16 class IndexedDBDatabaseError : public base::RefCounted<IndexedDBDatabaseError> {
17 public:
18 static scoped_refptr<IndexedDBDatabaseError> Create(uint16 code,
19 const string16& message) {
20 // TODO(jsbell): Assert that this is a valid WebIDBDatabaseException code.
21 return make_scoped_refptr(new IndexedDBDatabaseError(code, message));
22 }
23 static scoped_refptr<IndexedDBDatabaseError> Create(
24 const WebKit::WebIDBDatabaseError& other) {
25 return make_scoped_refptr(
26 new IndexedDBDatabaseError(other.code(), other.message()));
27 }
28
29 uint16 code() const { return code_; }
30 const string16& message() const { return message_; }
31
32 private:
33 IndexedDBDatabaseError(uint16 code, const string16& message)
34 : code_(code), message_(message) {}
35 ~IndexedDBDatabaseError() {}
36 friend class base::RefCounted<IndexedDBDatabaseError>;
37 const uint16 code_;
38 const string16 message_;
39 };
40
41 } // namespace content
42
43 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_ERROR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698