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

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

Issue 8733002: Mac: speculative fix for bug 105759 based on the assumption that we have a realm with an empty path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/password_manager/password_store_mac.h" 5 #include "chrome/browser/password_manager/password_store_mac.h"
6 #include "chrome/browser/password_manager/password_store_mac_internal.h" 6 #include "chrome/browser/password_manager/password_store_mac_internal.h"
7 7
8 #include <CoreServices/CoreServices.h> 8 #include <CoreServices/CoreServices.h>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 } 680 }
681 681
682 if (server) 682 if (server)
683 *server = realm_as_url.host(); 683 *server = realm_as_url.host();
684 if (is_secure) 684 if (is_secure)
685 *is_secure = realm_as_url.SchemeIsSecure(); 685 *is_secure = realm_as_url.SchemeIsSecure();
686 if (port) 686 if (port)
687 *port = realm_as_url.has_port() ? atoi(realm_as_url.port().c_str()) : 0; 687 *port = realm_as_url.has_port() ? atoi(realm_as_url.port().c_str()) : 0;
688 if (security_domain) { 688 if (security_domain) {
689 // Strip the leading '/' off of the path to get the security domain. 689 // Strip the leading '/' off of the path to get the security domain.
690 *security_domain = realm_as_url.path().substr(1); 690 if (realm_as_url.path().length() > 0)
691 *security_domain = realm_as_url.path().substr(1);
692 else
693 security_domain->clear();
691 } 694 }
692 return true; 695 return true;
693 } 696 }
694 697
695 // Returns the Keychain SecAuthenticationType type corresponding to |scheme|. 698 // Returns the Keychain SecAuthenticationType type corresponding to |scheme|.
696 SecAuthenticationType MacKeychainPasswordFormAdapter::AuthTypeForScheme( 699 SecAuthenticationType MacKeychainPasswordFormAdapter::AuthTypeForScheme(
697 PasswordForm::Scheme scheme) { 700 PasswordForm::Scheme scheme) {
698 switch (scheme) { 701 switch (scheme) {
699 case PasswordForm::SCHEME_HTML: return kSecAuthenticationTypeHTMLForm; 702 case PasswordForm::SCHEME_HTML: return kSecAuthenticationTypeHTMLForm;
700 case PasswordForm::SCHEME_BASIC: return kSecAuthenticationTypeHTTPBasic; 703 case PasswordForm::SCHEME_BASIC: return kSecAuthenticationTypeHTTPBasic;
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 owned_keychain_adapter.SetFindsOnlyOwnedItems(true); 1011 owned_keychain_adapter.SetFindsOnlyOwnedItems(true);
1009 for (std::vector<PasswordForm*>::const_iterator i = forms.begin(); 1012 for (std::vector<PasswordForm*>::const_iterator i = forms.begin();
1010 i != forms.end(); ++i) { 1013 i != forms.end(); ++i) {
1011 owned_keychain_adapter.RemovePassword(**i); 1014 owned_keychain_adapter.RemovePassword(**i);
1012 } 1015 }
1013 } 1016 }
1014 1017
1015 void PasswordStoreMac::CreateNotificationService() { 1018 void PasswordStoreMac::CreateNotificationService() {
1016 notification_service_.reset(new NotificationServiceImpl); 1019 notification_service_.reset(new NotificationServiceImpl);
1017 } 1020 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698