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

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

Issue 13726026: Added ActivityLog tests and associated bugfixes/extra logging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactored to remove strings from IPC Created 7 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_H_
6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_H_ 6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 // A map of extensions to activity observers for that extension. 193 // A map of extensions to activity observers for that extension.
194 ObserverMap observers_; 194 ObserverMap observers_;
195 195
196 // The database wrapper that does the actual database I/O. 196 // The database wrapper that does the actual database I/O.
197 scoped_refptr<extensions::ActivityDatabase> db_; 197 scoped_refptr<extensions::ActivityDatabase> db_;
198 198
199 // Whether to log activity to stdout or the UI. These are set by switches. 199 // Whether to log activity to stdout or the UI. These are set by switches.
200 bool log_activity_to_stdout_; 200 bool log_activity_to_stdout_;
201 bool log_activity_to_ui_; 201 bool log_activity_to_ui_;
202 202
203 // log_arguments controls whether to log API call arguments. By default, we 203 // testing_mode_ controls whether to log API call arguments. By default, we
204 // don't log most arguments to avoid saving too much data. In testing mode, 204 // don't log most arguments to avoid saving too much data. In testing mode,
205 // argument collection is enabled. We also whitelist some arguments for 205 // argument collection is enabled. We also whitelist some arguments for
206 // collection regardless of whether this bool is true. 206 // collection regardless of whether this bool is true.
207 bool log_arguments_; 207 bool testing_mode_;
208 base::hash_set<std::string> arg_whitelist_api_; 208 base::hash_set<std::string> arg_whitelist_api_;
209 209
210 DISALLOW_COPY_AND_ASSIGN(ActivityLog); 210 DISALLOW_COPY_AND_ASSIGN(ActivityLog);
211 }; 211 };
212 212
213 // Each profile has different extensions, so we keep a different database for 213 // Each profile has different extensions, so we keep a different database for
214 // each profile. 214 // each profile.
215 class ActivityLogFactory : public ProfileKeyedServiceFactory { 215 class ActivityLogFactory : public ProfileKeyedServiceFactory {
216 public: 216 public:
217 static ActivityLog* GetForProfile(Profile* profile) { 217 static ActivityLog* GetForProfile(Profile* profile) {
(...skipping 15 matching lines...) Expand all
233 233
234 virtual bool ServiceRedirectedInIncognito() const OVERRIDE; 234 virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
235 235
236 DISALLOW_COPY_AND_ASSIGN(ActivityLogFactory); 236 DISALLOW_COPY_AND_ASSIGN(ActivityLogFactory);
237 }; 237 };
238 238
239 239
240 } // namespace extensions 240 } // namespace extensions
241 241
242 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_H_ 242 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/activity_log.cc » ('j') | chrome/browser/extensions/activity_log.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698