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 4308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4319 autofill_type_to_string[NAME_MIDDLE] = "NAME_MIDDLE"; | 4319 autofill_type_to_string[NAME_MIDDLE] = "NAME_MIDDLE"; |
4320 autofill_type_to_string[NAME_LAST] = "NAME_LAST"; | 4320 autofill_type_to_string[NAME_LAST] = "NAME_LAST"; |
4321 autofill_type_to_string[COMPANY_NAME] = "COMPANY_NAME"; | 4321 autofill_type_to_string[COMPANY_NAME] = "COMPANY_NAME"; |
4322 autofill_type_to_string[EMAIL_ADDRESS] = "EMAIL_ADDRESS"; | 4322 autofill_type_to_string[EMAIL_ADDRESS] = "EMAIL_ADDRESS"; |
4323 autofill_type_to_string[ADDRESS_HOME_LINE1] = "ADDRESS_HOME_LINE1"; | 4323 autofill_type_to_string[ADDRESS_HOME_LINE1] = "ADDRESS_HOME_LINE1"; |
4324 autofill_type_to_string[ADDRESS_HOME_LINE2] = "ADDRESS_HOME_LINE2"; | 4324 autofill_type_to_string[ADDRESS_HOME_LINE2] = "ADDRESS_HOME_LINE2"; |
4325 autofill_type_to_string[ADDRESS_HOME_CITY] = "ADDRESS_HOME_CITY"; | 4325 autofill_type_to_string[ADDRESS_HOME_CITY] = "ADDRESS_HOME_CITY"; |
4326 autofill_type_to_string[ADDRESS_HOME_STATE] = "ADDRESS_HOME_STATE"; | 4326 autofill_type_to_string[ADDRESS_HOME_STATE] = "ADDRESS_HOME_STATE"; |
4327 autofill_type_to_string[ADDRESS_HOME_ZIP] = "ADDRESS_HOME_ZIP"; | 4327 autofill_type_to_string[ADDRESS_HOME_ZIP] = "ADDRESS_HOME_ZIP"; |
4328 autofill_type_to_string[ADDRESS_HOME_COUNTRY] = "ADDRESS_HOME_COUNTRY"; | 4328 autofill_type_to_string[ADDRESS_HOME_COUNTRY] = "ADDRESS_HOME_COUNTRY"; |
4329 autofill_type_to_string[PHONE_HOME_COUNTRY_CODE] = | |
4330 "PHONE_HOME_COUNTRY_CODE"; | |
4331 autofill_type_to_string[PHONE_HOME_CITY_CODE] = "PHONE_HOME_CITY_CODE"; | |
4329 autofill_type_to_string[PHONE_HOME_WHOLE_NUMBER] = | 4332 autofill_type_to_string[PHONE_HOME_WHOLE_NUMBER] = |
4330 "PHONE_HOME_WHOLE_NUMBER"; | 4333 "PHONE_HOME_WHOLE_NUMBER"; |
4334 autofill_type_to_string[PHONE_FAX_COUNTRY_CODE] = "PHONE_FAX_COUNTRY_CODE"; | |
4335 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"; | 4336 autofill_type_to_string[PHONE_FAX_WHOLE_NUMBER] = "PHONE_FAX_WHOLE_NUMBER"; |
dennis_jeffrey
2011/03/25 16:56:14
It might be a good idea to alphabetize these types
dyu1
2011/03/25 19:10:57
I believe these strings are in the order or how mo
dennis_jeffrey
2011/03/25 21:08:45
Ok, if there's already some ordering to these valu
| |
4332 autofill_type_to_string[NAME_FIRST] = "NAME_FIRST"; | |
4333 return autofill_type_to_string; | 4337 return autofill_type_to_string; |
4334 } | 4338 } |
4335 | 4339 |
4336 /* static */ | 4340 /* static */ |
4337 std::map<AutofillFieldType, std::string> | 4341 std::map<AutofillFieldType, std::string> |
4338 TestingAutomationProvider::GetCreditCardFieldToStringMap() { | 4342 TestingAutomationProvider::GetCreditCardFieldToStringMap() { |
4339 std::map<AutofillFieldType, std::string> credit_card_type_to_string; | 4343 std::map<AutofillFieldType, std::string> credit_card_type_to_string; |
4340 credit_card_type_to_string[CREDIT_CARD_NAME] = "CREDIT_CARD_NAME"; | 4344 credit_card_type_to_string[CREDIT_CARD_NAME] = "CREDIT_CARD_NAME"; |
4341 credit_card_type_to_string[CREDIT_CARD_NUMBER] = "CREDIT_CARD_NUMBER"; | 4345 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"; | 4346 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 | 5204 // If you change this, update Observer for NotificationType::SESSION_END |
5201 // below. | 5205 // below. |
5202 MessageLoop::current()->PostTask(FROM_HERE, | 5206 MessageLoop::current()->PostTask(FROM_HERE, |
5203 NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider)); | 5207 NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider)); |
5204 } | 5208 } |
5205 } | 5209 } |
5206 | 5210 |
5207 void TestingAutomationProvider::OnRemoveProvider() { | 5211 void TestingAutomationProvider::OnRemoveProvider() { |
5208 AutomationProviderList::GetInstance()->RemoveProvider(this); | 5212 AutomationProviderList::GetInstance()->RemoveProvider(this); |
5209 } | 5213 } |
OLD | NEW |