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

Side by Side Diff: sql/diagnostic_error_delegate.h

Issue 7353026: Move app/sql/* files to sql/ directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 9 years, 5 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
« no previous file with comments | « sql/connection_unittest.cc ('k') | sql/init_status.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 APP_SQL_DIAGNOSTIC_ERROR_DELEGATE_H_ 5 #ifndef SQL_DIAGNOSTIC_ERROR_DELEGATE_H_
6 #define APP_SQL_DIAGNOSTIC_ERROR_DELEGATE_H_ 6 #define SQL_DIAGNOSTIC_ERROR_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "app/sql/connection.h"
10 #include "base/logging.h" 9 #include "base/logging.h"
11 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
11 #include "sql/connection.h"
12 12
13 namespace sql { 13 namespace sql {
14 14
15 // This class handles the exceptional sqlite errors that we might encounter 15 // This class handles the exceptional sqlite errors that we might encounter
16 // if for example the db is corrupted. Right now we just generate a UMA 16 // if for example the db is corrupted. Right now we just generate a UMA
17 // histogram for release and an assert for debug builds. 17 // histogram for release and an assert for debug builds.
18 // 18 //
19 // Why is it a template you ask? well, that is a funny story. The histograms 19 // Why is it a template you ask? well, that is a funny story. The histograms
20 // need to be singletons that is why they are always static at the function 20 // need to be singletons that is why they are always static at the function
21 // scope, but we cannot use the Singleton class because they are not default 21 // scope, but we cannot use the Singleton class because they are not default
(...skipping 18 matching lines...) Expand all
40 error &= 0xff; 40 error &= 0xff;
41 41
42 // The histogram values from sqlite result codes go currently from 1 to 42 // The histogram values from sqlite result codes go currently from 1 to
43 // 26 currently but 50 gives them room to grow. 43 // 26 currently but 50 gives them room to grow.
44 UMA_HISTOGRAM_ENUMERATION(UniqueT::name(), error, 50); 44 UMA_HISTOGRAM_ENUMERATION(UniqueT::name(), error, 50);
45 } 45 }
46 }; 46 };
47 47
48 } // namespace sql 48 } // namespace sql
49 49
50 #endif // APP_SQL_DIAGNOSTIC_ERROR_DELEGATE_H_ 50 #endif // SQL_DIAGNOSTIC_ERROR_DELEGATE_H_
OLDNEW
« no previous file with comments | « sql/connection_unittest.cc ('k') | sql/init_status.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698