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

Unified Diff: chrome/browser/extensions/activity_log/dom_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/dom_actions.h
diff --git a/chrome/browser/extensions/activity_log/dom_actions.h b/chrome/browser/extensions/activity_log/dom_actions.h
index 6605726a9dc1a141ad2d137141b697a7e0be29f9..11e37ada659c448dd166b2755f97633d3f8f5e1e 100644
--- a/chrome/browser/extensions/activity_log/dom_actions.h
+++ b/chrome/browser/extensions/activity_log/dom_actions.h
@@ -15,18 +15,21 @@ namespace extensions {
// content script insertions.
class DOMAction : public Action {
public:
+ // These values should not be changed. Append any additional values to the
+ // end with sequential numbers.
enum DOMActionType {
- GETTER, // For Content Script DOM manipulations
- SETTER, // For Content Script DOM manipulations
- METHOD, // For Content Script DOM manipulations
- INSERTED, // For when Content Scripts are added to pages
- XHR, // When an extension core sends an XHR
- WEBREQUEST, // When a page request is modified with the WebRequest API
- MODIFIED, // For legacy, also used as a catch-all
+ GETTER = 0, // For Content Script DOM manipulations
+ SETTER = 1, // For Content Script DOM manipulations
+ METHOD = 2, // For Content Script DOM manipulations
+ INSERTED = 3, // For when Content Scripts are added to pages
+ XHR = 4, // When an extension core sends an XHR
+ WEBREQUEST = 5, // When a page request is modified with the WebRequest API
+ MODIFIED = 6, // For legacy, also used as a catch-all
};
static const char* kTableName;
static const char* kTableContentFields[];
+ static const char* kTableFieldTypes[];
// Create a new database table for storing DOMActions, or update the schema if
// it is out of date. Any existing data is preserved.
@@ -55,7 +58,7 @@ class DOMAction : public Action {
// Print a DOMAction as a regular string for debugging purposes.
virtual std::string PrintForDebug() OVERRIDE;
- // Helper methods for retrieving the values.
+ // Helper methods for retrieving the values and debugging.
std::string VerbAsString() const;
const GURL& url() const { return url_; }
const string16& url_title() const { return url_title_; }
@@ -63,9 +66,6 @@ class DOMAction : public Action {
const std::string& args() const { return args_; }
const std::string& extra() const { return extra_; }
- // Helper methods for restoring a DOMAction from the db.
- static DOMActionType StringAsDOMActionType(const std::string& str);
-
protected:
virtual ~DOMAction();
« no previous file with comments | « chrome/browser/extensions/activity_log/blocked_actions.cc ('k') | chrome/browser/extensions/activity_log/dom_actions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698