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

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

Issue 322983003: Rename HistoryService::NotifyRenderProcessHostDestruction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 6 years, 6 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
« no previous file with comments | « chrome/browser/history/visit_tracker_unittest.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 "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 WebHistoryServiceFactory::GetInstance()->SetTestingFactory(this, NULL); 452 WebHistoryServiceFactory::GetInstance()->SetTestingFactory(this, NULL);
453 return true; 453 return true;
454 } 454 }
455 455
456 void TestingProfile::DestroyHistoryService() { 456 void TestingProfile::DestroyHistoryService() {
457 HistoryService* history_service = 457 HistoryService* history_service =
458 HistoryServiceFactory::GetForProfileWithoutCreating(this); 458 HistoryServiceFactory::GetForProfileWithoutCreating(this);
459 if (!history_service) 459 if (!history_service)
460 return; 460 return;
461 461
462 history_service->NotifyRenderProcessHostDestruction(0); 462 history_service->ClearCachedDataForContextID(0);
463 history_service->SetOnBackendDestroyTask(base::MessageLoop::QuitClosure()); 463 history_service->SetOnBackendDestroyTask(base::MessageLoop::QuitClosure());
464 history_service->Cleanup(); 464 history_service->Cleanup();
465 HistoryServiceFactory::ShutdownForProfile(this); 465 HistoryServiceFactory::ShutdownForProfile(this);
466 466
467 // Wait for the backend class to terminate before deleting the files and 467 // Wait for the backend class to terminate before deleting the files and
468 // moving to the next test. Note: if this never terminates, somebody is 468 // moving to the next test. Note: if this never terminates, somebody is
469 // probably leaking a reference to the history backend, so it never calls 469 // probably leaking a reference to the history backend, so it never calls
470 // our destroy task. 470 // our destroy task.
471 base::MessageLoop::current()->Run(); 471 base::MessageLoop::current()->Run();
472 472
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 path_, 976 path_,
977 delegate_, 977 delegate_,
978 extension_policy_, 978 extension_policy_,
979 pref_service_.Pass(), 979 pref_service_.Pass(),
980 incognito_, 980 incognito_,
981 guest_session_, 981 guest_session_,
982 managed_user_id_, 982 managed_user_id_,
983 policy_service_.Pass(), 983 policy_service_.Pass(),
984 testing_factories_)); 984 testing_factories_));
985 } 985 }
OLDNEW
« no previous file with comments | « chrome/browser/history/visit_tracker_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698