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

Side by Side Diff: chrome/browser/extensions/api/autofill_private/autofill_private_api.cc

Issue 2025103003: ExtensionFunction: don't pass ownership of base::Value by raw pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
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 #include <utility>
9 9
10 #include "base/guid.h" 10 #include "base/guid.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 parameters = 290 parameters =
291 api::autofill_private::GetAddressComponents::Params::Create(*args_); 291 api::autofill_private::GetAddressComponents::Params::Create(*args_);
292 EXTENSION_FUNCTION_VALIDATE(parameters.get()); 292 EXTENSION_FUNCTION_VALIDATE(parameters.get());
293 293
294 autofill_private::AddressComponents components; 294 autofill_private::AddressComponents components;
295 PopulateAddressComponents( 295 PopulateAddressComponents(
296 parameters->country_code, 296 parameters->country_code,
297 g_browser_process->GetApplicationLocale(), 297 g_browser_process->GetApplicationLocale(),
298 &components); 298 &components);
299 299
300 return RespondNow(OneArgument(components.ToValue().release())); 300 return RespondNow(OneArgument(components.ToValue()));
301 } 301 }
302 302
303 //////////////////////////////////////////////////////////////////////////////// 303 ////////////////////////////////////////////////////////////////////////////////
304 // AutofillPrivateGetAddressListFunction 304 // AutofillPrivateGetAddressListFunction
305 305
306 AutofillPrivateGetAddressListFunction::AutofillPrivateGetAddressListFunction() 306 AutofillPrivateGetAddressListFunction::AutofillPrivateGetAddressListFunction()
307 : chrome_details_(this) {} 307 : chrome_details_(this) {}
308 308
309 AutofillPrivateGetAddressListFunction:: 309 AutofillPrivateGetAddressListFunction::
310 ~AutofillPrivateGetAddressListFunction() {} 310 ~AutofillPrivateGetAddressListFunction() {}
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 481
482 autofill_util::CreditCardEntryList creditCardList = 482 autofill_util::CreditCardEntryList creditCardList =
483 extensions::autofill_util::GenerateCreditCardList(*personal_data); 483 extensions::autofill_util::GenerateCreditCardList(*personal_data);
484 484
485 return RespondNow( 485 return RespondNow(
486 ArgumentList(api::autofill_private::GetCreditCardList::Results::Create( 486 ArgumentList(api::autofill_private::GetCreditCardList::Results::Create(
487 creditCardList))); 487 creditCardList)));
488 } 488 }
489 489
490 } // namespace extensions 490 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698