| Index: sql/connection.h
|
| diff --git a/sql/connection.h b/sql/connection.h
|
| index cebc774fa57a2f80b4600edeae5dddb55e343c98..ffc3d65be287c4787358035fdef2440ad3a2bb71 100644
|
| --- a/sql/connection.h
|
| +++ b/sql/connection.h
|
| @@ -146,13 +146,17 @@ class SQL_EXPORT Connection {
|
| error_delegate_.reset(delegate);
|
| }
|
|
|
| - // SQLite error codes for errors on all connections are logged to
|
| - // enum histogram "Sqlite.Error". Setting this additionally logs
|
| - // errors to the histogram |name|.
|
| - void set_error_histogram_name(const std::string& name) {
|
| - error_histogram_name_ = name;
|
| + // Set this prefix to enable additional connection-type
|
| + // histogramming for SQLite error codes and database version
|
| + // numbers.
|
| + void set_histogram_prefix(const std::string& prefix) {
|
| + histogram_prefix_ = prefix;
|
| }
|
|
|
| + // Record a sparse UMA histogram sample under |histogram_prefix_|+|suffix|.
|
| + // If |histogram_prefix_| is empty, no histogram is recorded.
|
| + void AddSparseHistogram(const std::string& suffix, size_t sample) const;
|
| +
|
| // Initialization ------------------------------------------------------------
|
|
|
| // Initializes the SQL connection for the given file, returning true if the
|
| @@ -497,8 +501,8 @@ class SQL_EXPORT Connection {
|
| // commands or statements. It can be null which means default handling.
|
| scoped_ptr<ErrorDelegate> error_delegate_;
|
|
|
| - // Auxiliary error-code histogram.
|
| - std::string error_histogram_name_;
|
| + // Prefix for auxiliary histograms.
|
| + std::string histogram_prefix_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(Connection);
|
| };
|
|
|