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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_host_browsertest.cc

Issue 16703020: Rewrite scoped_ptr<T>(NULL) to use the default ctor in content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up insanity 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
« no previous file with comments | « no previous file | content/browser/devtools/devtools_protocol.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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/memory/singleton.h" 6 #include "base/memory/singleton.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 850
851 // Handles |request| by serving an empty response. 851 // Handles |request| by serving an empty response.
852 scoped_ptr<net::test_server::HttpResponse> EmptyResponseHandler( 852 scoped_ptr<net::test_server::HttpResponse> EmptyResponseHandler(
853 const std::string& path, 853 const std::string& path,
854 const net::test_server::HttpRequest& request) { 854 const net::test_server::HttpRequest& request) {
855 if (StartsWithASCII(path, request.relative_url, true)) { 855 if (StartsWithASCII(path, request.relative_url, true)) {
856 return scoped_ptr<net::test_server::HttpResponse>( 856 return scoped_ptr<net::test_server::HttpResponse>(
857 new EmptyHttpResponse); 857 new EmptyHttpResponse);
858 } 858 }
859 859
860 return scoped_ptr<net::test_server::HttpResponse>(NULL); 860 return scoped_ptr<net::test_server::HttpResponse>();
861 } 861 }
862 862
863 // Handles |request| by serving a redirect response. 863 // Handles |request| by serving a redirect response.
864 scoped_ptr<net::test_server::HttpResponse> RedirectResponseHandler( 864 scoped_ptr<net::test_server::HttpResponse> RedirectResponseHandler(
865 const std::string& path, 865 const std::string& path,
866 const GURL& redirect_target, 866 const GURL& redirect_target,
867 const net::test_server::HttpRequest& request) { 867 const net::test_server::HttpRequest& request) {
868 if (!StartsWithASCII(path, request.relative_url, true)) 868 if (!StartsWithASCII(path, request.relative_url, true))
869 return scoped_ptr<net::test_server::HttpResponse>(NULL); 869 return scoped_ptr<net::test_server::HttpResponse>();
870 870
871 scoped_ptr<net::test_server::BasicHttpResponse> http_response( 871 scoped_ptr<net::test_server::BasicHttpResponse> http_response(
872 new net::test_server::BasicHttpResponse); 872 new net::test_server::BasicHttpResponse);
873 http_response->set_code(net::test_server::MOVED); 873 http_response->set_code(net::test_server::MOVED);
874 http_response->AddCustomHeader("Location", redirect_target.spec()); 874 http_response->AddCustomHeader("Location", redirect_target.spec());
875 return http_response.PassAs<net::test_server::HttpResponse>(); 875 return http_response.PassAs<net::test_server::HttpResponse>();
876 } 876 }
877 877
878 } // namespace 878 } // namespace
879 879
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
1458 const string16 expected_title = ASCIIToUTF16("AutoSize(640, 480)"); 1458 const string16 expected_title = ASCIIToUTF16("AutoSize(640, 480)");
1459 content::TitleWatcher title_watcher(test_embedder()->web_contents(), 1459 content::TitleWatcher title_watcher(test_embedder()->web_contents(),
1460 expected_title); 1460 expected_title);
1461 RemoveAttributes(rvh, "maxwidth"); 1461 RemoveAttributes(rvh, "maxwidth");
1462 string16 actual_title = title_watcher.WaitAndGetTitle(); 1462 string16 actual_title = title_watcher.WaitAndGetTitle();
1463 EXPECT_EQ(expected_title, actual_title); 1463 EXPECT_EQ(expected_title, actual_title);
1464 } 1464 }
1465 } 1465 }
1466 1466
1467 } // namespace content 1467 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/devtools/devtools_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698