| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/extensions/api/autofill_private/autofill_private_api.h" | 5 #include "chrome/browser/extensions/api/autofill_private/autofill_private_api.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> |
| 8 | 9 |
| 9 #include "base/guid.h" | 10 #include "base/guid.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 11 #include "base/values.h" | 12 #include "base/values.h" |
| 12 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 13 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
| 13 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
| 14 #include "chrome/common/extensions/api/autofill_private.h" | 15 #include "chrome/common/extensions/api/autofill_private.h" |
| 15 #include "chrome/grit/generated_resources.h" | 16 #include "chrome/grit/generated_resources.h" |
| 16 #include "components/autofill/core/browser/autofill_profile.h" | 17 #include "components/autofill/core/browser/autofill_profile.h" |
| 17 #include "components/autofill/core/browser/personal_data_manager.h" | 18 #include "components/autofill/core/browser/personal_data_manager.h" |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 | 399 |
| 399 api::autofill_private::ValidatePhoneParams* params = ¶meters->params; | 400 api::autofill_private::ValidatePhoneParams* params = ¶meters->params; |
| 400 | 401 |
| 401 // Extract the phone numbers into a ListValue. | 402 // Extract the phone numbers into a ListValue. |
| 402 scoped_ptr<base::ListValue> phoneNumbers(new base::ListValue); | 403 scoped_ptr<base::ListValue> phoneNumbers(new base::ListValue); |
| 403 phoneNumbers->AppendStrings(params->phone_numbers); | 404 phoneNumbers->AppendStrings(params->phone_numbers); |
| 404 | 405 |
| 405 RemoveDuplicatePhoneNumberAtIndex( | 406 RemoveDuplicatePhoneNumberAtIndex( |
| 406 params->index_of_new_number, params->country_code, phoneNumbers.get()); | 407 params->index_of_new_number, params->country_code, phoneNumbers.get()); |
| 407 | 408 |
| 408 return RespondNow(OneArgument(phoneNumbers.Pass())); | 409 return RespondNow(OneArgument(std::move(phoneNumbers))); |
| 409 } | 410 } |
| 410 | 411 |
| 411 //////////////////////////////////////////////////////////////////////////////// | 412 //////////////////////////////////////////////////////////////////////////////// |
| 412 // AutofillPrivateMaskCreditCardFunction | 413 // AutofillPrivateMaskCreditCardFunction |
| 413 | 414 |
| 414 AutofillPrivateMaskCreditCardFunction::AutofillPrivateMaskCreditCardFunction() | 415 AutofillPrivateMaskCreditCardFunction::AutofillPrivateMaskCreditCardFunction() |
| 415 : chrome_details_(this) {} | 416 : chrome_details_(this) {} |
| 416 | 417 |
| 417 AutofillPrivateMaskCreditCardFunction:: | 418 AutofillPrivateMaskCreditCardFunction:: |
| 418 ~AutofillPrivateMaskCreditCardFunction() {} | 419 ~AutofillPrivateMaskCreditCardFunction() {} |
| (...skipping 10 matching lines...) Expand all Loading... |
| 429 error_ = kErrorDataUnavailable; | 430 error_ = kErrorDataUnavailable; |
| 430 return RespondNow(NoArguments()); | 431 return RespondNow(NoArguments()); |
| 431 } | 432 } |
| 432 | 433 |
| 433 personal_data->ResetFullServerCard(parameters->guid); | 434 personal_data->ResetFullServerCard(parameters->guid); |
| 434 | 435 |
| 435 return RespondNow(NoArguments()); | 436 return RespondNow(NoArguments()); |
| 436 } | 437 } |
| 437 | 438 |
| 438 } // namespace extensions | 439 } // namespace extensions |
| OLD | NEW |