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

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

Issue 932143003: IndexedDB: Report QuotaExceededError when commit fails due to disk full (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move IndexedDBDatabaseError impl to cc file Created 5 years, 10 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
OLDNEW
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 "base/basictypes.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 class IndexedDBDatabaseError { 14 class IndexedDBDatabaseError {
15 public: 15 public:
16 explicit IndexedDBDatabaseError(uint16 code) : code_(code) {} 16 IndexedDBDatabaseError();
17 IndexedDBDatabaseError(uint16 code, const char* message) 17 explicit IndexedDBDatabaseError(uint16 code);
18 : code_(code), message_(base::ASCIIToUTF16(message)) {} 18 IndexedDBDatabaseError(uint16 code, const char* message);
19 IndexedDBDatabaseError(uint16 code, const base::string16& message) 19 IndexedDBDatabaseError(uint16 code, const base::string16& message);
20 : code_(code), message_(message) {} 20 ~IndexedDBDatabaseError();
21 ~IndexedDBDatabaseError() {} 21
22 IndexedDBDatabaseError& operator=(const IndexedDBDatabaseError& rhs);
22 23
23 uint16 code() const { return code_; } 24 uint16 code() const { return code_; }
24 const base::string16& message() const { return message_; } 25 const base::string16& message() const { return message_; }
25 26
26 private: 27 private:
27 const uint16 code_; 28 uint16 code_ = 0;
28 const base::string16 message_; 29 base::string16 message_;
29
30 DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabaseError);
31 }; 30 };
32 31
33 } // namespace content 32 } // namespace content
34 33
35 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_ERROR_H_ 34 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_ERROR_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_browsertest.cc ('k') | content/browser/indexed_db/indexed_db_database_error.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698