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

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

Issue 9665032: If a test aborted (e.g. ASSERT_EQ() failure) with a TemplateURLFetcher running, shutdown would go b… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | « no previous file | 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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 590
591 return GetRequestContext(); 591 return GetRequestContext();
592 } 592 }
593 593
594 void TestingProfile::CreateRequestContext() { 594 void TestingProfile::CreateRequestContext() {
595 if (!request_context_) 595 if (!request_context_)
596 request_context_ = new TestURLRequestContextGetter(); 596 request_context_ = new TestURLRequestContextGetter();
597 } 597 }
598 598
599 void TestingProfile::ResetRequestContext() { 599 void TestingProfile::ResetRequestContext() {
600 // Any objects holding live URLFetchers should be deleted before the request
601 // context is shut down.
602 template_url_fetcher_.reset();
603
600 request_context_ = NULL; 604 request_context_ = NULL;
601 } 605 }
602 606
603 net::URLRequestContextGetter* TestingProfile::GetRequestContextForMedia() { 607 net::URLRequestContextGetter* TestingProfile::GetRequestContextForMedia() {
604 return NULL; 608 return NULL;
605 } 609 }
606 610
607 net::URLRequestContextGetter* TestingProfile::GetRequestContextForExtensions() { 611 net::URLRequestContextGetter* TestingProfile::GetRequestContextForExtensions() {
608 if (!extensions_request_context_) 612 if (!extensions_request_context_)
609 extensions_request_context_ = new TestExtensionURLRequestContextGetter(); 613 extensions_request_context_ = new TestExtensionURLRequestContextGetter();
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { 761 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() {
758 return GetExtensionSpecialStoragePolicy(); 762 return GetExtensionSpecialStoragePolicy();
759 } 763 }
760 764
761 void TestingProfile::DestroyWebDataService() { 765 void TestingProfile::DestroyWebDataService() {
762 if (!web_data_service_.get()) 766 if (!web_data_service_.get())
763 return; 767 return;
764 768
765 web_data_service_->Shutdown(); 769 web_data_service_->Shutdown();
766 } 770 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698