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

Side by Side Diff: chrome/test/base/testing_profile.cc

Issue 352913002: Port HistoryService::ScheduleDBTask to CancelableTaskTracker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix lifetime of base::CancelableTaskTracker for HistoryModelWorker Created 6 years, 5 months 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/ui/sync/profile_signin_confirmation_helper.cc ('k') | no next file » | 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) 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/test/base/testing_profile.h" 5 #include "chrome/test/base/testing_profile.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 } 839 }
840 return pref_proxy_config_tracker_.get(); 840 return pref_proxy_config_tracker_.get();
841 } 841 }
842 842
843 void TestingProfile::BlockUntilHistoryProcessesPendingRequests() { 843 void TestingProfile::BlockUntilHistoryProcessesPendingRequests() {
844 HistoryService* history_service = 844 HistoryService* history_service =
845 HistoryServiceFactory::GetForProfile(this, Profile::EXPLICIT_ACCESS); 845 HistoryServiceFactory::GetForProfile(this, Profile::EXPLICIT_ACCESS);
846 DCHECK(history_service); 846 DCHECK(history_service);
847 DCHECK(base::MessageLoop::current()); 847 DCHECK(base::MessageLoop::current());
848 848
849 CancelableRequestConsumer consumer; 849 base::CancelableTaskTracker tracker;
850 history_service->ScheduleDBTask(new QuittingHistoryDBTask(), &consumer); 850 history_service->ScheduleDBTask(new QuittingHistoryDBTask(), &tracker);
851 base::MessageLoop::current()->Run(); 851 base::MessageLoop::current()->Run();
852 } 852 }
853 853
854 chrome_browser_net::Predictor* TestingProfile::GetNetworkPredictor() { 854 chrome_browser_net::Predictor* TestingProfile::GetNetworkPredictor() {
855 return NULL; 855 return NULL;
856 } 856 }
857 857
858 DevToolsNetworkController* TestingProfile::GetDevToolsNetworkController() { 858 DevToolsNetworkController* TestingProfile::GetDevToolsNetworkController() {
859 return NULL; 859 return NULL;
860 } 860 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 path_, 951 path_,
952 delegate_, 952 delegate_,
953 extension_policy_, 953 extension_policy_,
954 pref_service_.Pass(), 954 pref_service_.Pass(),
955 incognito_, 955 incognito_,
956 guest_session_, 956 guest_session_,
957 supervised_user_id_, 957 supervised_user_id_,
958 policy_service_.Pass(), 958 policy_service_.Pass(),
959 testing_factories_)); 959 testing_factories_));
960 } 960 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/sync/profile_signin_confirmation_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698