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

Side by Side Diff: chrome/browser/password_manager/password_manager_browsertest.cc

Issue 2230203002: chrome: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed accidental components/ change Created 4 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include <utility> 6 #include <utility>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 // Handles |request| to "/basic_auth". If "Authorization" header is present, 87 // Handles |request| to "/basic_auth". If "Authorization" header is present,
88 // responds with a non-empty HTTP 200 page (regardless of its value). Otherwise 88 // responds with a non-empty HTTP 200 page (regardless of its value). Otherwise
89 // serves a Basic Auth challenge. 89 // serves a Basic Auth challenge.
90 std::unique_ptr<net::test_server::HttpResponse> HandleTestAuthRequest( 90 std::unique_ptr<net::test_server::HttpResponse> HandleTestAuthRequest(
91 const net::test_server::HttpRequest& request) { 91 const net::test_server::HttpRequest& request) {
92 if (!base::StartsWith(request.relative_url, "/basic_auth", 92 if (!base::StartsWith(request.relative_url, "/basic_auth",
93 base::CompareCase::SENSITIVE)) 93 base::CompareCase::SENSITIVE))
94 return std::unique_ptr<net::test_server::HttpResponse>(); 94 return std::unique_ptr<net::test_server::HttpResponse>();
95 95
96 if (ContainsKey(request.headers, "Authorization")) { 96 if (base::ContainsKey(request.headers, "Authorization")) {
97 std::unique_ptr<net::test_server::BasicHttpResponse> http_response( 97 std::unique_ptr<net::test_server::BasicHttpResponse> http_response(
98 new net::test_server::BasicHttpResponse); 98 new net::test_server::BasicHttpResponse);
99 http_response->set_code(net::HTTP_OK); 99 http_response->set_code(net::HTTP_OK);
100 http_response->set_content("Success!"); 100 http_response->set_content("Success!");
101 return std::move(http_response); 101 return std::move(http_response);
102 } else { 102 } else {
103 std::unique_ptr<net::test_server::BasicHttpResponse> http_response( 103 std::unique_ptr<net::test_server::BasicHttpResponse> http_response(
104 new net::test_server::BasicHttpResponse); 104 new net::test_server::BasicHttpResponse);
105 http_response->set_code(net::HTTP_UNAUTHORIZED); 105 http_response->set_code(net::HTTP_UNAUTHORIZED);
106 http_response->AddCustomHeader("WWW-Authenticate", 106 http_response->AddCustomHeader("WWW-Authenticate",
(...skipping 2939 matching lines...) Expand 10 before | Expand all | Expand 10 after
3046 // about all frames, not just the main one. The factories should receive 3046 // about all frames, not just the main one. The factories should receive
3047 // messages for non-main frames, in particular 3047 // messages for non-main frames, in particular
3048 // AutofillHostMsg_PasswordFormsParsed. If that were the first time the 3048 // AutofillHostMsg_PasswordFormsParsed. If that were the first time the
3049 // factories hear about such frames, this would crash. 3049 // factories hear about such frames, this would crash.
3050 tab_strip_model->AddWebContents(detached_web_contents.release(), -1, 3050 tab_strip_model->AddWebContents(detached_web_contents.release(), -1,
3051 ::ui::PAGE_TRANSITION_AUTO_TOPLEVEL, 3051 ::ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
3052 TabStripModel::ADD_ACTIVE); 3052 TabStripModel::ADD_ACTIVE);
3053 } 3053 }
3054 3054
3055 } // namespace password_manager 3055 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698