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

Side by Side Diff: chrome/browser/net/sdch_browsertest.cc

Issue 1117703002: Adjust URLFetcher::Create API so that object is returned as scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unneeded Pass() calls Created 5 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // End-to-end SDCH tests. Uses the embedded test server to return SDCH 5 // End-to-end SDCH tests. Uses the embedded test server to return SDCH
6 // results 6 // results
7 7
8 #include "base/base64.h" 8 #include "base/base64.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 SdchBrowserTest() 270 SdchBrowserTest()
271 : response_handler_(kTestHost), 271 : response_handler_(kTestHost),
272 url_request_context_getter_(NULL), 272 url_request_context_getter_(NULL),
273 url_fetch_complete_(false), 273 url_fetch_complete_(false),
274 waiting_(false) {} 274 waiting_(false) {}
275 275
276 // Helper functions for fetching data. 276 // Helper functions for fetching data.
277 277
278 void FetchUrlDetailed(GURL url, net::URLRequestContextGetter* getter) { 278 void FetchUrlDetailed(GURL url, net::URLRequestContextGetter* getter) {
279 url_fetch_complete_ = false; 279 url_fetch_complete_ = false;
280 fetcher_.reset(net::URLFetcher::Create(url, net::URLFetcher::GET, this)); 280 fetcher_ = net::URLFetcher::Create(url, net::URLFetcher::GET, this);
281 fetcher_->SetRequestContext(getter); 281 fetcher_->SetRequestContext(getter);
282 fetcher_->Start(); 282 fetcher_->Start();
283 if (!url_fetch_complete_) { 283 if (!url_fetch_complete_) {
284 waiting_ = true; 284 waiting_ = true;
285 content::RunMessageLoop(); 285 content::RunMessageLoop();
286 waiting_ = false; 286 waiting_ = false;
287 } 287 }
288 CHECK(url_fetch_complete_); 288 CHECK(url_fetch_complete_);
289 } 289 }
290 290
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 ASSERT_TRUE(SetupIncognitoBrowser()); 695 ASSERT_TRUE(SetupIncognitoBrowser());
696 ASSERT_TRUE(ForceSdchDictionaryLoad(incognito_browser())); 696 ASSERT_TRUE(ForceSdchDictionaryLoad(incognito_browser()));
697 697
698 // Data fetches on main browser should not be SDCH encoded. 698 // Data fetches on main browser should not be SDCH encoded.
699 bool sdch_encoding_used = true; 699 bool sdch_encoding_used = true;
700 ASSERT_TRUE(GetData(&sdch_encoding_used)); 700 ASSERT_TRUE(GetData(&sdch_encoding_used));
701 EXPECT_FALSE(sdch_encoding_used); 701 EXPECT_FALSE(sdch_encoding_used);
702 } 702 }
703 703
704 } // namespace 704 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/metrics/variations/variations_service.cc ('k') | chrome/browser/profile_resetter/brandcode_config_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698