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

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

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 3 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 (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
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_
OLDNEW
« no previous file with comments | « chrome/browser/enumerate_modules_model_win.h ('k') | chrome/browser/extensions/api/audio_modem/audio_modem_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698