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

Side by Side Diff: content/common/net/url_fetcher_impl_unittest.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
« no previous file with comments | « chrome/test/base/testing_profile.cc ('k') | content/shell/shell_url_request_context_getter.h » ('j') | 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 "content/common/net/url_fetcher_impl.h" 5 #include "content/common/net/url_fetcher_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 } 250 }
251 return context_; 251 return context_;
252 } 252 }
253 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const { 253 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const {
254 return io_message_loop_proxy_; 254 return io_message_loop_proxy_;
255 } 255 }
256 void WaitForContextCreation() { 256 void WaitForContextCreation() {
257 context_created_.Wait(); 257 context_created_.Wait();
258 } 258 }
259 259
260 protected:
261 virtual ~CancelTestURLRequestContextGetter() {}
262
260 private: 263 private:
261 ~CancelTestURLRequestContextGetter() {}
262
263 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; 264 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_;
264 base::WaitableEvent context_created_; 265 base::WaitableEvent context_created_;
265 scoped_refptr<net::URLRequestContext> context_; 266 scoped_refptr<net::URLRequestContext> context_;
266 }; 267 };
267 268
268 // Version of URLFetcherTest that tests retying the same request twice. 269 // Version of URLFetcherTest that tests retying the same request twice.
269 class URLFetcherMultipleAttemptTest : public URLFetcherTest { 270 class URLFetcherMultipleAttemptTest : public URLFetcherTest {
270 public: 271 public:
271 // content::URLFetcherDelegate 272 // content::URLFetcherDelegate
272 virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; 273 virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE;
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 std::string(kTestServerFilePrefix) + kFileToFetch)); 1103 std::string(kTestServerFilePrefix) + kFileToFetch));
1103 1104
1104 MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit(). 1105 MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
1105 1106
1106 MessageLoop::current()->RunAllPending(); 1107 MessageLoop::current()->RunAllPending();
1107 ASSERT_FALSE(file_util::PathExists(file_path_)) 1108 ASSERT_FALSE(file_util::PathExists(file_path_))
1108 << file_path_.value() << " not removed."; 1109 << file_path_.value() << " not removed.";
1109 } 1110 }
1110 1111
1111 } // namespace. 1112 } // namespace.
OLDNEW
« no previous file with comments | « chrome/test/base/testing_profile.cc ('k') | content/shell/shell_url_request_context_getter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698