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

Side by Side Diff: chrome/browser/extensions/activity_log/activity_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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/activity_log/activity_actions.cc » ('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) 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 CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_
6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_ 6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_
7 7
8 #include <string> 8 #include <string>
9 #include "base/memory/ref_counted_memory.h" 9 #include "base/memory/ref_counted_memory.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 20 matching lines...) Expand all
31 virtual std::string PrintForDebug() = 0; 31 virtual std::string PrintForDebug() = 0;
32 32
33 const std::string& extension_id() const { return extension_id_; } 33 const std::string& extension_id() const { return extension_id_; }
34 const base::Time& time() const { return time_; } 34 const base::Time& time() const { return time_; }
35 35
36 protected: 36 protected:
37 Action(const std::string& extension_id, const base::Time& time); 37 Action(const std::string& extension_id, const base::Time& time);
38 virtual ~Action() {} 38 virtual ~Action() {}
39 39
40 // Initialize the table for a given action type. 40 // Initialize the table for a given action type.
41 // The content_fields array should list the names of all of the columns in
42 // the database. The field_types should specify the types of the corresponding
43 // columns (e.g., INTEGER or LONGVARCHAR). There should be the same number of
44 // field_types as content_fields, since the two arrays should correspond.
41 static bool InitializeTableInternal(sql::Connection* db, 45 static bool InitializeTableInternal(sql::Connection* db,
42 const char* table_name, 46 const char* table_name,
43 const char* content_fields[], 47 const char* content_fields[],
48 const char* field_types[],
44 const int num_content_fields); 49 const int num_content_fields);
45 50
46 private: 51 private:
47 friend class base::RefCountedThreadSafe<Action>; 52 friend class base::RefCountedThreadSafe<Action>;
48 53
49 std::string extension_id_; 54 std::string extension_id_;
50 base::Time time_; 55 base::Time time_;
51 56
52 DISALLOW_COPY_AND_ASSIGN(Action); 57 DISALLOW_COPY_AND_ASSIGN(Action);
53 }; 58 };
54 59
55 } // namespace extensions 60 } // namespace extensions
56 61
57 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_ 62 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_
58 63
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/activity_log/activity_actions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698