| Index: chrome/browser/net/chrome_sdch_policy.h
|
| diff --git a/chrome/browser/net/chrome_sdch_policy.h b/chrome/browser/net/chrome_sdch_policy.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..000f2c40ae9a05cc41f30013e2f845fc949c4601
|
| --- /dev/null
|
| +++ b/chrome/browser/net/chrome_sdch_policy.h
|
| @@ -0,0 +1,41 @@
|
| +// Copyright 2014 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.
|
| +
|
| +// Implementation of chrome embedder policy for SDCH. Handles fetches.
|
| +// TODO(rdsmith): Implement dictionary prioritization.
|
| +
|
| +#ifndef CHROME_BROWSER_NET_CHROME_SDCH_POLICY_H_
|
| +#define CHROME_BROWSER_NET_CHROME_SDCH_POLICY_H_
|
| +
|
| +#include "net/base/sdch_observer.h"
|
| +#include "net/url_request/sdch_dictionary_fetcher.h"
|
| +
|
| +namespace net {
|
| +class SdchManager;
|
| +class URLRequestContext;
|
| +}
|
| +
|
| +class ChromeSdchPolicy : public net::SdchObserver {
|
| + public:
|
| + // Consumer must guarantee that |sdch_manager| and |context| outlive
|
| + // this object.
|
| + ChromeSdchPolicy(net::SdchManager* sdch_manager,
|
| + net::URLRequestContext* context);
|
| + virtual ~ChromeSdchPolicy();
|
| +
|
| + void OnDictionaryFetched(const std::string& dictionary_text,
|
| + const GURL& dictionary_url);
|
| +
|
| + // SdchObserver implementation.
|
| + virtual void OnGetDictionary(net::SdchManager* manager,
|
| + const GURL& request_url,
|
| + const GURL& dictionary_url) override;
|
| + virtual void OnClearDictionaries(net::SdchManager* manager) override;
|
| +
|
| + private:
|
| + net::SdchManager* manager_;
|
| + net::SdchDictionaryFetcher fetcher_;
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_NET_CHROME_SDCH_POLICY_H_
|
|
|