Chromium Code Reviews| Index: chrome/browser/extensions/activity_log/activity_log_policy.h |
| diff --git a/chrome/browser/extensions/activity_log/activity_log_policy.h b/chrome/browser/extensions/activity_log/activity_log_policy.h |
| index ce6ca0799182a0db67dcedb5994128f76dd3469d..d4267ff8437abfcd38a59b227f29ebf61555349c 100644 |
| --- a/chrome/browser/extensions/activity_log/activity_log_policy.h |
| +++ b/chrome/browser/extensions/activity_log/activity_log_policy.h |
| @@ -72,7 +72,8 @@ class ActivityLogPolicy { |
| // TODO(felt,dbabic) Since only ReadData uses thread_id, it would be |
| // cleaner to pass thread_id as a param of ReadData directly. |
| explicit ActivityLogPolicy(Profile* profile); |
| - virtual ~ActivityLogPolicy(); |
| + |
| + virtual void Close() = 0; |
| // Updates the internal state of the model summarizing actions and possibly |
| // writes to the database. Implements the default policy storing internal |
| @@ -115,6 +116,10 @@ class ActivityLogPolicy { |
| virtual std::string GetKey(KeyType key_id) const; |
| protected: |
| + // An ActivityLogPolicy is not directly destroyed. Instead, call Close() |
| + // which will cause the object to be deleted when it is safe. |
| + virtual ~ActivityLogPolicy(); |
| + |
| // The Schedule methods dispatch the calls to the database on a |
| // separate thread. We dispatch to the UI thread if the DB thread doesn't |
| // exist, which should only happen in tests where there is no DB thread. |
| @@ -145,6 +150,9 @@ class ActivityLogPolicy { |
| base::FilePath profile_base_path_; |
| base::RepeatingTimer<ActivityLogPolicy> timer_; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(ActivityLogPolicy); |
|
felt
2013/07/09 22:14:51
yikes. is this missing in other policy files too?
mvrable
2013/07/09 23:03:22
Yes, it was missing in the ActivityLogPolicy subcl
felt
2013/07/10 00:14:36
If it's inherited, then nevermind. Thanks for catc
|
| }; |
| } // namespace extensions |