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

Side by Side Diff: chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc

Issue 15987009: Update chrome/ to use WeakPtr<T>::get() instead of implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 <list> 5 #include <list>
6 #include <set> 6 #include <set>
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 void ResumeAll() { 89 void ResumeAll() {
90 if (!content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)) { 90 if (!content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)) {
91 content::BrowserThread::PostTask( 91 content::BrowserThread::PostTask(
92 content::BrowserThread::IO, 92 content::BrowserThread::IO,
93 FROM_HERE, 93 FROM_HERE,
94 base::Bind(&TestNavigationListener::ResumeAll, this)); 94 base::Bind(&TestNavigationListener::ResumeAll, this));
95 return; 95 return;
96 } 96 }
97 WeakThrottleList::const_iterator it; 97 WeakThrottleList::const_iterator it;
98 for (it = throttles_.begin(); it != throttles_.end(); ++it) { 98 for (it = throttles_.begin(); it != throttles_.end(); ++it) {
99 if (*it) 99 if (it->get())
100 (*it)->Resume(); 100 (*it)->Resume();
101 } 101 }
102 throttles_.clear(); 102 throttles_.clear();
103 } 103 }
104 104
105 // Constructs a ResourceThrottle if the request for |url| should be held. 105 // Constructs a ResourceThrottle if the request for |url| should be held.
106 // 106 //
107 // Needs to be invoked on the IO thread. 107 // Needs to be invoked on the IO thread.
108 content::ResourceThrottle* CreateResourceThrottle( 108 content::ResourceThrottle* CreateResourceThrottle(
109 const GURL& url, 109 const GURL& url,
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 url = GURL(base::StringPrintf( 751 url = GURL(base::StringPrintf(
752 "http://www.a.com:%d/" 752 "http://www.a.com:%d/"
753 "files/extensions/api_test/webnavigation/crash/b.html", 753 "files/extensions/api_test/webnavigation/crash/b.html",
754 test_server()->host_port_pair().port())); 754 test_server()->host_port_pair().port()));
755 ui_test_utils::NavigateToURL(browser(), url); 755 ui_test_utils::NavigateToURL(browser(), url);
756 756
757 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); 757 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message();
758 } 758 }
759 759
760 } // namespace extensions 760 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/download/download_ui_controller_unittest.cc ('k') | chrome/browser/extensions/crx_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698