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

Unified Diff: chrome/browser/extensions/activity_log/blocked_actions.h

Issue 14774012: Replaced enum strings with ints in Activity Log database (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing Singleton dep Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/activity_log/blocked_actions.h
diff --git a/chrome/browser/extensions/activity_log/blocked_actions.h b/chrome/browser/extensions/activity_log/blocked_actions.h
index 0b1ca9992e2032efa7f23c1214ca5caf4cd045df..930b70a5ac4d81e27486e9245ea3e3cc08a06b1d 100644
--- a/chrome/browser/extensions/activity_log/blocked_actions.h
+++ b/chrome/browser/extensions/activity_log/blocked_actions.h
@@ -13,14 +13,17 @@ namespace extensions {
// See APIActions for API calls that succeeded.
class BlockedAction : public Action {
public:
+ // These values should not be changed. Append any additional values to the
+ // end with sequential numbers.
enum Reason {
- UNKNOWN,
- ACCESS_DENIED,
- QUOTA_EXCEEDED,
+ UNKNOWN = 0,
+ ACCESS_DENIED = 1,
+ QUOTA_EXCEEDED = 2,
};
static const char* kTableName;
static const char* kTableContentFields[];
+ static const char* kTableFieldTypes[];
// Create a new database table for storing BlockedActions, or update the
// schema if it is out of date. Any existing data is preserved.
@@ -48,9 +51,8 @@ class BlockedAction : public Action {
const std::string& args() const { return args_; }
const std::string& extra() const { return extra_; }
- // Helper methods for handling the Reason.
+ // Helper method for debugging.
std::string ReasonAsString() const;
- static Reason StringAsReason(const std::string& reason);
protected:
virtual ~BlockedAction();
« no previous file with comments | « chrome/browser/extensions/activity_log/api_name_constants.h ('k') | chrome/browser/extensions/activity_log/blocked_actions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698