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

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

Issue 9958145: Audit the destructors of classes derived from net::URLRequestContextGetter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ToT Created 8 years, 8 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
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 public: 112 public:
113 virtual net::URLRequestContext* GetURLRequestContext() { 113 virtual net::URLRequestContext* GetURLRequestContext() {
114 if (!context_) 114 if (!context_)
115 context_ = new TestExtensionURLRequestContext(); 115 context_ = new TestExtensionURLRequestContext();
116 return context_.get(); 116 return context_.get();
117 } 117 }
118 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const { 118 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const {
119 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); 119 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
120 } 120 }
121 121
122 protected:
123 virtual ~TestExtensionURLRequestContextGetter() {}
124
122 private: 125 private:
123 scoped_refptr<net::URLRequestContext> context_; 126 scoped_refptr<net::URLRequestContext> context_;
124 }; 127 };
125 128
126 ProfileKeyedService* CreateTestDesktopNotificationService(Profile* profile) { 129 ProfileKeyedService* CreateTestDesktopNotificationService(Profile* profile) {
127 return new DesktopNotificationService(profile, NULL); 130 return new DesktopNotificationService(profile, NULL);
128 } 131 }
129 132
130 } // namespace 133 } // namespace
131 134
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 void TestingProfile::DestroyWebDataService() { 725 void TestingProfile::DestroyWebDataService() {
723 if (!web_data_service_.get()) 726 if (!web_data_service_.get())
724 return; 727 return;
725 728
726 web_data_service_->Shutdown(); 729 web_data_service_->Shutdown();
727 } 730 }
728 731
729 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) { 732 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) {
730 return true; 733 return true;
731 } 734 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/http_bridge.cc ('k') | content/common/net/url_fetcher_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698