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

Side by Side Diff: ios/web/public/test/http_server/http_auth_response_provider.mm

Issue 2898733003: Split up ios/web:test_support. (Closed)
Patch Set: don't break downstream clients Created 3 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #import "ios/web/public/test/response_providers/http_auth_response_provider.h" 5 #import "ios/web/public/test/http_server/http_auth_response_provider.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "net/http/http_request_headers.h" 9 #include "net/http/http_request_headers.h"
10 #include "net/http/http_response_headers.h" 10 #include "net/http/http_response_headers.h"
11 11
12 namespace web { 12 namespace web {
13 13
14 HttpAuthResponseProvider::HttpAuthResponseProvider(const GURL& url, 14 HttpAuthResponseProvider::HttpAuthResponseProvider(const GURL& url,
15 const std::string& realm, 15 const std::string& realm,
(...skipping 28 matching lines...) Expand all
44 std::string auth = 44 std::string auth =
45 base::StringPrintf("%s:%s", username_.c_str(), password_.c_str()); 45 base::StringPrintf("%s:%s", username_.c_str(), password_.c_str());
46 std::string encoded_auth; 46 std::string encoded_auth;
47 base::Base64Encode(auth, &encoded_auth); 47 base::Base64Encode(auth, &encoded_auth);
48 return header == base::StringPrintf("Basic %s", encoded_auth.c_str()); 48 return header == base::StringPrintf("Basic %s", encoded_auth.c_str());
49 } 49 }
50 return false; 50 return false;
51 } 51 }
52 52
53 } // namespace web 53 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/public/test/http_server/http_auth_response_provider.h ('k') | ios/web/public/test/http_server/http_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698