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

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

Issue 379293002: Add AssertNoURLRequests() to URLRequestContext subclass destructors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add to two omitted subclasses of subclasses of URLRequestContext. Created 6 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 | 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 "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 public: 132 public:
133 TestExtensionURLRequestContext() { 133 TestExtensionURLRequestContext() {
134 net::CookieMonster* cookie_monster = 134 net::CookieMonster* cookie_monster =
135 content::CreateCookieStore(content::CookieStoreConfig())-> 135 content::CreateCookieStore(content::CookieStoreConfig())->
136 GetCookieMonster(); 136 GetCookieMonster();
137 const char* const schemes[] = {extensions::kExtensionScheme}; 137 const char* const schemes[] = {extensions::kExtensionScheme};
138 cookie_monster->SetCookieableSchemes(schemes, arraysize(schemes)); 138 cookie_monster->SetCookieableSchemes(schemes, arraysize(schemes));
139 set_cookie_store(cookie_monster); 139 set_cookie_store(cookie_monster);
140 } 140 }
141 141
142 virtual ~TestExtensionURLRequestContext() {} 142 virtual ~TestExtensionURLRequestContext() {
143 AssertNoURLRequests();
144 }
143 }; 145 };
144 146
145 class TestExtensionURLRequestContextGetter 147 class TestExtensionURLRequestContextGetter
146 : public net::URLRequestContextGetter { 148 : public net::URLRequestContextGetter {
147 public: 149 public:
148 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE { 150 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE {
149 if (!context_.get()) 151 if (!context_.get())
150 context_.reset(new TestExtensionURLRequestContext()); 152 context_.reset(new TestExtensionURLRequestContext());
151 return context_.get(); 153 return context_.get();
152 } 154 }
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 path_, 956 path_,
955 delegate_, 957 delegate_,
956 extension_policy_, 958 extension_policy_,
957 pref_service_.Pass(), 959 pref_service_.Pass(),
958 incognito_, 960 incognito_,
959 guest_session_, 961 guest_session_,
960 supervised_user_id_, 962 supervised_user_id_,
961 policy_service_.Pass(), 963 policy_service_.Pass(),
962 testing_factories_)); 964 testing_factories_));
963 } 965 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | content/public/test/mock_blob_url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698