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

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

Issue 21646004: Compressed activity log database storage (Closed) Base URL: http://git.chromium.org/chromium/src.git@refactor-cleanups
Patch Set: 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_LOG_POLICY_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_POLICY_H_
6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_POLICY_H_ 6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_POLICY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // 45 //
46 // Since every policy implementation might summarize data differently, the 46 // Since every policy implementation might summarize data differently, the
47 // database implementation is policy-specific and therefore completely 47 // database implementation is policy-specific and therefore completely
48 // encapsulated in the policy class. All the member functions can be called 48 // encapsulated in the policy class. All the member functions can be called
49 // on the UI thread. 49 // on the UI thread.
50 class ActivityLogPolicy { 50 class ActivityLogPolicy {
51 public: 51 public:
52 enum PolicyType { 52 enum PolicyType {
53 POLICY_FULLSTREAM, 53 POLICY_FULLSTREAM,
54 POLICY_NOARGS, 54 POLICY_NOARGS,
55 POLICY_COUNTS,
55 POLICY_INVALID, 56 POLICY_INVALID,
56 }; 57 };
57 58
58 // For all subclasses, add all the key types they might support here. 59 // For all subclasses, add all the key types they might support here.
59 // The actual key is returned by calling GetKey(KeyType). The subclasses 60 // The actual key is returned by calling GetKey(KeyType). The subclasses
60 // are free to return an empty string for keys they don't support. 61 // are free to return an empty string for keys they don't support.
61 // For every key added here, you should update the GetKey member function 62 // For every key added here, you should update the GetKey member function
62 // for at least one policy. 63 // for at least one policy.
63 enum KeyType { 64 enum KeyType {
64 PARAM_KEY_REASON, // Why an action was blocked 65 PARAM_KEY_REASON, // Why an action was blocked
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 170
170 private: 171 private:
171 // See the comments for the ActivityDatabase class for a discussion of how 172 // See the comments for the ActivityDatabase class for a discussion of how
172 // database cleanup runs. 173 // database cleanup runs.
173 ActivityDatabase* db_; 174 ActivityDatabase* db_;
174 }; 175 };
175 176
176 } // namespace extensions 177 } // namespace extensions
177 178
178 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_POLICY_H_ 179 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_POLICY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698