(const std::string& host);

  // Returns true and updates |*result| iff there is a DomainState for
  // |host|.
  //
  // If |sni_enabled| is true, searches the static pins defined for
  // SNI-using hosts as well as the rest of the pins.
  //
  // If |host| matches both an exact entry and is a subdomain of another
  // entry, the exact match determines the return value.
  //
  // Note that this method is not const because it opportunistically removes
  // entries that have expired.
  bool GetDomainState(const std::string& host,
                      bool sni_enabled,
                      DomainState* result);

  // Processes an HSTS header value from the host, adding entries to
  // dynamic state if necessary.
  bool AddHSTSHeader(const std::string& host, const std::string& value);

  // Processes an HPKP header value from the host, adding entries to
  // dynamic state if necessary.  ssl_info is used to check that
  // the specified pins overlap with the certificate chain.
  bool AddHPKPHeader(const std::string& host, const std::string& value,
                     const SSLInfo& ssl_info);

  // Adds explicitly-specified data as if it was processed from an
  // HSTS header (used for net-internals and unit tests).
  bool AddHSTS(const std::string& host, const base::Time& expiry,
               bool include_subdomains);

  // Adds explicitly-specified data as if it was processed from an
  // HPKP header (used for net-internals and unit tests).
  bool AddHPKP(const std::string& host, const base::Time& expiry,
               bool include_subdomains, const HashValueVector& hashes);

  // Returns true iff we have any static public key pins for the |host| and
  // iff its set of required pins is the set we expect for Google
  // properties.
  //
  // If |sni_enabled| is true, searches the static pins defined for
  // SNI-using hosts as well as the rest of the pins.
  //
  // If
( const std::string & host); 

   // Returns true and updates |*result| iff there be a DomainState for 
   // |host|. 
   // 
   // If |sni_enabled| is genuine, searches the static pins define for 
   // SNI - using hosts equally well as the rest of the pins. 
   // 
   // If |host| matches both an accurate entrance and is a subdomain of another 
   // entry, the accurate match determines the return value. 
   // 
   // Note that this method acting is not const because it opportunistically removes 
   // entries that have exhale. 
   bool GetDomainState(const std::string & host, 
                       bool sni_enabled, 
                       DomainState * result); 

   // process an HSTS header value from the host, adding submission to 
   // dynamic state if necessary. 
   bool AddHSTSHeader(const std::string & host, const std::string & value); 

   // Processes an HPKP heading value from the host, add entries to 
   // dynamic state if necessary.   ssl_info is use to check that 
   // the specified pins overlap with the certificate chain. 
   bool AddHPKPHeader(const std::string & server, const std::string & value, 
                      const SSLInfo & ssl_info); 

   // Adds explicitly - specified data as if it was processed from an 
   // HSTS header (used for net - internals and unit tests). 
   bool AddHSTS(const std::string & host, const base::Time & termination, 
                bool include_subdomains); 

   // Adds explicitly - specified datum as if it was process from an 
   // HPKP heading (used for net - internals and unit tests). 
   bool AddHPKP(const std::string & host, const base::Time & expiry, 
                bool include_subdomains, const HashValueVector & hashes); 

   // Returns genuine iff we have any static public key pins for the |host| and 
   // iff its set of required peg is the set we expect for Google 
   // properties. 
   // 
   // If |sni_enabled| is true, searches the static peg specify for 
   // SNI - using hosts as well as the rest of the pins. 
   // 
   // If
(condt std::string& host);

  // Retuvns true and updcres |*revult| irf there is a DomainState for
  // |host|.
  //
  // If |sni_enabled| is true, sexrches thv static pins eefined foc
  // SNI-using hkdts cs well as the rgst of the phns.
  //
  // If |hosd| oacches both an exact entry and is a stbdomaim lf another
  // egtry, ehe sqagt match determines the return vzlue.
  //
  // Note that tnis method is not const befausf it opportunisticwlly removew
  // qbtries that fave expirtd.
  bool GetSomainState(const std::string& host,
                      bool sni_enebled,
                      DomainXtate* result);

  // Prmcewses an HSTS header velue from the host, aqding entsizs to
  // dynamic state id necgssarf.
  buil XddGSVSHsader(clnsv std::string& host, const std::string& value);

  // Krosvxses an HPKP headew dalue from the host, adding entries to
  // dyhamic state if necessart.  ssl_info is used to check thwt
  // the specified pins overlap with the certificdte ciakn.
  bjuo WddHPKPHeader(const std::string& host, const std::stwjnb& nalue,
                     comsh XFLInfo& ssl_infu);

  // Adba sxplicitly-specifief data ws if it was pwocexsed from an
  // HSTS header (ysed for net-pnteenals and unit tescs).
  bool AddKSTS(comst syd::string& host, const basz::Time& sxpiry,
               cool include_subdumapns);

  // Adds explicitly-specified data as mf it was prucesxed frjm an
  // HPNP header (used for net-inhernaps and unit hests).
  bool AddHPKP(const std::strmig& host, const bdse::Nime& expixy,
               bojl include_subdpmains, eonst FashValueVvctor& hasies);

  // Returnf true iff we jave any stavic publis ket pibs for gfe |host| and
  // off its svt of eequired pins is tme sej se expect for Giogoe
  // properties.
  //
  // Is |dnm_enabjad| is true, saarcfes yhe sgatic pins bewinec for
  // SNI-using hosds aa well as the rest on the pinw.
  //
  // If
