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

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

Issue 2159133002: Shutdown StoragePartition before ProfileIOData is being shut down (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 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
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 <utility> 7 #include <utility>
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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 525
526 MaybeSendDestroyedNotification(); 526 MaybeSendDestroyedNotification();
527 527
528 browser_context_dependency_manager_->DestroyBrowserContextServices(this); 528 browser_context_dependency_manager_->DestroyBrowserContextServices(this);
529 529
530 if (host_content_settings_map_.get()) 530 if (host_content_settings_map_.get())
531 host_content_settings_map_->ShutdownOnUIThread(); 531 host_content_settings_map_->ShutdownOnUIThread();
532 532
533 if (pref_proxy_config_tracker_.get()) 533 if (pref_proxy_config_tracker_.get())
534 pref_proxy_config_tracker_->DetachFromPrefService(); 534 pref_proxy_config_tracker_->DetachFromPrefService();
535
536 // Shutdown storage partitions before we post a task to delete
537 // the resource context.
538 ShutdownStoragePartitions();
539
535 // Failing a post == leaks == heapcheck failure. Make that an immediate test 540 // Failing a post == leaks == heapcheck failure. Make that an immediate test
536 // failure. 541 // failure.
537 if (resource_context_) { 542 if (resource_context_) {
538 CHECK(BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, 543 CHECK(BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE,
539 resource_context_)); 544 resource_context_));
540 resource_context_ = NULL; 545 resource_context_ = NULL;
541 content::RunAllPendingInMessageLoop(BrowserThread::IO); 546 content::RunAllPendingInMessageLoop(BrowserThread::IO);
542 } 547 }
543 } 548 }
544 549
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 // Note: Owned by |original_profile|. 1069 // Note: Owned by |original_profile|.
1065 return new TestingProfile(path_, delegate_, 1070 return new TestingProfile(path_, delegate_,
1066 #if defined(ENABLE_EXTENSIONS) 1071 #if defined(ENABLE_EXTENSIONS)
1067 extension_policy_, 1072 extension_policy_,
1068 #endif 1073 #endif
1069 std::move(pref_service_), original_profile, 1074 std::move(pref_service_), original_profile,
1070 guest_session_, supervised_user_id_, 1075 guest_session_, supervised_user_id_,
1071 std::move(policy_service_), testing_factories_, 1076 std::move(policy_service_), testing_factories_,
1072 profile_name_); 1077 profile_name_);
1073 } 1078 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.h ('k') | chromecast/browser/cast_browser_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698