OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browsing_data/browsing_data_remover.h" | 5 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 return scoped_ptr<DomainReliabilityMonitor>(); | 595 return scoped_ptr<DomainReliabilityMonitor>(); |
596 } | 596 } |
597 | 597 |
598 virtual void ClearBrowsingData(DomainReliabilityClearMode clear_mode, | 598 virtual void ClearBrowsingData(DomainReliabilityClearMode clear_mode, |
599 const base::Closure& callback) OVERRIDE { | 599 const base::Closure& callback) OVERRIDE { |
600 clear_count_++; | 600 clear_count_++; |
601 last_clear_mode_ = clear_mode; | 601 last_clear_mode_ = clear_mode; |
602 callback.Run(); | 602 callback.Run(); |
603 } | 603 } |
604 | 604 |
| 605 virtual void GetWebUIData( |
| 606 const base::Callback<void(scoped_ptr<const base::Value>)>& callback) |
| 607 const OVERRIDE { |
| 608 NOTREACHED(); |
| 609 } |
| 610 |
605 int clear_count() const { return clear_count_; } | 611 int clear_count() const { return clear_count_; } |
606 | 612 |
607 DomainReliabilityClearMode last_clear_mode() const { | 613 DomainReliabilityClearMode last_clear_mode() const { |
608 return last_clear_mode_; | 614 return last_clear_mode_; |
609 } | 615 } |
610 | 616 |
611 private: | 617 private: |
612 unsigned clear_count_; | 618 unsigned clear_count_; |
613 DomainReliabilityClearMode last_clear_mode_; | 619 DomainReliabilityClearMode last_clear_mode_; |
614 }; | 620 }; |
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1780 EXPECT_EQ(1u, tester.clear_count()); | 1786 EXPECT_EQ(1u, tester.clear_count()); |
1781 EXPECT_EQ(CLEAR_CONTEXTS, tester.last_clear_mode()); | 1787 EXPECT_EQ(CLEAR_CONTEXTS, tester.last_clear_mode()); |
1782 } | 1788 } |
1783 | 1789 |
1784 TEST_F(BrowsingDataRemoverTest, DomainReliability_NoMonitor) { | 1790 TEST_F(BrowsingDataRemoverTest, DomainReliability_NoMonitor) { |
1785 BlockUntilBrowsingDataRemoved( | 1791 BlockUntilBrowsingDataRemoved( |
1786 BrowsingDataRemover::EVERYTHING, | 1792 BrowsingDataRemover::EVERYTHING, |
1787 BrowsingDataRemover::REMOVE_HISTORY | | 1793 BrowsingDataRemover::REMOVE_HISTORY | |
1788 BrowsingDataRemover::REMOVE_COOKIES, false); | 1794 BrowsingDataRemover::REMOVE_COOKIES, false); |
1789 } | 1795 } |
OLD | NEW |