| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 true, | 401 true, |
| 402 base::Bind(&RemoveHistoryTester::SaveResultAndQuit, | 402 base::Bind(&RemoveHistoryTester::SaveResultAndQuit, |
| 403 base::Unretained(this)), | 403 base::Unretained(this)), |
| 404 &tracker_); | 404 &tracker_); |
| 405 message_loop_runner->Run(); | 405 message_loop_runner->Run(); |
| 406 return query_url_success_; | 406 return query_url_success_; |
| 407 } | 407 } |
| 408 | 408 |
| 409 void AddHistory(const GURL& url, base::Time time) { | 409 void AddHistory(const GURL& url, base::Time time) { |
| 410 history_service_->AddPage(url, time, NULL, 0, GURL(), | 410 history_service_->AddPage(url, time, NULL, 0, GURL(), |
| 411 history::RedirectList(), content::PAGE_TRANSITION_LINK, | 411 history::RedirectList(), ui::PAGE_TRANSITION_LINK, |
| 412 history::SOURCE_BROWSED, false); | 412 history::SOURCE_BROWSED, false); |
| 413 } | 413 } |
| 414 | 414 |
| 415 private: | 415 private: |
| 416 // Callback for HistoryService::QueryURL. | 416 // Callback for HistoryService::QueryURL. |
| 417 void SaveResultAndQuit(bool success, | 417 void SaveResultAndQuit(bool success, |
| 418 const history::URLRow&, | 418 const history::URLRow&, |
| 419 const history::VisitVector&) { | 419 const history::VisitVector&) { |
| 420 query_url_success_ = success; | 420 query_url_success_ = success; |
| 421 quit_closure_.Run(); | 421 quit_closure_.Run(); |
| (...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1830 EXPECT_EQ(1u, tester.clear_count()); | 1830 EXPECT_EQ(1u, tester.clear_count()); |
| 1831 EXPECT_EQ(CLEAR_CONTEXTS, tester.last_clear_mode()); | 1831 EXPECT_EQ(CLEAR_CONTEXTS, tester.last_clear_mode()); |
| 1832 } | 1832 } |
| 1833 | 1833 |
| 1834 TEST_F(BrowsingDataRemoverTest, DomainReliability_NoMonitor) { | 1834 TEST_F(BrowsingDataRemoverTest, DomainReliability_NoMonitor) { |
| 1835 BlockUntilBrowsingDataRemoved( | 1835 BlockUntilBrowsingDataRemoved( |
| 1836 BrowsingDataRemover::EVERYTHING, | 1836 BrowsingDataRemover::EVERYTHING, |
| 1837 BrowsingDataRemover::REMOVE_HISTORY | | 1837 BrowsingDataRemover::REMOVE_HISTORY | |
| 1838 BrowsingDataRemover::REMOVE_COOKIES, false); | 1838 BrowsingDataRemover::REMOVE_COOKIES, false); |
| 1839 } | 1839 } |
| OLD | NEW |