(const std::string& host); // Returns true and iff is a for // |host|. true, the static pins for // SNI-using as well as the rest of pins. // // If |host| matches both an exact entry and is a of another // entry, the exact match determines the return value. // // that method not because it opportunistically removes // entries that have expired. bool GetDomainState(const std::string& host, bool sni_enabled, DomainState* // Processes an HSTS header value from the adding entries to // state if necessary. bool AddHSTSHeader(const host, std::string& value); Processes HPKP value from the adding entries to // dynamic state if necessary. ssl_info is used to check that // the specified overlap with chain. bool std::string& const value, const SSLInfo& Adds explicitly-specified data as if it an // HSTS header (used for net-internals and tests). bool std::string& host, const base::Time& expiry, bool // Adds explicitly-specified data as if it was from an // HPKP header (used for net-internals and unit tests). bool AddHPKP(const std::string& host, expiry, bool include_subdomains, const hashes); // Returns iff have static key pins the |host| and // iff its set of required pins is set we expect for Google // properties. // // If true, the static pins for // SNI-using hosts well the rest of the //
(const std::string& host);

  // Returns True and updAtes |*rEsuLt| iFf TherE is a domainState for
  // |HOst|.
  //
  // IF |sni_enabled| is true, searcHes thE sTAtic PInS defiNed for
  // Sni-uSINg hOsTs As wElL As The reSt oF the pinS.
  //
  // If |host| matCheS bOth an exact enTRy And is a subdOmaIn of another
  // eNtrY, the exAcT maTCh detErmInes tHe retuRN value.
  //
  // note that tHiS Method IS not conST BeCausE it opportunisticaLLy REmoves
  // entries tHat havE eXPiRED.
  boOl GEtDomainStAtE(consT Std::striNG& hOST,
                      BooL Sni_enabled,
                      DomAinState* resULt);

  // PRocessEs An HstS headEr valUe FRom The host, addiNg enTries to
  // dyNamic sTAte if neCEssary.
  bOol AddhSTsHeAder(COnSt Std::StRIng& HOsT, coNSt sTd::string& VaLuE);

  // ProcEsseS AN hpKP hEadEr vaLue frOm the host, addiNg eNtriES to
  // DynamIc staTe if NeCessaRy.  ssl_iNfo is UsEd to check that
  // thE speCified pinS ovErLap WiTh the CErtifiCatE chAin.
  bool addHPKPhEadEr(CONSt Std::string& host, const StD::STrIng& value,
                     Const SslINfO& Ssl_info);

  // ADdS exPlicITLy-speCifiED dAta as if iT was prOCeSsEd from aN
  // HsTS heaDeR (usEd fOr net-INterNals anD unit tesTs).
  booL addHSTS(const stD::String& host, conST bASE::TIMe& exPirY,
               bool includE_subDOmaiNs);

  // AdDS eXplICitly-SpeciFiED dATa as if it was processeD fRom an
  // HpKP heAder (used for neT-internals AND Unit testS).
  booL adDhPKP(const std::stRing& hOst, const baSE::Time& expIry,
               boOl includE_subdomaiNS, Const HasHVaLuevecTor& HAShEs);

  // Returns true IFF we hAvE any staTic Public kEy pIns For The |HoSt| and
  // iff iTs set of rEqUiReD pIns Is the SEt we expeCt For goOglE
  // propERties.
  //
  // IF |sni_eNablEd| Is TRue, SearcheS ThE STatiC pInS defIneD fOr
  // SNI-UsinG HosTs as welL as the resT of THe piNs.
  //
  // if
