OLD | NEW |
(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 "base/logging.h" |
| 8 #include "base/time.h" |
| 9 #include "chrome/browser/extensions/activity_log/activity_log_policy.h" |
| 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/common/extensions/extension.h" |
| 12 #include "googleurl/src/gurl.h" |
| 13 |
| 14 using base::TimeDelta; |
| 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); |
| 25 } |
| 26 |
| 27 ActivityLogPolicy::~ActivityLogPolicy() { |
| 28 timer_.Stop(); |
| 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 |
OLD | NEW |