Index: chrome/browser/extensions/activity_log/activity_log_policy.cc |
diff --git a/chrome/browser/extensions/activity_log/activity_log_policy.cc b/chrome/browser/extensions/activity_log/activity_log_policy.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fbf53244e620f8d10216b03c99d67a2002eb2e62 |
--- /dev/null |
+++ b/chrome/browser/extensions/activity_log/activity_log_policy.cc |
@@ -0,0 +1,39 @@ |
+// Copyright 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include <stdint.h> |
+ |
+#include "base/logging.h" |
+#include "base/time.h" |
+#include "chrome/browser/extensions/activity_log/activity_log_policy.h" |
+#include "chrome/browser/profiles/profile.h" |
+#include "chrome/common/extensions/extension.h" |
+#include "googleurl/src/gurl.h" |
+ |
+using base::TimeDelta; |
+ |
+namespace extensions { |
+ |
+ActivityLogPolicy::ActivityLogPolicy(Profile* profile, |
+ content::BrowserThread::ID thread_id) |
+ : dispatch_thread_(thread_id) { |
+ CHECK(profile && "Null ptr dereference"); |
+ profile_base_path_ = profile->GetPath(); |
+ timer_.Start(FROM_HERE, TimeDelta::FromMinutes(2), this, |
+ &ActivityLogPolicy::SaveState); |
+} |
+ |
+ActivityLogPolicy::~ActivityLogPolicy() { |
+ timer_.Stop(); |
+} |
+ |
+void ActivityLogPolicy::SetSaveStateOnRequestOnly() { |
+ timer_.Stop(); |
+} |
+ |
+void ActivityLogPolicy::GetKey(KeyType, std::string* key) const { |
+ *key = ""; |
+} |
+ |
+} // namespace extensions |