| 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/browsing_data_remover.h" | 5 #include "chrome/browser/browsing_data_remover.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 url, | 149 url, |
| 150 true, | 150 true, |
| 151 &consumer_, | 151 &consumer_, |
| 152 base::Bind(&RemoveHistoryTester::SaveResultAndQuit, | 152 base::Bind(&RemoveHistoryTester::SaveResultAndQuit, |
| 153 base::Unretained(this))); | 153 base::Unretained(this))); |
| 154 BlockUntilNotified(); | 154 BlockUntilNotified(); |
| 155 return query_url_success_; | 155 return query_url_success_; |
| 156 } | 156 } |
| 157 | 157 |
| 158 void AddHistory(const GURL& url, base::Time time) { | 158 void AddHistory(const GURL& url, base::Time time) { |
| 159 history_service_->AddPage(url, time, NULL, 0, GURL(), PageTransition::LINK, | 159 history_service_->AddPage(url, time, NULL, 0, GURL(), |
| 160 history::RedirectList(), history::SOURCE_BROWSED, false); | 160 content::PAGE_TRANSITION_LINK, history::RedirectList(), |
| 161 history::SOURCE_BROWSED, false); |
| 161 } | 162 } |
| 162 | 163 |
| 163 private: | 164 private: |
| 164 // Callback for HistoryService::QueryURL. | 165 // Callback for HistoryService::QueryURL. |
| 165 void SaveResultAndQuit(HistoryService::Handle, | 166 void SaveResultAndQuit(HistoryService::Handle, |
| 166 bool success, | 167 bool success, |
| 167 const history::URLRow*, | 168 const history::URLRow*, |
| 168 history::VisitVector*) { | 169 history::VisitVector*) { |
| 169 query_url_success_ = success; | 170 query_url_success_ = success; |
| 170 Notify(); | 171 Notify(); |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 quota::kStorageTypeTemporary)); | 506 quota::kStorageTypeTemporary)); |
| 506 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, | 507 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, |
| 507 quota::kStorageTypePersistent)); | 508 quota::kStorageTypePersistent)); |
| 508 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, | 509 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, |
| 509 quota::kStorageTypePersistent)); | 510 quota::kStorageTypePersistent)); |
| 510 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, | 511 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, |
| 511 quota::kStorageTypePersistent)); | 512 quota::kStorageTypePersistent)); |
| 512 } | 513 } |
| 513 | 514 |
| 514 } // namespace | 515 } // namespace |
| OLD | NEW |