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

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

Issue 624173002: replace OVERRIDE and FINAL with override and final in chrome/browser/[j-q]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master 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
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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 net::URLRequestContextGetter* url_request_context_getter, 513 net::URLRequestContextGetter* url_request_context_getter,
514 int* result) { 514 int* result) {
515 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); 515 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
516 net::SdchManager* sdch_manager = 516 net::SdchManager* sdch_manager =
517 url_request_context_getter->GetURLRequestContext()->sdch_manager(); 517 url_request_context_getter->GetURLRequestContext()->sdch_manager();
518 DCHECK(sdch_manager); 518 DCHECK(sdch_manager);
519 *result = sdch_manager->GetFetchesCountForTesting(); 519 *result = sdch_manager->GetFetchesCountForTesting();
520 } 520 }
521 521
522 // InProcessBrowserTest 522 // InProcessBrowserTest
523 virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE { 523 virtual void SetUpCommandLine(base::CommandLine* command_line) override {
524 command_line->AppendSwitchASCII( 524 command_line->AppendSwitchASCII(
525 switches::kHostResolverRules, 525 switches::kHostResolverRules,
526 "MAP " + std::string(kTestHost) + " 127.0.0.1"); 526 "MAP " + std::string(kTestHost) + " 127.0.0.1");
527 #if defined(OS_CHROMEOS) 527 #if defined(OS_CHROMEOS)
528 command_line->AppendSwitch( 528 command_line->AppendSwitch(
529 chromeos::switches::kIgnoreUserProfileMappingForTests); 529 chromeos::switches::kIgnoreUserProfileMappingForTests);
530 #endif 530 #endif
531 } 531 }
532 532
533 virtual void SetUpOnMainThread() OVERRIDE { 533 virtual void SetUpOnMainThread() override {
534 test_server_.RegisterRequestHandler( 534 test_server_.RegisterRequestHandler(
535 base::Bind(&SdchResponseHandler::HandleRequest, 535 base::Bind(&SdchResponseHandler::HandleRequest,
536 base::Unretained(&response_handler_))); 536 base::Unretained(&response_handler_)));
537 CHECK(test_server_.InitializeAndWaitUntilReady()); 537 CHECK(test_server_.InitializeAndWaitUntilReady());
538 url_request_context_getter_ = browser()->profile()->GetRequestContext(); 538 url_request_context_getter_ = browser()->profile()->GetRequestContext();
539 } 539 }
540 540
541 virtual void TearDownOnMainThread() OVERRIDE { 541 virtual void TearDownOnMainThread() override {
542 CHECK(test_server_.ShutdownAndWaitUntilComplete()); 542 CHECK(test_server_.ShutdownAndWaitUntilComplete());
543 } 543 }
544 544
545 // URLFetcherDelegate 545 // URLFetcherDelegate
546 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE { 546 virtual void OnURLFetchComplete(const net::URLFetcher* source) override {
547 url_fetch_complete_ = true; 547 url_fetch_complete_ = true;
548 if (waiting_) 548 if (waiting_)
549 base::MessageLoopForUI::current()->Quit(); 549 base::MessageLoopForUI::current()->Quit();
550 } 550 }
551 551
552 SdchResponseHandler response_handler_; 552 SdchResponseHandler response_handler_;
553 net::test_server::EmbeddedTestServer test_server_; 553 net::test_server::EmbeddedTestServer test_server_;
554 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; 554 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
555 scoped_ptr<net::URLFetcher> fetcher_; 555 scoped_ptr<net::URLFetcher> fetcher_;
556 bool url_fetch_complete_; 556 bool url_fetch_complete_;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 Browser* incognito_browser = CreateIncognitoBrowser(); 608 Browser* incognito_browser = CreateIncognitoBrowser();
609 ASSERT_TRUE(ForceSdchDictionaryLoad(incognito_browser)); 609 ASSERT_TRUE(ForceSdchDictionaryLoad(incognito_browser));
610 610
611 // Data fetches on main browser should not be SDCH encoded. 611 // Data fetches on main browser should not be SDCH encoded.
612 bool sdch_encoding_used = true; 612 bool sdch_encoding_used = true;
613 ASSERT_TRUE(GetData(&sdch_encoding_used)); 613 ASSERT_TRUE(GetData(&sdch_encoding_used));
614 EXPECT_FALSE(sdch_encoding_used); 614 EXPECT_FALSE(sdch_encoding_used);
615 } 615 }
616 616
617 } // namespace 617 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698