Only grant permissions to new extensions from sync if they have the expected version
[chromium-blink-merge.git] / components / autofill / core / browser / autofill_data_model.cc
blob7241784753678e8f9c7ed121640c8d67f292a0ad
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.
5 #include "components/autofill/core/browser/autofill_data_model.h"
7 #include "components/autofill/core/browser/autofill_type.h"
8 #include "url/gurl.h"
10 namespace autofill {
12 AutofillDataModel::AutofillDataModel(const std::string& guid,
13 const std::string& origin)
14 : guid_(guid), origin_(origin), use_count_(0) {
16 AutofillDataModel::~AutofillDataModel() {}
18 bool AutofillDataModel::IsVerified() const {
19 return !origin_.empty() && !GURL(origin_).is_valid();
22 void AutofillDataModel::RecordUse() {
23 ++use_count_;
24 use_date_ = base::Time::Now();
27 } // namespace autofill