OLD | NEW |
---|---|
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_ACTIVITY_LOG_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
111 // Clean up URLs from the activity log database. | 111 // Clean up URLs from the activity log database. |
112 // If restrict_urls is empty then all URLs in the activity log database are | 112 // If restrict_urls is empty then all URLs in the activity log database are |
113 // removed, otherwise only those in restrict_urls are removed. | 113 // removed, otherwise only those in restrict_urls are removed. |
114 void RemoveURLs(const std::vector<GURL>& restrict_urls); | 114 void RemoveURLs(const std::vector<GURL>& restrict_urls); |
115 void RemoveURLs(const std::set<GURL>& restrict_urls); | 115 void RemoveURLs(const std::set<GURL>& restrict_urls); |
116 void RemoveURL(const GURL& url); | 116 void RemoveURL(const GURL& url); |
117 | 117 |
118 // Deletes the database associated with the policy that's currently in use. | 118 // Deletes the database associated with the policy that's currently in use. |
119 void DeleteDatabase(); | 119 void DeleteDatabase(); |
120 | 120 |
121 bool is_active() const { return is_active_; } | |
asargent_no_longer_on_chrome
2016/06/23 13:35:56
nit: this could use a comment with an explanation
Devlin
2016/06/23 16:59:02
There is a comment on the |is_active_|, and I thin
| |
122 | |
121 // If we're in a browser test, we need to pretend that the watchdog app is | 123 // If we're in a browser test, we need to pretend that the watchdog app is |
122 // active. | 124 // active. |
123 void SetWatchdogAppActiveForTesting(bool active); | 125 void SetWatchdogAppActiveForTesting(bool active); |
124 | 126 |
125 private: | 127 private: |
126 friend class ActivityLogTest; | 128 friend class ActivityLogTest; |
127 friend class BrowserContextKeyedAPIFactory<ActivityLog>; | 129 friend class BrowserContextKeyedAPIFactory<ActivityLog>; |
128 | 130 |
129 explicit ActivityLog(content::BrowserContext* context); | 131 explicit ActivityLog(content::BrowserContext* context); |
130 ~ActivityLog() override; | 132 ~ActivityLog() override; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
216 FRIEND_TEST_ALL_PREFIXES(ActivityLogEnabledTest, WatchdogSwitch); | 218 FRIEND_TEST_ALL_PREFIXES(ActivityLogEnabledTest, WatchdogSwitch); |
217 DISALLOW_COPY_AND_ASSIGN(ActivityLog); | 219 DISALLOW_COPY_AND_ASSIGN(ActivityLog); |
218 }; | 220 }; |
219 | 221 |
220 template <> | 222 template <> |
221 void BrowserContextKeyedAPIFactory<ActivityLog>::DeclareFactoryDependencies(); | 223 void BrowserContextKeyedAPIFactory<ActivityLog>::DeclareFactoryDependencies(); |
222 | 224 |
223 } // namespace extensions | 225 } // namespace extensions |
224 | 226 |
225 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_H_ | 227 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_H_ |
OLD | NEW |