Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(415)

Side by Side Diff: chrome/browser/history/history_querying_unittest.cc

Issue 8892023: Eliminated the last few uses of MessageLoop::QuitTask in chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One more... Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/history/history_backend.cc ('k') | chrome/browser/history/history_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 history_->AddPage(url, test_entries[i].time, id_scope, page_id, GURL(), 114 history_->AddPage(url, test_entries[i].time, id_scope, page_id, GURL(),
115 content::PAGE_TRANSITION_LINK, history::RedirectList(), 115 content::PAGE_TRANSITION_LINK, history::RedirectList(),
116 history::SOURCE_BROWSED, false); 116 history::SOURCE_BROWSED, false);
117 history_->SetPageTitle(url, UTF8ToUTF16(test_entries[i].title)); 117 history_->SetPageTitle(url, UTF8ToUTF16(test_entries[i].title));
118 history_->SetPageContents(url, UTF8ToUTF16(test_entries[i].body)); 118 history_->SetPageContents(url, UTF8ToUTF16(test_entries[i].body));
119 } 119 }
120 } 120 }
121 121
122 virtual void TearDown() { 122 virtual void TearDown() {
123 if (history_.get()) { 123 if (history_.get()) {
124 history_->SetOnBackendDestroyTask(new MessageLoop::QuitTask); 124 history_->SetOnBackendDestroyTask(MessageLoop::QuitClosure());
125 history_->Cleanup(); 125 history_->Cleanup();
126 history_ = NULL; 126 history_ = NULL;
127 MessageLoop::current()->Run(); // Wait for the other thread. 127 MessageLoop::current()->Run(); // Wait for the other thread.
128 } 128 }
129 } 129 }
130 130
131 void QueryHistoryComplete(HistoryService::Handle, QueryResults* results) { 131 void QueryHistoryComplete(HistoryService::Handle, QueryResults* results) {
132 results->Swap(&last_query_results_); 132 results->Swap(&last_query_results_);
133 MessageLoop::current()->Quit(); // Will return out to QueryHistory. 133 MessageLoop::current()->Quit(); // Will return out to QueryHistory.
134 } 134 }
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 QueryOptions options; 344 QueryOptions options;
345 QueryResults results; 345 QueryResults results;
346 346
347 QueryHistory("Other", options, &results); 347 QueryHistory("Other", options, &results);
348 EXPECT_EQ(1, results.urls().size()); 348 EXPECT_EQ(1, results.urls().size());
349 EXPECT_TRUE(NthResultIs(results, 0, 4)); 349 EXPECT_TRUE(NthResultIs(results, 0, 4));
350 } 350 }
351 */ 351 */
352 352
353 } // namespace history 353 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/history_backend.cc ('k') | chrome/browser/history/history_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698