Lines Matching defs:Dictionary
29 SdchManager::Dictionary::Dictionary(const std::string& dictionary_text,
46 SdchManager::Dictionary::~Dictionary() {
49 bool SdchManager::Dictionary::CanAdvertise(const GURL& target_url) {
52 /* The specific rules of when a dictionary should be advertised in an
53 Avail-Dictionary header are modeled after the rules for cookie scoping. The
55 dictionary may be advertised in the Avail-Dictionaries header exactly when
58 the dictionary.
59 2. If the dictionary has a Port attribute, the request port is one of the
61 3. The request URI path-matches the path header of the dictionary.
81 bool SdchManager::Dictionary::CanSet(const std::string& domain,
88 A dictionary is invalid and must not be stored if any of the following are
90 1. The dictionary has no Domain attribute.
97 5. If the dictionary has a Port attribute and the referer URL's port was not
101 // TODO(jar): Redirects in dictionary fetches might plausibly be problematic,
103 // were any... then don't allow the dictionary to be set).
114 if (!Dictionary::DomainMatch(dictionary_url, domain)) {
141 bool SdchManager::Dictionary::CanUse(const GURL& referring_url) {
146 dictionary.
147 2. If the dictionary has a Port attribute, the request port is one of the
149 3. The request URL path-matches the path attribute of the dictionary.
180 bool SdchManager::Dictionary::PathMatch(const std::string& path,
198 bool SdchManager::Dictionary::DomainMatch(const GURL& gurl,
334 /* The user agent may retrieve a dictionary from the dictionary URL if all of
336 1 The dictionary URL host name matches the referrer URL host name
337 2 The dictionary URL host name domain matches the parent domain of the
341 4 The dictionary URL is not an HTTPS URL.
435 if (!Dictionary::CanSet(domain, path, ports, dictionary_url))
451 UMA_HISTOGRAM_COUNTS("Sdch3.Dictionary size loaded", dictionary_text.size());
452 DVLOG(1) << "Loaded dictionary with client hash " << client_hash
454 Dictionary* dictionary =
455 new Dictionary(dictionary_text, header_end + 2, client_hash,
457 dictionary->AddRef();
458 dictionaries_[server_hash] = dictionary;
463 const GURL& referring_url, Dictionary** dictionary) {
464 *dictionary = NULL;
469 Dictionary* matching_dictionary = it->second;
472 *dictionary = matching_dictionary;
476 // change this interface to return a list of reference counted Dictionary
533 // Since this is only done during a dictionary load, and hashes are only 8