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

Side by Side Diff: chrome/browser/ui/passwords/password_manager_presenter.cc

Issue 2716583003: Rename Origin.unique() to opaque().
Patch Set: Update new uses post-rebase Created 3 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 "chrome/browser/ui/passwords/password_manager_presenter.h" 5 #include "chrome/browser/ui/passwords/password_manager_presenter.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <tuple> 8 #include <tuple>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // information is added. For Android credentials this includes the full 105 // information is added. For Android credentials this includes the full
106 // canonical spec which is guaranteed to be unique for a given App. 106 // canonical spec which is guaranteed to be unique for a given App.
107 key += is_android_uri ? facet_uri.canonical_spec() 107 key += is_android_uri ? facet_uri.canonical_spec()
108 : password_manager::SplitByDotAndReverse(shown_origin); 108 : password_manager::SplitByDotAndReverse(shown_origin);
109 109
110 if (entry_type == PasswordEntryType::SAVED) { 110 if (entry_type == PasswordEntryType::SAVED) {
111 key += kSortKeyPartsSeparator + base::UTF16ToUTF8(form.username_value) + 111 key += kSortKeyPartsSeparator + base::UTF16ToUTF8(form.username_value) +
112 kSortKeyPartsSeparator + base::UTF16ToUTF8(form.password_value); 112 kSortKeyPartsSeparator + base::UTF16ToUTF8(form.password_value);
113 113
114 key += kSortKeyPartsSeparator; 114 key += kSortKeyPartsSeparator;
115 if (!form.federation_origin.unique()) 115 if (!form.federation_origin.opaque())
116 key += form.federation_origin.host(); 116 key += form.federation_origin.host();
117 else 117 else
118 key += kSortKeyNoFederationSymbol; 118 key += kSortKeyNoFederationSymbol;
119 } 119 }
120 120
121 // To separate HTTP/HTTPS credentials, add the scheme to the key. 121 // To separate HTTP/HTTPS credentials, add the scheme to the key.
122 return key += kSortKeyPartsSeparator + link_url.scheme(); 122 return key += kSortKeyPartsSeparator + link_url.scheme();
123 } 123 }
124 124
125 // Finds duplicates of |form| in |duplicates|, removes them from |store| and 125 // Finds duplicates of |form| in |duplicates|, removes them from |store| and
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 414
415 void PasswordManagerPresenter::PasswordExceptionListPopulater:: 415 void PasswordManagerPresenter::PasswordExceptionListPopulater::
416 OnGetPasswordStoreResults( 416 OnGetPasswordStoreResults(
417 std::vector<std::unique_ptr<autofill::PasswordForm>> results) { 417 std::vector<std::unique_ptr<autofill::PasswordForm>> results) {
418 page_->password_exception_list_ = std::move(results); 418 page_->password_exception_list_ = std::move(results);
419 page_->SortEntriesAndHideDuplicates(&page_->password_exception_list_, 419 page_->SortEntriesAndHideDuplicates(&page_->password_exception_list_,
420 &page_->password_exception_duplicates_, 420 &page_->password_exception_duplicates_,
421 PasswordEntryType::BLACKLISTED); 421 PasswordEntryType::BLACKLISTED);
422 page_->SetPasswordExceptionList(); 422 page_->SetPasswordExceptionList();
423 } 423 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698