| OLD | NEW |
| 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_DATABASE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_DATABASE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_DATABASE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_DATABASE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 sql::Connection* GetSqlConnection(); | 181 sql::Connection* GetSqlConnection(); |
| 182 | 182 |
| 183 // A reference a Delegate for policy-specific database behavior. See the | 183 // A reference a Delegate for policy-specific database behavior. See the |
| 184 // top-level comment for ActivityDatabase for comments on cleanup. | 184 // top-level comment for ActivityDatabase for comments on cleanup. |
| 185 Delegate* delegate_; | 185 Delegate* delegate_; |
| 186 | 186 |
| 187 sql::Connection db_; | 187 sql::Connection db_; |
| 188 bool valid_db_; | 188 bool valid_db_; |
| 189 bool batch_mode_; | 189 bool batch_mode_; |
| 190 base::TimeDelta batching_period_; | 190 base::TimeDelta batching_period_; |
| 191 base::RepeatingTimer<ActivityDatabase> timer_; | 191 base::RepeatingTimer timer_; |
| 192 bool already_closed_; | 192 bool already_closed_; |
| 193 bool did_init_; | 193 bool did_init_; |
| 194 | 194 |
| 195 friend class ActivityLogDatabasePolicy; | 195 friend class ActivityLogDatabasePolicy; |
| 196 FRIEND_TEST_ALL_PREFIXES(ActivityDatabaseTest, BatchModeOff); | 196 FRIEND_TEST_ALL_PREFIXES(ActivityDatabaseTest, BatchModeOff); |
| 197 FRIEND_TEST_ALL_PREFIXES(ActivityDatabaseTest, BatchModeOn); | 197 FRIEND_TEST_ALL_PREFIXES(ActivityDatabaseTest, BatchModeOn); |
| 198 FRIEND_TEST_ALL_PREFIXES(ActivityDatabaseTest, BatchModeFlush); | 198 FRIEND_TEST_ALL_PREFIXES(ActivityDatabaseTest, BatchModeFlush); |
| 199 DISALLOW_COPY_AND_ASSIGN(ActivityDatabase); | 199 DISALLOW_COPY_AND_ASSIGN(ActivityDatabase); |
| 200 }; | 200 }; |
| 201 | 201 |
| 202 } // namespace extensions | 202 } // namespace extensions |
| 203 | 203 |
| 204 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_DATABASE_H_ | 204 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_DATABASE_H_ |
| OLD | NEW |