| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 // TODO(stuartmorgan): Convert most of this to private helpers in | 168 // TODO(stuartmorgan): Convert most of this to private helpers in |
| 169 // MacKeychainPasswordFormAdapter once it has sufficient higher-level public | 169 // MacKeychainPasswordFormAdapter once it has sufficient higher-level public |
| 170 // methods to provide test coverage. | 170 // methods to provide test coverage. |
| 171 namespace internal_keychain_helpers { | 171 namespace internal_keychain_helpers { |
| 172 | 172 |
| 173 // Returns a URL built from the given components. To create a URL without a | 173 // Returns a URL built from the given components. To create a URL without a |
| 174 // port, pass kAnyPort for the |port| parameter. | 174 // port, pass kAnyPort for the |port| parameter. |
| 175 GURL URLFromComponents(bool is_secure, const std::string& host, int port, | 175 GURL URLFromComponents(bool is_secure, const std::string& host, int port, |
| 176 const std::string& path) { | 176 const std::string& path) { |
| 177 GURL::Replacements url_components; | 177 GURL::Replacements url_components; |
| 178 std::string scheme(is_secure ? "https" : "http"); | 178 std::string scheme(is_secure ? "https" : "http"); // TODO(sqs): add httpsv |
| 179 url_components.SetSchemeStr(scheme); | 179 url_components.SetSchemeStr(scheme); |
| 180 url_components.SetHostStr(host); | 180 url_components.SetHostStr(host); |
| 181 std::string port_string; // Must remain in scope until after we do replacing. | 181 std::string port_string; // Must remain in scope until after we do replacing. |
| 182 if (port != kAnyPort) { | 182 if (port != kAnyPort) { |
| 183 std::ostringstream port_stringstream; | 183 std::ostringstream port_stringstream; |
| 184 port_stringstream << port; | 184 port_stringstream << port; |
| 185 port_string = port_stringstream.str(); | 185 port_string = port_stringstream.str(); |
| 186 url_components.SetPortStr(port_string); | 186 url_components.SetPortStr(port_string); |
| 187 } | 187 } |
| 188 url_components.SetPathStr(path); | 188 url_components.SetPathStr(path); |
| (...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1004 owned_keychain_adapter.SetFindsOnlyOwnedItems(true); | 1004 owned_keychain_adapter.SetFindsOnlyOwnedItems(true); |
| 1005 for (std::vector<PasswordForm*>::const_iterator i = forms.begin(); | 1005 for (std::vector<PasswordForm*>::const_iterator i = forms.begin(); |
| 1006 i != forms.end(); ++i) { | 1006 i != forms.end(); ++i) { |
| 1007 owned_keychain_adapter.RemovePassword(**i); | 1007 owned_keychain_adapter.RemovePassword(**i); |
| 1008 } | 1008 } |
| 1009 } | 1009 } |
| 1010 | 1010 |
| 1011 void PasswordStoreMac::CreateNotificationService() { | 1011 void PasswordStoreMac::CreateNotificationService() { |
| 1012 notification_service_.reset(new NotificationService); | 1012 notification_service_.reset(new NotificationService); |
| 1013 } | 1013 } |
| OLD | NEW |