| 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/autofill/autofill_manager.h" | 5 #include "chrome/browser/autofill/autofill_manager.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 elements->assign(elements_copy.begin(), elements_copy.end()); | 85 elements->assign(elements_copy.begin(), elements_copy.end()); |
| 86 unique_ids->assign(unique_ids_copy.begin(), unique_ids_copy.end()); | 86 unique_ids->assign(unique_ids_copy.begin(), unique_ids_copy.end()); |
| 87 } | 87 } |
| 88 | 88 |
| 89 bool FormIsHTTPS(FormStructure* form) { | 89 bool FormIsHTTPS(FormStructure* form) { |
| 90 return form->source_url().SchemeIs(chrome::kHttpsScheme); | 90 return form->source_url().SchemeIs(chrome::kHttpsScheme); |
| 91 } | 91 } |
| 92 | 92 |
| 93 } // namespace | 93 } // namespace |
| 94 | 94 |
| 95 // TODO(jhawkins): Maybe this should be in a grd file? | |
| 96 const char* kAutoFillLearnMoreUrl = | |
| 97 "http://www.google.com/support/chrome/bin/answer.py?answer=142893"; | |
| 98 | |
| 99 AutoFillManager::AutoFillManager(TabContents* tab_contents) | 95 AutoFillManager::AutoFillManager(TabContents* tab_contents) |
| 100 : tab_contents_(tab_contents), | 96 : tab_contents_(tab_contents), |
| 101 personal_data_(NULL), | 97 personal_data_(NULL), |
| 102 download_manager_(tab_contents_->profile()), | 98 download_manager_(tab_contents_->profile()), |
| 103 disable_download_manager_requests_(false), | 99 disable_download_manager_requests_(false), |
| 104 cc_infobar_(NULL) { | 100 cc_infobar_(NULL) { |
| 105 DCHECK(tab_contents); | 101 DCHECK(tab_contents); |
| 106 | 102 |
| 107 // |personal_data_| is NULL when using TestTabContents. | 103 // |personal_data_| is NULL when using TestTabContents. |
| 108 personal_data_ = | 104 personal_data_ = |
| (...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 | 780 |
| 785 // When receiving IDs (across processes) from the renderer we unpack credit card | 781 // When receiving IDs (across processes) from the renderer we unpack credit card |
| 786 // and profile IDs from a single integer. Credit card IDs are stored in the | 782 // and profile IDs from a single integer. Credit card IDs are stored in the |
| 787 // high word and profile IDs are stored in the low word. | 783 // high word and profile IDs are stored in the low word. |
| 788 // static | 784 // static |
| 789 void AutoFillManager::UnpackIDs(int id, int* cc_id, int* profile_id) { | 785 void AutoFillManager::UnpackIDs(int id, int* cc_id, int* profile_id) { |
| 790 *cc_id = id >> std::numeric_limits<unsigned short>::digits & | 786 *cc_id = id >> std::numeric_limits<unsigned short>::digits & |
| 791 std::numeric_limits<unsigned short>::max(); | 787 std::numeric_limits<unsigned short>::max(); |
| 792 *profile_id = id & std::numeric_limits<unsigned short>::max(); | 788 *profile_id = id & std::numeric_limits<unsigned short>::max(); |
| 793 } | 789 } |
| OLD | NEW |