• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "components/autofill/core/browser/autofill_data_model.h"
6 
7 #include "components/autofill/core/browser/autofill_type.h"
8 #include "url/gurl.h"
9 
10 namespace autofill {
11 
AutofillDataModel(const std::string & guid,const std::string & origin)12 AutofillDataModel::AutofillDataModel(const std::string& guid,
13                                      const std::string& origin)
14     : guid_(guid),
15       origin_(origin) {}
~AutofillDataModel()16 AutofillDataModel::~AutofillDataModel() {}
17 
GetInfoForVariant(const AutofillType & type,size_t variant,const std::string & app_locale) const18 base::string16 AutofillDataModel::GetInfoForVariant(
19     const AutofillType& type,
20     size_t variant,
21     const std::string& app_locale) const {
22   return GetInfo(type, app_locale);
23 }
24 
IsVerified() const25 bool AutofillDataModel::IsVerified() const {
26   return !origin_.empty() && !GURL(origin_).is_valid();
27 }
28 
29 }  // namespace autofill
30