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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 true, | 320 true, |
321 &consumer_, | 321 &consumer_, |
322 base::Bind(&RemoveHistoryTester::SaveResultAndQuit, | 322 base::Bind(&RemoveHistoryTester::SaveResultAndQuit, |
323 base::Unretained(this))); | 323 base::Unretained(this))); |
324 await_completion_.BlockUntilNotified(); | 324 await_completion_.BlockUntilNotified(); |
325 return query_url_success_; | 325 return query_url_success_; |
326 } | 326 } |
327 | 327 |
328 void AddHistory(const GURL& url, base::Time time) { | 328 void AddHistory(const GURL& url, base::Time time) { |
329 history_service_->AddPage(url, time, NULL, 0, GURL(), | 329 history_service_->AddPage(url, time, NULL, 0, GURL(), |
330 content::PAGE_TRANSITION_LINK, history::RedirectList(), | 330 history::RedirectList(), content::PAGE_TRANSITION_LINK, |
331 history::SOURCE_BROWSED, false); | 331 history::SOURCE_BROWSED, false); |
332 } | 332 } |
333 | 333 |
334 private: | 334 private: |
335 // Callback for HistoryService::QueryURL. | 335 // Callback for HistoryService::QueryURL. |
336 void SaveResultAndQuit(HistoryService::Handle, | 336 void SaveResultAndQuit(HistoryService::Handle, |
337 bool success, | 337 bool success, |
338 const history::URLRow*, | 338 const history::URLRow*, |
339 history::VisitVector*) { | 339 history::VisitVector*) { |
340 query_url_success_ = success; | 340 query_url_success_ = success; |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1216 ASSERT_TRUE(tester.HasProfile()); | 1216 ASSERT_TRUE(tester.HasProfile()); |
1217 | 1217 |
1218 BlockUntilBrowsingDataRemoved( | 1218 BlockUntilBrowsingDataRemoved( |
1219 BrowsingDataRemover::EVERYTHING, | 1219 BrowsingDataRemover::EVERYTHING, |
1220 BrowsingDataRemover::REMOVE_FORM_DATA, false); | 1220 BrowsingDataRemover::REMOVE_FORM_DATA, false); |
1221 | 1221 |
1222 EXPECT_EQ(BrowsingDataRemover::REMOVE_FORM_DATA, GetRemovalMask()); | 1222 EXPECT_EQ(BrowsingDataRemover::REMOVE_FORM_DATA, GetRemovalMask()); |
1223 EXPECT_EQ(BrowsingDataHelper::UNPROTECTED_WEB, GetOriginSetMask()); | 1223 EXPECT_EQ(BrowsingDataHelper::UNPROTECTED_WEB, GetOriginSetMask()); |
1224 ASSERT_FALSE(tester.HasProfile()); | 1224 ASSERT_FALSE(tester.HasProfile()); |
1225 } | 1225 } |
OLD | NEW |