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

Side by Side Diff: chrome/test/chromedriver/net/net_util.cc

Issue 637933002: Replace FINAL and OVERRIDE with their C++11 counterparts in chrome/test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « chrome/test/chromedriver/logging.h ('k') | chrome/test/chromedriver/net/net_util_unittest.cc » ('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 "chrome/test/chromedriver/net/net_util.h" 5 #include "chrome/test/chromedriver/net/net_util.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 24 matching lines...) Expand all
35 event_.Wait(); 35 event_.Wait();
36 return success_; 36 return success_;
37 } 37 }
38 38
39 void FetchOnIOThread() { 39 void FetchOnIOThread() {
40 fetcher_.reset(net::URLFetcher::Create(url_, net::URLFetcher::GET, this)); 40 fetcher_.reset(net::URLFetcher::Create(url_, net::URLFetcher::GET, this));
41 fetcher_->SetRequestContext(getter_); 41 fetcher_->SetRequestContext(getter_);
42 fetcher_->Start(); 42 fetcher_->Start();
43 } 43 }
44 44
45 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE { 45 virtual void OnURLFetchComplete(const net::URLFetcher* source) override {
46 success_ = (source->GetResponseCode() == 200); 46 success_ = (source->GetResponseCode() == 200);
47 if (success_) 47 if (success_)
48 success_ = source->GetResponseAsString(response_); 48 success_ = source->GetResponseAsString(response_);
49 fetcher_.reset(); // Destroy the fetcher on IO thread. 49 fetcher_.reset(); // Destroy the fetcher on IO thread.
50 event_.Signal(); 50 event_.Signal();
51 } 51 }
52 52
53 private: 53 private:
54 GURL url_; 54 GURL url_;
55 URLRequestContextGetter* getter_; 55 URLRequestContextGetter* getter_;
(...skipping 28 matching lines...) Expand all
84 84
85 int NetAddress::port() const { 85 int NetAddress::port() const {
86 return port_; 86 return port_;
87 } 87 }
88 88
89 bool FetchUrl(const std::string& url, 89 bool FetchUrl(const std::string& url,
90 URLRequestContextGetter* getter, 90 URLRequestContextGetter* getter,
91 std::string* response) { 91 std::string* response) {
92 return SyncUrlFetcher(GURL(url), getter, response).Fetch(); 92 return SyncUrlFetcher(GURL(url), getter, response).Fetch();
93 } 93 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/logging.h ('k') | chrome/test/chromedriver/net/net_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698