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

Side by Side 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: A few more fixes :-( Created 7 years, 7 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
(Empty)
1 // Copyright $YEAR The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <stdint.h>
6
7 #include "chrome/browser/extensions/activity_log/activity_log_policy.h"
8 #include "base/logging.h"
9 #include "base/time.h"
10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/common/extensions/extension.h"
12 #include "googleurl/src/gurl.h"
13
14 using namespace base;
15
16 namespace extensions {
17
18 ActivityLogPolicy::ActivityLogPolicy(Profile* profile,
19 content::BrowserThread::ID thread_id)
20 : dispatch_thread_(thread_id) {
21 CHECK(profile && "Null ptr dereference");
22 profile_base_path_ = profile->GetPath();
23 timer_.Start(FROM_HERE, TimeDelta::FromMinutes(2), this,
24 &ActivityLogPolicy::SaveState);
felt 2013/05/24 18:43:38 OK, I was confused. I thought you were going to mo
dbabic 2013/05/28 21:11:49 I think we still need to implement this in Activit
felt 2013/05/29 03:41:15 Huh? The ActivityDatabase batching code isn't savi
dbabic 2013/05/29 18:41:40 Note that the current policies don't implement Sav
felt 2013/05/29 19:12:29 OK, so there will be two simultaneous timers going
felt 2013/05/29 19:22:35 Another thing that came to mind: when shutting dow
dbabic 2013/05/29 20:12:26 You are bringing up an interesting issue here. Te
felt 2013/05/29 21:05:36 Sounds good. In the past, there was an incident w
25 }
26
27 ActivityLogPolicy::~ActivityLogPolicy() {
28 SaveState();
29 }
30
31 void ActivityLogPolicy::SetSaveStateOnRequestOnly() {
32 timer_.Stop();
33 }
34
35 void ActivityLogPolicy::GetKey(KeyType, std::string& key) const {
36 key = "";
37 }
38
39 } // End of the extensions namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698