Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/automation/testing_automation_provider.h" | 5 #include "chrome/browser/automation/testing_automation_provider.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 4294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4305 break; | 4305 break; |
| 4306 } | 4306 } |
| 4307 } | 4307 } |
| 4308 } | 4308 } |
| 4309 credit_cards.push_back(card); | 4309 credit_cards.push_back(card); |
| 4310 } | 4310 } |
| 4311 return credit_cards; | 4311 return credit_cards; |
| 4312 } | 4312 } |
| 4313 | 4313 |
| 4314 /* static */ | 4314 /* static */ |
| 4315 // Strings ordered by order of fields when adding a profile in Autofill prefs. | |
|
dennis_jeffrey
2011/03/27 16:42:35
Recommend moving this comment down below right abo
dyu1
2011/03/29 03:07:52
Done.
| |
| 4315 std::map<AutofillFieldType, std::string> | 4316 std::map<AutofillFieldType, std::string> |
| 4316 TestingAutomationProvider::GetAutofillFieldToStringMap() { | 4317 TestingAutomationProvider::GetAutofillFieldToStringMap() { |
| 4317 std::map<AutofillFieldType, std::string> autofill_type_to_string; | 4318 std::map<AutofillFieldType, std::string> autofill_type_to_string; |
| 4318 autofill_type_to_string[NAME_FIRST] = "NAME_FIRST"; | 4319 autofill_type_to_string[NAME_FIRST] = "NAME_FIRST"; |
| 4319 autofill_type_to_string[NAME_MIDDLE] = "NAME_MIDDLE"; | 4320 autofill_type_to_string[NAME_MIDDLE] = "NAME_MIDDLE"; |
| 4320 autofill_type_to_string[NAME_LAST] = "NAME_LAST"; | 4321 autofill_type_to_string[NAME_LAST] = "NAME_LAST"; |
| 4321 autofill_type_to_string[COMPANY_NAME] = "COMPANY_NAME"; | 4322 autofill_type_to_string[COMPANY_NAME] = "COMPANY_NAME"; |
| 4322 autofill_type_to_string[EMAIL_ADDRESS] = "EMAIL_ADDRESS"; | 4323 autofill_type_to_string[EMAIL_ADDRESS] = "EMAIL_ADDRESS"; |
| 4323 autofill_type_to_string[ADDRESS_HOME_LINE1] = "ADDRESS_HOME_LINE1"; | 4324 autofill_type_to_string[ADDRESS_HOME_LINE1] = "ADDRESS_HOME_LINE1"; |
| 4324 autofill_type_to_string[ADDRESS_HOME_LINE2] = "ADDRESS_HOME_LINE2"; | 4325 autofill_type_to_string[ADDRESS_HOME_LINE2] = "ADDRESS_HOME_LINE2"; |
| 4325 autofill_type_to_string[ADDRESS_HOME_CITY] = "ADDRESS_HOME_CITY"; | 4326 autofill_type_to_string[ADDRESS_HOME_CITY] = "ADDRESS_HOME_CITY"; |
| 4326 autofill_type_to_string[ADDRESS_HOME_STATE] = "ADDRESS_HOME_STATE"; | 4327 autofill_type_to_string[ADDRESS_HOME_STATE] = "ADDRESS_HOME_STATE"; |
| 4327 autofill_type_to_string[ADDRESS_HOME_ZIP] = "ADDRESS_HOME_ZIP"; | 4328 autofill_type_to_string[ADDRESS_HOME_ZIP] = "ADDRESS_HOME_ZIP"; |
| 4328 autofill_type_to_string[ADDRESS_HOME_COUNTRY] = "ADDRESS_HOME_COUNTRY"; | 4329 autofill_type_to_string[ADDRESS_HOME_COUNTRY] = "ADDRESS_HOME_COUNTRY"; |
| 4330 autofill_type_to_string[PHONE_HOME_COUNTRY_CODE] = | |
| 4331 "PHONE_HOME_COUNTRY_CODE"; | |
| 4332 autofill_type_to_string[PHONE_HOME_CITY_CODE] = "PHONE_HOME_CITY_CODE"; | |
| 4329 autofill_type_to_string[PHONE_HOME_WHOLE_NUMBER] = | 4333 autofill_type_to_string[PHONE_HOME_WHOLE_NUMBER] = |
| 4330 "PHONE_HOME_WHOLE_NUMBER"; | 4334 "PHONE_HOME_WHOLE_NUMBER"; |
| 4335 autofill_type_to_string[PHONE_FAX_COUNTRY_CODE] = "PHONE_FAX_COUNTRY_CODE"; | |
| 4336 autofill_type_to_string[PHONE_FAX_CITY_CODE] = "PHONE_FAX_CITY_CODE"; | |
| 4331 autofill_type_to_string[PHONE_FAX_WHOLE_NUMBER] = "PHONE_FAX_WHOLE_NUMBER"; | 4337 autofill_type_to_string[PHONE_FAX_WHOLE_NUMBER] = "PHONE_FAX_WHOLE_NUMBER"; |
| 4332 autofill_type_to_string[NAME_FIRST] = "NAME_FIRST"; | |
| 4333 return autofill_type_to_string; | 4338 return autofill_type_to_string; |
| 4334 } | 4339 } |
| 4335 | 4340 |
| 4336 /* static */ | 4341 /* static */ |
| 4337 std::map<AutofillFieldType, std::string> | 4342 std::map<AutofillFieldType, std::string> |
| 4338 TestingAutomationProvider::GetCreditCardFieldToStringMap() { | 4343 TestingAutomationProvider::GetCreditCardFieldToStringMap() { |
| 4339 std::map<AutofillFieldType, std::string> credit_card_type_to_string; | 4344 std::map<AutofillFieldType, std::string> credit_card_type_to_string; |
| 4340 credit_card_type_to_string[CREDIT_CARD_NAME] = "CREDIT_CARD_NAME"; | 4345 credit_card_type_to_string[CREDIT_CARD_NAME] = "CREDIT_CARD_NAME"; |
| 4341 credit_card_type_to_string[CREDIT_CARD_NUMBER] = "CREDIT_CARD_NUMBER"; | 4346 credit_card_type_to_string[CREDIT_CARD_NUMBER] = "CREDIT_CARD_NUMBER"; |
| 4342 credit_card_type_to_string[CREDIT_CARD_EXP_MONTH] = "CREDIT_CARD_EXP_MONTH"; | 4347 credit_card_type_to_string[CREDIT_CARD_EXP_MONTH] = "CREDIT_CARD_EXP_MONTH"; |
| (...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5200 // If you change this, update Observer for NotificationType::SESSION_END | 5205 // If you change this, update Observer for NotificationType::SESSION_END |
| 5201 // below. | 5206 // below. |
| 5202 MessageLoop::current()->PostTask(FROM_HERE, | 5207 MessageLoop::current()->PostTask(FROM_HERE, |
| 5203 NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider)); | 5208 NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider)); |
| 5204 } | 5209 } |
| 5205 } | 5210 } |
| 5206 | 5211 |
| 5207 void TestingAutomationProvider::OnRemoveProvider() { | 5212 void TestingAutomationProvider::OnRemoveProvider() { |
| 5208 AutomationProviderList::GetInstance()->RemoveProvider(this); | 5213 AutomationProviderList::GetInstance()->RemoveProvider(this); |
| 5209 } | 5214 } |
| OLD | NEW |