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

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: more fix 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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 507
508 ProfileManager* profile_manager = g_browser_process->profile_manager(); 508 ProfileManager* profile_manager = g_browser_process->profile_manager();
509 if (profile_manager) 509 if (profile_manager)
510 profile_manager->InitProfileUserPrefs(this); 510 profile_manager->InitProfileUserPrefs(this);
511 511
512 if (delegate_) 512 if (delegate_)
513 delegate_->OnProfileCreated(this, true, false); 513 delegate_->OnProfileCreated(this, true, false);
514 } 514 }
515 515
516 TestingProfile::~TestingProfile() { 516 TestingProfile::~TestingProfile() {
517 ShutdownStoragePartitions();
518
517 // Revert to non-incognito mode before shutdown. 519 // Revert to non-incognito mode before shutdown.
518 force_incognito_ = false; 520 force_incognito_ = false;
519 521
520 // If this profile owns an incognito profile, tear it down first. 522 // If this profile owns an incognito profile, tear it down first.
521 incognito_profile_.reset(); 523 incognito_profile_.reset();
522 524
523 // Any objects holding live URLFetchers should be deleted before teardown. 525 // Any objects holding live URLFetchers should be deleted before teardown.
524 TemplateURLFetcherFactory::ShutdownForProfile(this); 526 TemplateURLFetcherFactory::ShutdownForProfile(this);
525 527
526 MaybeSendDestroyedNotification(); 528 MaybeSendDestroyedNotification();
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 // Note: Owned by |original_profile|. 1066 // Note: Owned by |original_profile|.
1065 return new TestingProfile(path_, delegate_, 1067 return new TestingProfile(path_, delegate_,
1066 #if defined(ENABLE_EXTENSIONS) 1068 #if defined(ENABLE_EXTENSIONS)
1067 extension_policy_, 1069 extension_policy_,
1068 #endif 1070 #endif
1069 std::move(pref_service_), original_profile, 1071 std::move(pref_service_), original_profile,
1070 guest_session_, supervised_user_id_, 1072 guest_session_, supervised_user_id_,
1071 std::move(policy_service_), testing_factories_, 1073 std::move(policy_service_), testing_factories_,
1072 profile_name_); 1074 profile_name_);
1073 } 1075 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698