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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
420 | 420 |
421 // static | 421 // static |
422 void ActivityLog::RegisterProfilePrefs( | 422 void ActivityLog::RegisterProfilePrefs( |
423 user_prefs::PrefRegistrySyncable* registry) { | 423 user_prefs::PrefRegistrySyncable* registry) { |
424 registry->RegisterBooleanPref( | 424 registry->RegisterBooleanPref( |
425 prefs::kWatchdogExtensionActive, | 425 prefs::kWatchdogExtensionActive, |
426 false, | 426 false, |
427 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 427 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
428 } | 428 } |
429 | 429 |
430 void ActivityLog::RemoveURLs(const std::vector<GURL>& restrict_urls) { | |
431 if (!IsLogEnabled()) { | |
felt
2013/08/27 19:59:03
I don't think the DLOG is needed -- I think just r
karenlees
2013/08/27 21:13:25
Done.
| |
432 DLOG(INFO) << "Log not enabled for this profile."; | |
433 return; | |
434 } | |
435 policy_->RemoveURLs(restrict_urls); | |
436 } | |
437 | |
438 void ActivityLog::RemoveURLs(const std::set<GURL>& restrict_urls) { | |
439 if (!IsLogEnabled()) { | |
440 DLOG(INFO) << "Log not enabled for this profile."; | |
441 return; | |
442 } | |
443 | |
444 std::vector<GURL> urls; | |
445 for (std::set<GURL>::iterator it = restrict_urls.begin(); | |
446 it != restrict_urls.end(); ++it) { | |
447 urls.push_back(*it); | |
448 } | |
449 policy_->RemoveURLs(urls); | |
450 } | |
451 | |
452 void ActivityLog::RemoveURL(const GURL& url) { | |
453 if (url.is_empty()) | |
454 return; | |
455 std::vector<GURL> urls; | |
456 urls.push_back(url); | |
457 RemoveURLs(urls); | |
458 } | |
459 | |
430 } // namespace extensions | 460 } // namespace extensions |
OLD | NEW |