Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: chrome/browser/profiles/off_the_record_profile_impl.h

Issue 12079097: Introduce PrefRegistrySyncable, simplifying PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add to PrefRegistrySyncable and PrefServiceSyncable to let sync know of pre-registered prefs. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_ 5 #ifndef CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_
6 #define CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_ 6 #define CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
11 #include "chrome/browser/profiles/off_the_record_profile_io_data.h" 11 #include "chrome/browser/profiles/off_the_record_profile_io_data.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/ui/browser_list.h" 13 #include "chrome/browser/ui/browser_list.h"
14 #include "content/public/browser/notification_observer.h" 14 #include "content/public/browser/notification_observer.h"
15 #include "content/public/browser/notification_registrar.h" 15 #include "content/public/browser/notification_registrar.h"
16 16
17 using base::Time; 17 using base::Time;
18 using base::TimeDelta; 18 using base::TimeDelta;
19 19
20 class PrefServiceSyncable;
21
20 //////////////////////////////////////////////////////////////////////////////// 22 ////////////////////////////////////////////////////////////////////////////////
21 // 23 //
22 // OffTheRecordProfileImpl is a profile subclass that wraps an existing profile 24 // OffTheRecordProfileImpl is a profile subclass that wraps an existing profile
23 // to make it suitable for the incognito mode. 25 // to make it suitable for the incognito mode.
24 // 26 //
25 // Note: This class is a leaf class and is not intended for subclassing. 27 // Note: This class is a leaf class and is not intended for subclassing.
26 // Providing this header file is for unit testing. 28 // Providing this header file is for unit testing.
27 // 29 //
28 //////////////////////////////////////////////////////////////////////////////// 30 ////////////////////////////////////////////////////////////////////////////////
29 class OffTheRecordProfileImpl : public Profile, 31 class OffTheRecordProfileImpl : public Profile,
30 public content::NotificationObserver { 32 public content::NotificationObserver {
31 public: 33 public:
32 explicit OffTheRecordProfileImpl(Profile* real_profile); 34 explicit OffTheRecordProfileImpl(Profile* real_profile);
33 virtual ~OffTheRecordProfileImpl(); 35 virtual ~OffTheRecordProfileImpl();
34 void Init(); 36 void Init();
35 37
36 // Profile implementation. 38 // Profile implementation.
37 virtual std::string GetProfileName() OVERRIDE; 39 virtual std::string GetProfileName() OVERRIDE;
38 virtual Profile* GetOffTheRecordProfile() OVERRIDE; 40 virtual Profile* GetOffTheRecordProfile() OVERRIDE;
39 virtual void DestroyOffTheRecordProfile() OVERRIDE; 41 virtual void DestroyOffTheRecordProfile() OVERRIDE;
40 virtual bool HasOffTheRecordProfile() OVERRIDE; 42 virtual bool HasOffTheRecordProfile() OVERRIDE;
41 virtual Profile* GetOriginalProfile() OVERRIDE; 43 virtual Profile* GetOriginalProfile() OVERRIDE;
42 virtual ExtensionService* GetExtensionService() OVERRIDE; 44 virtual ExtensionService* GetExtensionService() OVERRIDE;
43 virtual ExtensionSpecialStoragePolicy* 45 virtual ExtensionSpecialStoragePolicy*
44 GetExtensionSpecialStoragePolicy() OVERRIDE; 46 GetExtensionSpecialStoragePolicy() OVERRIDE;
45 virtual policy::ManagedModePolicyProvider* 47 virtual policy::ManagedModePolicyProvider*
46 GetManagedModePolicyProvider() OVERRIDE; 48 GetManagedModePolicyProvider() OVERRIDE;
47 virtual policy::PolicyService* GetPolicyService() OVERRIDE; 49 virtual policy::PolicyService* GetPolicyService() OVERRIDE;
48 virtual PrefServiceSyncable* GetPrefs() OVERRIDE; 50 virtual PrefService* GetPrefs() OVERRIDE;
49 virtual PrefServiceSyncable* GetOffTheRecordPrefs() OVERRIDE; 51 virtual PrefService* GetOffTheRecordPrefs() OVERRIDE;
50 virtual net::URLRequestContextGetter* 52 virtual net::URLRequestContextGetter*
51 GetRequestContextForExtensions() OVERRIDE; 53 GetRequestContextForExtensions() OVERRIDE;
52 virtual net::URLRequestContextGetter* GetRequestContextForStoragePartition( 54 virtual net::URLRequestContextGetter* GetRequestContextForStoragePartition(
53 const FilePath& partition_path, 55 const FilePath& partition_path,
54 bool in_memory) OVERRIDE; 56 bool in_memory) OVERRIDE;
55 virtual net::SSLConfigService* GetSSLConfigService() OVERRIDE; 57 virtual net::SSLConfigService* GetSSLConfigService() OVERRIDE;
56 virtual HostContentSettingsMap* GetHostContentSettingsMap() OVERRIDE; 58 virtual HostContentSettingsMap* GetHostContentSettingsMap() OVERRIDE;
57 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() OVERRIDE; 59 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() OVERRIDE;
58 virtual bool IsSameProfile(Profile* profile) OVERRIDE; 60 virtual bool IsSameProfile(Profile* profile) OVERRIDE;
59 virtual Time GetStartTime() const OVERRIDE; 61 virtual Time GetStartTime() const OVERRIDE;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 Time start_time_; 137 Time start_time_;
136 138
137 FilePath last_selected_directory_; 139 FilePath last_selected_directory_;
138 140
139 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; 141 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_;
140 142
141 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); 143 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl);
142 }; 144 };
143 145
144 #endif // CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_ 146 #endif // CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698