OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/webui/options2/autofill_options_handler.h" | 5 #include "chrome/browser/ui/webui/options2/autofill_options_handler.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 const ListValue* extracted_list = NULL; | 254 const ListValue* extracted_list = NULL; |
255 ExtractPhoneNumberInformation(args, &index, &extracted_list, &country_code); | 255 ExtractPhoneNumberInformation(args, &index, &extracted_list, &country_code); |
256 | 256 |
257 scoped_ptr<ListValue> list(extracted_list->DeepCopy()); | 257 scoped_ptr<ListValue> list(extracted_list->DeepCopy()); |
258 RemoveDuplicatePhoneNumberAtIndex(index, country_code, list.get()); | 258 RemoveDuplicatePhoneNumberAtIndex(index, country_code, list.get()); |
259 return list.Pass(); | 259 return list.Pass(); |
260 } | 260 } |
261 | 261 |
262 } // namespace | 262 } // namespace |
263 | 263 |
264 namespace options2 { | 264 namespace options { |
265 | 265 |
266 AutofillOptionsHandler::AutofillOptionsHandler() | 266 AutofillOptionsHandler::AutofillOptionsHandler() |
267 : personal_data_(NULL) { | 267 : personal_data_(NULL) { |
268 } | 268 } |
269 | 269 |
270 AutofillOptionsHandler::~AutofillOptionsHandler() { | 270 AutofillOptionsHandler::~AutofillOptionsHandler() { |
271 if (personal_data_) | 271 if (personal_data_) |
272 personal_data_->RemoveObserver(this); | 272 personal_data_->RemoveObserver(this); |
273 } | 273 } |
274 | 274 |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 scoped_ptr<ListValue> list_value = ValidatePhoneArguments(args); | 619 scoped_ptr<ListValue> list_value = ValidatePhoneArguments(args); |
620 | 620 |
621 web_ui()->CallJavascriptFunction( | 621 web_ui()->CallJavascriptFunction( |
622 "AutofillEditAddressOverlay.setValidatedPhoneNumbers", *list_value); | 622 "AutofillEditAddressOverlay.setValidatedPhoneNumbers", *list_value); |
623 } | 623 } |
624 | 624 |
625 bool AutofillOptionsHandler::IsPersonalDataLoaded() const { | 625 bool AutofillOptionsHandler::IsPersonalDataLoaded() const { |
626 return personal_data_ && personal_data_->IsDataLoaded(); | 626 return personal_data_ && personal_data_->IsDataLoaded(); |
627 } | 627 } |
628 | 628 |
629 } // namespace options2 | 629 } // namespace options |
OLD | NEW |