| // Copyright 2022 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| #include "components/autofill_assistant/browser/service/local_script_store.h" |
| #include "components/autofill_assistant/browser/service.pb.h" |
| namespace autofill_assistant { |
| LocalScriptStore::LocalScriptStore( |
| std::vector<GetNoRoundTripScriptsByHashPrefixResponseProto::MatchInfo:: |
| SupportsScriptResponseProto supports_site_response) |
| supports_site_response_(supports_site_response) {} |
| LocalScriptStore::~LocalScriptStore() = default; |
| GetNoRoundTripScriptsByHashPrefixResponseProto::MatchInfo::RoutineScript> |
| LocalScriptStore::GetRoutines() const { |
| const std::string& LocalScriptStore::GetDomain() const { |
| const SupportsScriptResponseProto LocalScriptStore::GetSupportsSiteResponse() |
| return supports_site_response_; |
| bool LocalScriptStore::empty() const { |
| return routines_.empty() || domain_.empty(); |
| size_t LocalScriptStore::size() const { |
| return domain_.empty() ? 0 : routines_.size(); |
| } // namespace autofill_assistant |