| 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 |
| 11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/ref_counted_memory.h" | 14 #include "base/memory/ref_counted_memory.h" |
| 15 #include "base/synchronization/lock.h" | 15 #include "base/synchronization/lock.h" |
| 16 #include "base/timer/timer.h" | 16 #include "base/timer/timer.h" |
| 17 #include "chrome/browser/extensions/activity_log/activity_actions.h" | 17 #include "chrome/browser/extensions/activity_log/activity_actions.h" |
| 18 #include "extensions/common/extension.h" | 18 #include "extensions/common/extension.h" |
| 19 #include "sql/connection.h" | 19 #include "sql/connection.h" |
| 20 | 20 |
| 21 namespace base { | 21 namespace base { |
| 22 class Clock; | |
| 23 class FilePath; | 22 class FilePath; |
| 24 } | 23 } |
| 25 | 24 |
| 26 namespace extensions { | 25 namespace extensions { |
| 27 | 26 |
| 28 // Encapsulates the SQL connection for the activity log database. This class | 27 // Encapsulates the SQL connection for the activity log database. This class |
| 29 // holds the database connection and has methods for writing. All of the | 28 // holds the database connection and has methods for writing. All of the |
| 30 // methods except the constructor need to be called on the DB thread. | 29 // methods except the constructor need to be called on the DB thread. |
| 31 // | 30 // |
| 32 // Object ownership and lifetime is a bit complicated for ActivityLog, | 31 // Object ownership and lifetime is a bit complicated for ActivityLog, |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 friend class ActivityLogDatabasePolicy; | 194 friend class ActivityLogDatabasePolicy; |
| 196 FRIEND_TEST_ALL_PREFIXES(ActivityDatabaseTest, BatchModeOff); | 195 FRIEND_TEST_ALL_PREFIXES(ActivityDatabaseTest, BatchModeOff); |
| 197 FRIEND_TEST_ALL_PREFIXES(ActivityDatabaseTest, BatchModeOn); | 196 FRIEND_TEST_ALL_PREFIXES(ActivityDatabaseTest, BatchModeOn); |
| 198 FRIEND_TEST_ALL_PREFIXES(ActivityDatabaseTest, BatchModeFlush); | 197 FRIEND_TEST_ALL_PREFIXES(ActivityDatabaseTest, BatchModeFlush); |
| 199 DISALLOW_COPY_AND_ASSIGN(ActivityDatabase); | 198 DISALLOW_COPY_AND_ASSIGN(ActivityDatabase); |
| 200 }; | 199 }; |
| 201 | 200 |
| 202 } // namespace extensions | 201 } // namespace extensions |
| 203 | 202 |
| 204 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_DATABASE_H_ | 203 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_DATABASE_H_ |
| OLD | NEW |