| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <set> | 6 #include <set> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 content::Details<HistoryDetails> det(details); | 406 content::Details<HistoryDetails> det(details); |
| 407 mem_backend_->Observe(type, content::Source<HistoryBackendTest>(NULL), det); | 407 mem_backend_->Observe(type, content::Source<HistoryBackendTest>(NULL), det); |
| 408 | 408 |
| 409 // The backend passes ownership of the details pointer to us. | 409 // The backend passes ownership of the details pointer to us. |
| 410 delete details; | 410 delete details; |
| 411 } | 411 } |
| 412 | 412 |
| 413 // The number of notifications which were broadcasted. | 413 // The number of notifications which were broadcasted. |
| 414 int num_broadcasted_notifications_; | 414 int num_broadcasted_notifications_; |
| 415 | 415 |
| 416 MessageLoop message_loop_; | 416 base::MessageLoop message_loop_; |
| 417 base::FilePath test_dir_; | 417 base::FilePath test_dir_; |
| 418 history::MostVisitedURLList most_visited_list_; | 418 history::MostVisitedURLList most_visited_list_; |
| 419 history::FilteredURLList filtered_list_; | 419 history::FilteredURLList filtered_list_; |
| 420 content::TestBrowserThread ui_thread_; | 420 content::TestBrowserThread ui_thread_; |
| 421 }; | 421 }; |
| 422 | 422 |
| 423 void HistoryBackendTestDelegate::SetInMemoryBackend(int backend_id, | 423 void HistoryBackendTestDelegate::SetInMemoryBackend(int backend_id, |
| 424 InMemoryHistoryBackend* backend) { | 424 InMemoryHistoryBackend* backend) { |
| 425 test_->SetInMemoryBackend(backend_id, backend); | 425 test_->SetInMemoryBackend(backend_id, backend); |
| 426 } | 426 } |
| (...skipping 2382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2809 service->AddPage( | 2809 service->AddPage( |
| 2810 url, base::Time::Now(), NULL, 1, GURL(), RedirectList(), | 2810 url, base::Time::Now(), NULL, 1, GURL(), RedirectList(), |
| 2811 content::PAGE_TRANSITION_TYPED, SOURCE_BROWSED, false); | 2811 content::PAGE_TRANSITION_TYPED, SOURCE_BROWSED, false); |
| 2812 | 2812 |
| 2813 // This won't actually delete the URL, rather it'll empty out the visits. | 2813 // This won't actually delete the URL, rather it'll empty out the visits. |
| 2814 // This triggers blocking on the BookmarkModel. | 2814 // This triggers blocking on the BookmarkModel. |
| 2815 service->DeleteURL(url); | 2815 service->DeleteURL(url); |
| 2816 } | 2816 } |
| 2817 | 2817 |
| 2818 } // namespace history | 2818 } // namespace history |
| OLD | NEW |