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

Unified Diff: chrome/browser/extensions/activity_log/activity_log_policy.cc

Issue 15573003: New architecture of the activity logging: Policies for summarization (and compression) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed browser test. Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
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..21d9debc3d515853d3e8d0d0375fe6d0ccc4846a
--- /dev/null
+++ b/chrome/browser/extensions/activity_log/activity_log_policy.cc
@@ -0,0 +1,37 @@
+// 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) {
+ 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();
+}
+
+std::string ActivityLogPolicy::GetKey(KeyType) const {
+ return std::string();
+}
+
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698