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

Side by Side Diff: chrome/browser/chromeos/login/signin/oauth2_browsertest.cc

Issue 640353003: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo 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 #include <string> 5 #include <string>
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 http_response->set_content_type("text/html"); 522 http_response->set_content_type("text/html");
523 http_response->set_content(kGooglePageContent); 523 http_response->set_content(kGooglePageContent);
524 } else if (request_path == kRandomPagePath) { // Serving "non-google" page. 524 } else if (request_path == kRandomPagePath) { // Serving "non-google" page.
525 http_response->set_code(net::HTTP_OK); 525 http_response->set_code(net::HTTP_OK);
526 http_response->set_content_type("text/html"); 526 http_response->set_content_type("text/html");
527 http_response->set_content(kRandomPageContent); 527 http_response->set_content(kRandomPageContent);
528 } else { 528 } else {
529 return scoped_ptr<HttpResponse>(); // Request not understood. 529 return scoped_ptr<HttpResponse>(); // Request not understood.
530 } 530 }
531 531
532 return http_response.PassAs<HttpResponse>(); 532 return http_response.Pass();
533 } 533 }
534 534
535 // True if we have already served the test page. 535 // True if we have already served the test page.
536 bool IsPageRequested () { 536 bool IsPageRequested () {
537 return start_event_.IsSignaled(); 537 return start_event_.IsSignaled();
538 } 538 }
539 539
540 // Waits until we receive a request to serve the test page. 540 // Waits until we receive a request to serve the test page.
541 void WaitForPageRequest() { 541 void WaitForPageRequest() {
542 // If we have already served the request, bail out. 542 // If we have already served the request, bail out.
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 790
791 if (!catcher.GetNextResult()) { 791 if (!catcher.GetNextResult()) {
792 std::string message = catcher.message(); 792 std::string message = catcher.message();
793 ADD_FAILURE() << "Tests failed: " << message; 793 ADD_FAILURE() << "Tests failed: " << message;
794 } 794 }
795 795
796 EXPECT_TRUE(fake_google_.IsPageRequested()); 796 EXPECT_TRUE(fake_google_.IsPageRequested());
797 } 797 }
798 798
799 } // namespace chromeos 799 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/saml/saml_browsertest.cc ('k') | chrome/browser/chromeos/platform_keys/platform_keys_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698