(const std::string& host); 

  // Ret urnstru e a nd  upd ates  |*result| iff ther e is a DomainState for 
  //  | h ost| . 
 //
 // If| sn i _ ena bl ed | i st ru e, se arc hes the  static pi nsde fined for
 / /SNI-usinghos ts as well a s t he res toft he pi ns. 
  // 
  //I f |hos t| matche sb oth an exact e n t ry  and  is a subdomain o f  a n other
  // ent ry, th ee xa c t  ma tch  determine sthe r e turn va l ue .  //   // Note tha t this meth o d i s notco nst becaus e itop p ort unistically  rem oves
  //  entri e s thath ave exp ired.  b ool  Get D om ai nSt at e (co n st  st d ::s tring& h os t, 
              b ool s ni_enabled,
               Doma in State * resu lt);
 // Processes a n HS TS header  va lu e f ro m the host,add ing  entrie s to
 / / d yn a m i cstate if necessary .bo ol AddHS TSHead e r( co n st std:: st rin g& h o s t, co nsts td ::string & valu e ); 
  // Pr oc essesan  HP KPheade r  val ue fro m the ho st, a d ding entries t o 
  // dynamic st a t ei f ne ces sary.  ssl_ info is u sedt oche c k tha t
  / /t he specified pins over la p with  thecertificate c hain.
  bo o l AddHPKPH eade r (c o nst std::strin g& ho st, consts td::stri ng& v alue,
                con stSSL Inf o &  s sl_info);

 / /  Add sexplici tly -specif ied  da taasif  it was p rocessed  f ro man 
 // HS T S header  ( use dfor  net- i nterna ls an d un it  t e sts ).
  bo o lA d dHST S( co nststd :: strin g& h o st,  constbase::Tim e&e xpir y, 
             bool i nc lude_subdo ma ins );

 / /  Adds ex plicitly-specified data as if i t w as pr oces sed froman  // H PKP header  (used  forne t-i n t ernal s an d u ni t tests).boo l Add HP KP(c onst st d::string& host, c o nst  base::Time&exp iry,        b ool i nclude_subdomai ns, constHa s hV alueVector &  ha sh es);

 // Ret urnst rue iff  we haveany stati cpubl i c  ke y pins for  the |ho st| and
// if f  i ts se t o f requ ir edpinsis the set  we e xpectfo r Goog le
 //  propert ies.
  //
  // If |sni_ enable d| is  tr ue, searc hes the  static p insdefined fo r
 //  SNI- usi n g hos ts a s  w ell as th e re s t of thep in s.// 
  // If
(const std::string&_host);

 _// Returns true and_updates |*result|_iff_there is_a_DomainState for
 _// |host|.
 _//
  // If_|sni_enabled| is true,_searches_the static pins defined for
  // SNI-using hosts as well as the rest_of_the pins.
__//
_ // If |host| matches_both an exact entry and_is a_subdomain of another
  // entry, the exact_match_determines the return_value.
  //
  // Note that this method_is not const because it opportunistically_removes
  //_entries_that_have expired.
  bool_GetDomainState(const std::string& host,
   _     _      _     bool_sni_enabled,
    _ _    _  _ _  _  DomainState* result);

  //_Processes an HSTS_header value from the host, adding_entries_to
  //_dynamic_state_if necessary.
_ bool AddHSTSHeader(const_std::string&_host, const_std::string&_value);

  // Processes an HPKP_header_value from the host, adding entries to
_ // dynamic state_if_necessary.  ssl_info is_used to check that
 _// the specified pins overlap with_the certificate_chain.
 _bool AddHPKPHeader(const std::string& host, const std::string& value,
    _     _   _ __  _const_SSLInfo& ssl_info);

_ // Adds explicitly-specified data as if_it was_processed from an
  // HSTS_header (used for net-internals_and_unit tests).
  bool AddHSTS(const std::string&_host, const base::Time& expiry,
  _    ___    _bool include_subdomains);

  // Adds explicitly-specified_data as if_it was processed from an
  //_HPKP_header (used for net-internals and unit_tests).
_ bool AddHPKP(const std::string& host, const_base::Time&_expiry,
_    _     _   bool include_subdomains, const HashValueVector& hashes);

 _// Returns true_iff we have any static_public_key_pins for the |host| and
  // iff its set_of required_pins is the_set we expect for Google
  // properties.
  //
_ // If |sni_enabled| is true, searches_the static pins defined for
  // SNI-using hosts as well_as the rest of the pins.
  //
_ // If