| Index: ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_impl.h
|
| diff --git a/ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_impl.h b/ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_impl.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6f0e8ce5fdfa0067718cfc6d5ac6a9eefd9fc482
|
| --- /dev/null
|
| +++ b/ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_impl.h
|
| @@ -0,0 +1,66 @@
|
| +// Copyright 2013 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 IOS_CHROME_BROWSER_BROWSER_STATE_OFF_THE_RECORD_CHROME_BROWSER_STATE_IMPL_H_
|
| +#define IOS_CHROME_BROWSER_BROWSER_STATE_OFF_THE_RECORD_CHROME_BROWSER_STATE_IMPL_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "ios/chrome/browser/browser_state/chrome_browser_state.h"
|
| +#include "ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_io_data.h"
|
| +
|
| +namespace syncable_prefs {
|
| +class PrefServiceSyncable;
|
| +}
|
| +
|
| +// The implementation of ChromeBrowserState that is used for incognito browsing.
|
| +// Each OffTheRecordChromeBrowserStateImpl instance is associated with and owned
|
| +// by a non-incognito ChromeBrowserState instance.
|
| +class OffTheRecordChromeBrowserStateImpl : public ios::ChromeBrowserState {
|
| + public:
|
| + ~OffTheRecordChromeBrowserStateImpl() override;
|
| +
|
| + // ChromeBrowserState:
|
| + ios::ChromeBrowserState* GetOriginalChromeBrowserState() override;
|
| + bool HasOffTheRecordChromeBrowserState() const override;
|
| + ios::ChromeBrowserState* GetOffTheRecordChromeBrowserState() override;
|
| + void DestroyOffTheRecordChromeBrowserState() override;
|
| + PrefProxyConfigTracker* GetProxyConfigTracker() override;
|
| + net::SSLConfigService* GetSSLConfigService() override;
|
| + PrefService* GetPrefs() override;
|
| + PrefService* GetOffTheRecordPrefs() override;
|
| + ChromeBrowserStateIOData* GetIOData() override;
|
| + void ClearNetworkingHistorySince(base::Time time,
|
| + const base::Closure& completion) override;
|
| + net::URLRequestContextGetter* CreateRequestContext(
|
| + ProtocolHandlerMap* protocol_handlers,
|
| + URLRequestInterceptorScopedVector request_interceptors) override;
|
| + net::URLRequestContextGetter* CreateIsolatedRequestContext(
|
| + const base::FilePath& partition_path) override;
|
| +
|
| + // BrowserState:
|
| + bool IsOffTheRecord() const override;
|
| + base::FilePath GetStatePath() const override;
|
| +
|
| + private:
|
| + friend class ChromeBrowserStateImpl;
|
| +
|
| + // |original_chrome_browser_state_| is the non-incognito
|
| + // ChromeBrowserState instance that owns this instance.
|
| + OffTheRecordChromeBrowserStateImpl(
|
| + ios::ChromeBrowserState* original_chrome_browser_state,
|
| + const base::FilePath& otr_path);
|
| +
|
| + base::FilePath otr_state_path_;
|
| + ios::ChromeBrowserState* original_chrome_browser_state_; // weak
|
| +
|
| + // Weak pointer owned by |original_chrome_browser_state_|.
|
| + syncable_prefs::PrefServiceSyncable* prefs_;
|
| +
|
| + scoped_ptr<OffTheRecordChromeBrowserStateIOData::Handle> io_data_;
|
| + scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(OffTheRecordChromeBrowserStateImpl);
|
| +};
|
| +
|
| +#endif // IOS_CHROME_BROWSER_BROWSER_STATE_OFF_THE_RECORD_CHROME_BROWSER_STATE_IMPL_H_
|
|
|