2009-07-24 21:11:01 +02:00
|
|
|
// Copyright (c) 2008 The Chromium Embedded Framework Authors.
|
|
|
|
// Portions copyright (c) 2006-2008 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.
|
|
|
|
|
|
|
|
#ifndef _BROWSER_REQUEST_CONTEXT_H
|
|
|
|
#define _BROWSER_REQUEST_CONTEXT_H
|
|
|
|
|
|
|
|
#include "net/http/http_cache.h"
|
|
|
|
#include "net/url_request/url_request_context.h"
|
|
|
|
|
2009-10-18 22:39:22 +02:00
|
|
|
class FilePath;
|
|
|
|
|
2009-07-24 21:11:01 +02:00
|
|
|
// A basic URLRequestContext that only provides an in-memory cookie store.
|
|
|
|
class BrowserRequestContext : public URLRequestContext {
|
|
|
|
public:
|
|
|
|
// Use an in-memory cache
|
|
|
|
BrowserRequestContext();
|
|
|
|
|
|
|
|
// Use an on-disk cache at the specified location. Optionally, use the cache
|
|
|
|
// in playback or record mode.
|
2009-10-18 22:39:22 +02:00
|
|
|
BrowserRequestContext(const FilePath& cache_path,
|
2009-07-24 21:11:01 +02:00
|
|
|
net::HttpCache::Mode cache_mode,
|
|
|
|
bool no_proxy);
|
|
|
|
|
|
|
|
virtual const std::string& GetUserAgent(const GURL& url) const;
|
|
|
|
|
|
|
|
private:
|
2010-01-12 02:37:00 +01:00
|
|
|
~BrowserRequestContext();
|
|
|
|
|
2009-10-18 22:39:22 +02:00
|
|
|
void Init(const FilePath& cache_path, net::HttpCache::Mode cache_mode,
|
2009-07-24 21:11:01 +02:00
|
|
|
bool no_proxy);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _BROWSER_REQUEST_CONTEXT_H
|
|
|
|
|