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

Side by Side Diff: chrome/browser/autofill/phone_number.cc

Issue 3859003: FBTF: Even more ctor/virtual deinlining. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: Created 10 years, 2 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
OLDNEW
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/phone_number.h" 5 #include "chrome/browser/autofill/phone_number.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "chrome/browser/autofill/autofill_profile.h" 9 #include "chrome/browser/autofill/autofill_profile.h"
10 #include "chrome/browser/autofill/autofill_type.h" 10 #include "chrome/browser/autofill/autofill_type.h"
(...skipping 14 matching lines...) Expand all
25 AutoFillType::PHONE_CITY_CODE, 25 AutoFillType::PHONE_CITY_CODE,
26 AutoFillType::PHONE_COUNTRY_CODE, 26 AutoFillType::PHONE_COUNTRY_CODE,
27 AutoFillType::PHONE_CITY_AND_NUMBER, 27 AutoFillType::PHONE_CITY_AND_NUMBER,
28 AutoFillType::PHONE_WHOLE_NUMBER, 28 AutoFillType::PHONE_WHOLE_NUMBER,
29 }; 29 };
30 30
31 const int kAutoFillPhoneLength = arraysize(kAutoFillPhoneTypes); 31 const int kAutoFillPhoneLength = arraysize(kAutoFillPhoneTypes);
32 32
33 } // namespace 33 } // namespace
34 34
35 PhoneNumber::PhoneNumber() {}
36
37 PhoneNumber::~PhoneNumber() {}
38
35 void PhoneNumber::GetPossibleFieldTypes(const string16& text, 39 void PhoneNumber::GetPossibleFieldTypes(const string16& text,
36 FieldTypeSet* possible_types) const { 40 FieldTypeSet* possible_types) const {
37 string16 stripped_text(text); 41 string16 stripped_text(text);
38 StripPunctuation(&stripped_text); 42 StripPunctuation(&stripped_text);
39 if (!Validate(stripped_text)) 43 if (!Validate(stripped_text))
40 return; 44 return;
41 45
42 if (IsNumber(stripped_text)) 46 if (IsNumber(stripped_text))
43 possible_types->insert(GetNumberType()); 47 possible_types->insert(GetNumberType());
44 48
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 return false; 292 return false;
289 } 293 }
290 294
291 return true; 295 return true;
292 } 296 }
293 297
294 // Static. 298 // Static.
295 void PhoneNumber::StripPunctuation(string16* number) { 299 void PhoneNumber::StripPunctuation(string16* number) {
296 RemoveChars(*number, kPhoneNumberSeparators, number); 300 RemoveChars(*number, kPhoneNumberSeparators, number);
297 } 301 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698