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

Side by Side Diff: components/password_manager/core/browser/affiliation_utils.cc

Issue 1171333003: Move net::FormatUrl and friends outside of //net and into //components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again now that CQ is fixed Created 5 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 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 "components/password_manager/core/browser/affiliation_utils.h" 5 #include "components/password_manager/core/browser/affiliation_utils.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <ostream> 8 #include <ostream>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/metrics/field_trial.h" 12 #include "base/metrics/field_trial.h"
13 #include "base/strings/string_piece.h" 13 #include "base/strings/string_piece.h"
14 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
15 #include "components/autofill/core/common/password_form.h" 15 #include "components/autofill/core/common/password_form.h"
16 #include "components/password_manager/core/common/password_manager_switches.h" 16 #include "components/password_manager/core/common/password_manager_switches.h"
17 #include "components/url_formatter/url_formatter.h"
17 #include "components/variations/variations_associated_data.h" 18 #include "components/variations/variations_associated_data.h"
18 #include "net/base/escape.h" 19 #include "net/base/escape.h"
19 #include "url/third_party/mozilla/url_parse.h" 20 #include "url/third_party/mozilla/url_parse.h"
20 #include "url/url_canon_stdstring.h" 21 #include "url/url_canon_stdstring.h"
21 22
22 namespace password_manager { 23 namespace password_manager {
23 24
24 namespace { 25 namespace {
25 26
26 // The scheme used for identifying Android applications. 27 // The scheme used for identifying Android applications.
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 return facet.IsValidAndroidFacetURI(); 336 return facet.IsValidAndroidFacetURI();
336 } 337 }
337 338
338 std::string GetHumanReadableOrigin(const autofill::PasswordForm& password_form, 339 std::string GetHumanReadableOrigin(const autofill::PasswordForm& password_form,
339 const std::string& languages) { 340 const std::string& languages) {
340 password_manager::FacetURI facet_uri = 341 password_manager::FacetURI facet_uri =
341 password_manager::FacetURI::FromPotentiallyInvalidSpec( 342 password_manager::FacetURI::FromPotentiallyInvalidSpec(
342 password_form.signon_realm); 343 password_form.signon_realm);
343 if (facet_uri.IsValidAndroidFacetURI()) 344 if (facet_uri.IsValidAndroidFacetURI())
344 return facet_uri.scheme() + "://" + facet_uri.android_package_name(); 345 return facet_uri.scheme() + "://" + facet_uri.android_package_name();
345 return base::UTF16ToUTF8(net::FormatUrl(password_form.origin, languages)); 346 return base::UTF16ToUTF8(
347 url_formatter::FormatUrl(password_form.origin, languages));
346 } 348 }
349
347 } // namespace password_manager 350 } // namespace password_manager
OLDNEW
« no previous file with comments | « components/password_manager/core/browser/DEPS ('k') | components/policy/core/browser/url_blacklist_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698