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

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

Issue 6877130: These changes *are* for review :) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_field.h" 5 #include "chrome/browser/autofill/phone_field.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 ParseText(scanner, phone_field->GetExtensionRegex(), 320 ParseText(scanner, phone_field->GetExtensionRegex(),
321 &phone_field->parsed_phone_fields_[FIELD_EXTENSION]); 321 &phone_field->parsed_phone_fields_[FIELD_EXTENSION]);
322 322
323 return true; 323 return true;
324 } 324 }
325 325
326 void PhoneField::SetPhoneType(PhoneType phone_type) { 326 void PhoneField::SetPhoneType(PhoneType phone_type) {
327 // Field types are different as well, so we create a temporary phone number, 327 // Field types are different as well, so we create a temporary phone number,
328 // to get relevant field types. 328 // to get relevant field types.
329 if (phone_type == HOME_PHONE) 329 if (phone_type == HOME_PHONE)
330 number_.reset(new HomePhoneNumber); 330 number_.reset(new PhoneNumber(AutofillType::PHONE_HOME));
331 else 331 else
332 number_.reset(new FaxNumber); 332 number_.reset(new PhoneNumber(AutofillType::PHONE_FAX));
333 phone_type_ = phone_type; 333 phone_type_ = phone_type;
334 } 334 }
335 335
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698