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

Side by Side Diff: chrome/browser/extensions/activity_log/activity_actions.h

Issue 21646004: Compressed activity log database storage (Closed) Base URL: http://git.chromium.org/chromium/src.git@refactor-cleanups
Patch Set: Delete a debugging log message Created 7 years, 4 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
« 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 <vector> 9 #include <vector>
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 bool page_incognito() const { return page_incognito_; } 91 bool page_incognito() const { return page_incognito_; }
92 void set_page_incognito(bool incognito) { page_incognito_ = incognito; } 92 void set_page_incognito(bool incognito) { page_incognito_ = incognito; }
93 bool arg_incognito() const { return arg_incognito_; } 93 bool arg_incognito() const { return arg_incognito_; }
94 void set_arg_incognito(bool incognito) { arg_incognito_ = incognito; } 94 void set_arg_incognito(bool incognito) { arg_incognito_ = incognito; }
95 95
96 // A dictionary where any additional data can be stored. 96 // A dictionary where any additional data can be stored.
97 const DictionaryValue* other() const { return other_.get(); } 97 const DictionaryValue* other() const { return other_.get(); }
98 void set_other(scoped_ptr<DictionaryValue> other); 98 void set_other(scoped_ptr<DictionaryValue> other);
99 DictionaryValue* mutable_other(); 99 DictionaryValue* mutable_other();
100 100
101 // Helper methods for serializing and deserializing URLs into strings. If
102 // the URL is marked as incognito, then the string is prefixed with
103 // kIncognitoUrl ("<incognito>").
104 std::string SerializePageUrl() const;
105 void ParsePageUrl(const std::string& url);
106 std::string SerializeArgUrl() const;
107 void ParseArgUrl(const std::string& url);
108
101 // Flatten the activity's type-specific fields into an ExtensionActivity. 109 // Flatten the activity's type-specific fields into an ExtensionActivity.
102 scoped_ptr<api::activity_log_private::ExtensionActivity> 110 scoped_ptr<api::activity_log_private::ExtensionActivity>
103 ConvertToExtensionActivity(); 111 ConvertToExtensionActivity();
104 112
105 // Print an action as a regular string for debugging purposes. 113 // Print an action as a regular string for debugging purposes.
106 std::string PrintForDebug(); 114 virtual std::string PrintForDebug() const;
107 115
108 protected: 116 protected:
109 virtual ~Action(); 117 virtual ~Action();
110 118
111 private: 119 private:
112 friend class base::RefCountedThreadSafe<Action>; 120 friend class base::RefCountedThreadSafe<Action>;
113 121
114 std::string extension_id_; 122 std::string extension_id_;
115 base::Time time_; 123 base::Time time_;
116 api::activity_log_private::ExtensionActivity::ActivityType activity_type_; 124 api::activity_log_private::ExtensionActivity::ActivityType activity_type_;
117 ActionType action_type_; 125 ActionType action_type_;
118 std::string api_name_; 126 std::string api_name_;
119 scoped_ptr<ListValue> args_; 127 scoped_ptr<ListValue> args_;
120 GURL page_url_; 128 GURL page_url_;
121 std::string page_title_; 129 std::string page_title_;
122 bool page_incognito_; 130 bool page_incognito_;
123 GURL arg_url_; 131 GURL arg_url_;
124 bool arg_incognito_; 132 bool arg_incognito_;
125 scoped_ptr<DictionaryValue> other_; 133 scoped_ptr<DictionaryValue> other_;
126 134
127 DISALLOW_COPY_AND_ASSIGN(Action); 135 DISALLOW_COPY_AND_ASSIGN(Action);
128 }; 136 };
129 137
130 } // namespace extensions 138 } // namespace extensions
131 139
132 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_ 140 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_
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