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/autofill/personal_data_manager.h" | 5 #include "chrome/browser/autofill/personal_data_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 | 420 |
421 // Remove the profile. | 421 // Remove the profile. |
422 wds->RemoveAutofillProfile(guid); | 422 wds->RemoveAutofillProfile(guid); |
423 | 423 |
424 // Refresh our local cache and send notifications to observers. | 424 // Refresh our local cache and send notifications to observers. |
425 Refresh(); | 425 Refresh(); |
426 } | 426 } |
427 | 427 |
428 AutofillProfile* PersonalDataManager::GetProfileByGUID( | 428 AutofillProfile* PersonalDataManager::GetProfileByGUID( |
429 const std::string& guid) { | 429 const std::string& guid) { |
430 for (std::vector<AutofillProfile*>::iterator iter = web_profiles_->begin(); | 430 for (std::vector<AutofillProfile*>::iterator iter = web_profiles_.begin(); |
431 iter != web_profiles_->end(); ++iter) { | 431 iter != web_profiles_.end(); ++iter) { |
432 if ((*iter)->guid() == guid) | 432 if ((*iter)->guid() == guid) |
433 return *iter; | 433 return *iter; |
434 } | 434 } |
435 return NULL; | 435 return NULL; |
436 } | 436 } |
437 | 437 |
438 void PersonalDataManager::AddCreditCard(const CreditCard& credit_card) { | 438 void PersonalDataManager::AddCreditCard(const CreditCard& credit_card) { |
439 if (profile_->IsOffTheRecord()) | 439 if (profile_->IsOffTheRecord()) |
440 return; | 440 return; |
441 | 441 |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
941 } | 941 } |
942 | 942 |
943 const AutofillMetrics* PersonalDataManager::metric_logger() const { | 943 const AutofillMetrics* PersonalDataManager::metric_logger() const { |
944 return metric_logger_.get(); | 944 return metric_logger_.get(); |
945 } | 945 } |
946 | 946 |
947 void PersonalDataManager::set_metric_logger( | 947 void PersonalDataManager::set_metric_logger( |
948 const AutofillMetrics* metric_logger) { | 948 const AutofillMetrics* metric_logger) { |
949 metric_logger_.reset(metric_logger); | 949 metric_logger_.reset(metric_logger); |
950 } | 950 } |
OLD | NEW |