summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/activity_log/activity_log_policy.cc
blob: 7fce2fbea9bb1289db542d787ae62a907fae5f94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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/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 "url/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