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

Side by Side Diff: chrome/browser/autocomplete_history_manager.cc

Issue 2862042: Don't save SSNs--quick style fix. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 5 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 | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/autocomplete_history_manager.h" 5 #include "chrome/browser/autocomplete_history_manager.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // http://www.socialsecurity.gov/employer/stateweb.htm 42 // http://www.socialsecurity.gov/employer/stateweb.htm
43 // http://www.socialsecurity.gov/employer/ssnvhighgroup.htm 43 // http://www.socialsecurity.gov/employer/ssnvhighgroup.htm
44 44
45 string16 area_string = number_string.substr(0, 3); 45 string16 area_string = number_string.substr(0, 3);
46 string16 group_string = number_string.substr(3, 2); 46 string16 group_string = number_string.substr(3, 2);
47 string16 serial_string = number_string.substr(5, 4); 47 string16 serial_string = number_string.substr(5, 4);
48 48
49 int area = StringToInt(area_string); 49 int area = StringToInt(area_string);
50 if (area < 1 || 50 if (area < 1 ||
51 area == 666 || 51 area == 666 ||
52 area > 733 && area < 750 || 52 (area > 733 && area < 750) ||
53 area > 772) 53 area > 772)
54 return false; 54 return false;
55 55
56 int group = StringToInt(group_string); 56 int group = StringToInt(group_string);
57 if (group == 0) 57 if (group == 0)
58 return false; 58 return false;
59 59
60 int serial = StringToInt(serial_string); 60 int serial = StringToInt(serial_string);
61 if (serial == 0) 61 if (serial == 0)
62 return false; 62 return false;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 DCHECK(result->GetType() == AUTOFILL_VALUE_RESULT); 178 DCHECK(result->GetType() == AUTOFILL_VALUE_RESULT);
179 const WDResult<std::vector<string16> >* autofill_result = 179 const WDResult<std::vector<string16> >* autofill_result =
180 static_cast<const WDResult<std::vector<string16> >*>(result); 180 static_cast<const WDResult<std::vector<string16> >*>(result);
181 host->AutocompleteSuggestionsReturned( 181 host->AutocompleteSuggestionsReturned(
182 query_id_, autofill_result->GetValue(), -1); 182 query_id_, autofill_result->GetValue(), -1);
183 } else { 183 } else {
184 host->AutocompleteSuggestionsReturned( 184 host->AutocompleteSuggestionsReturned(
185 query_id_, std::vector<string16>(), -1); 185 query_id_, std::vector<string16>(), -1);
186 } 186 }
187 } 187 }
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