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

Side by Side Diff: components/autofill/core/browser/autofill_manager.cc

Issue 726923004: Cleanup: Use http/https constants in components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "components/autofill/core/browser/autofill_manager.h" 5 #include "components/autofill/core/browser/autofill_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <map> 10 #include <map>
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 if (form_structure.field(i)->section() == section && 110 if (form_structure.field(i)->section() == section &&
111 form.fields[i].is_autofilled) { 111 form.fields[i].is_autofilled) {
112 return true; 112 return true;
113 } 113 }
114 } 114 }
115 115
116 return false; 116 return false;
117 } 117 }
118 118
119 bool FormIsHTTPS(const FormStructure& form) { 119 bool FormIsHTTPS(const FormStructure& form) {
120 // TODO(blundell): Change this to use a constant once crbug.com/306258 is 120 return form.source_url().SchemeIs(url::kHttpsScheme);
121 // fixed.
122 return form.source_url().SchemeIs("https");
123 } 121 }
124 122
125 // Uses the existing personal data in |profiles| and |credit_cards| to determine 123 // Uses the existing personal data in |profiles| and |credit_cards| to determine
126 // possible field types for the |submitted_form|. This is potentially 124 // possible field types for the |submitted_form|. This is potentially
127 // expensive -- on the order of 50ms even for a small set of |stored_data|. 125 // expensive -- on the order of 50ms even for a small set of |stored_data|.
128 // Hence, it should not run on the UI thread -- to avoid locking up the UI -- 126 // Hence, it should not run on the UI thread -- to avoid locking up the UI --
129 // nor on the IO thread -- to avoid blocking IPC calls. 127 // nor on the IO thread -- to avoid blocking IPC calls.
130 void DeterminePossibleFieldTypesForUpload( 128 void DeterminePossibleFieldTypesForUpload(
131 const std::vector<AutofillProfile>& profiles, 129 const std::vector<AutofillProfile>& profiles,
132 const std::vector<CreditCard>& credit_cards, 130 const std::vector<CreditCard>& credit_cards,
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 return false; 1244 return false;
1247 1245
1248 // Disregard forms that we wouldn't ever autofill in the first place. 1246 // Disregard forms that we wouldn't ever autofill in the first place.
1249 if (!form.ShouldBeParsed()) 1247 if (!form.ShouldBeParsed())
1250 return false; 1248 return false;
1251 1249
1252 return true; 1250 return true;
1253 } 1251 }
1254 1252
1255 } // namespace autofill 1253 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698