| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/extensions/activity_log/activity_log.h" | 5 #include "chrome/browser/extensions/activity_log/activity_log.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 observers_->AddObserver(observer); | 505 observers_->AddObserver(observer); |
| 506 } | 506 } |
| 507 | 507 |
| 508 void ActivityLog::RemoveObserver(ActivityLog::Observer* observer) { | 508 void ActivityLog::RemoveObserver(ActivityLog::Observer* observer) { |
| 509 observers_->RemoveObserver(observer); | 509 observers_->RemoveObserver(observer); |
| 510 } | 510 } |
| 511 | 511 |
| 512 // static | 512 // static |
| 513 void ActivityLog::RegisterProfilePrefs( | 513 void ActivityLog::RegisterProfilePrefs( |
| 514 user_prefs::PrefRegistrySyncable* registry) { | 514 user_prefs::PrefRegistrySyncable* registry) { |
| 515 registry->RegisterIntegerPref( | 515 registry->RegisterIntegerPref(prefs::kWatchdogExtensionActive, false); |
| 516 prefs::kWatchdogExtensionActive, | |
| 517 false, | |
| 518 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | |
| 519 } | 516 } |
| 520 | 517 |
| 521 // LOG ACTIONS. ---------------------------------------------------------------- | 518 // LOG ACTIONS. ---------------------------------------------------------------- |
| 522 | 519 |
| 523 void ActivityLog::LogAction(scoped_refptr<Action> action) { | 520 void ActivityLog::LogAction(scoped_refptr<Action> action) { |
| 524 if (ActivityLogAPI::IsExtensionWhitelisted(action->extension_id())) | 521 if (ActivityLogAPI::IsExtensionWhitelisted(action->extension_id())) |
| 525 return; | 522 return; |
| 526 | 523 |
| 527 // Perform some preprocessing of the Action data: convert tab IDs to URLs and | 524 // Perform some preprocessing of the Action data: convert tab IDs to URLs and |
| 528 // mask out incognito URLs if appropriate. | 525 // mask out incognito URLs if appropriate. |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 database_policy_->DeleteDatabase(); | 671 database_policy_->DeleteDatabase(); |
| 675 } | 672 } |
| 676 | 673 |
| 677 template <> | 674 template <> |
| 678 void BrowserContextKeyedAPIFactory<ActivityLog>::DeclareFactoryDependencies() { | 675 void BrowserContextKeyedAPIFactory<ActivityLog>::DeclareFactoryDependencies() { |
| 679 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); | 676 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); |
| 680 DependsOn(ExtensionRegistryFactory::GetInstance()); | 677 DependsOn(ExtensionRegistryFactory::GetInstance()); |
| 681 } | 678 } |
| 682 | 679 |
| 683 } // namespace extensions | 680 } // namespace extensions |
| OLD | NEW |