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

Side by Side Diff: ios/public/provider/chrome/browser/browser_state/chrome_browser_state.h

Issue 1471743002: [iOS] Remove ChromeBrowserState::ExitType (dead code) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « ios/chrome/browser/application_context_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 IOS_PUBLIC_PROVIDER_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_H_ 5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_H_
6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_H_ 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback_forward.h" 9 #include "base/callback_forward.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 13 matching lines...) Expand all
24 24
25 namespace web { 25 namespace web {
26 class WebUIIOS; 26 class WebUIIOS;
27 } 27 }
28 28
29 namespace ios { 29 namespace ios {
30 30
31 // This class is a Chrome-specific extension of the BrowserState interface. 31 // This class is a Chrome-specific extension of the BrowserState interface.
32 class ChromeBrowserState : public web::BrowserState { 32 class ChromeBrowserState : public web::BrowserState {
33 public: 33 public:
34 enum ExitType {
35 EXIT_NORMAL,
36 EXIT_CRASHED,
37 };
38
39 ~ChromeBrowserState() override {} 34 ~ChromeBrowserState() override {}
40 35
41 // Returns the ChromeBrowserState corresponding to the given BrowserState. 36 // Returns the ChromeBrowserState corresponding to the given BrowserState.
42 static ChromeBrowserState* FromBrowserState(BrowserState* browser_state); 37 static ChromeBrowserState* FromBrowserState(BrowserState* browser_state);
43 38
44 // Returns the ChromeBrowserState corresponding to the given WebUIIOS. 39 // Returns the ChromeBrowserState corresponding to the given WebUIIOS.
45 static ChromeBrowserState* FromWebUIIOS(web::WebUIIOS* web_ui); 40 static ChromeBrowserState* FromWebUIIOS(web::WebUIIOS* web_ui);
46 41
47 // Returns sequenced task runner where browser state dependent I/O 42 // Returns sequenced task runner where browser state dependent I/O
48 // operations should be performed. 43 // operations should be performed.
(...skipping 19 matching lines...) Expand all
68 // ChromeBrowserState, if one exists. 63 // ChromeBrowserState, if one exists.
69 virtual void DestroyOffTheRecordChromeBrowserState() = 0; 64 virtual void DestroyOffTheRecordChromeBrowserState() = 0;
70 65
71 // Retrieves a pointer to the PrefService that manages the preferences. 66 // Retrieves a pointer to the PrefService that manages the preferences.
72 virtual PrefService* GetPrefs() = 0; 67 virtual PrefService* GetPrefs() = 0;
73 68
74 // Retrieves a pointer to the PrefService that manages the preferences as 69 // Retrieves a pointer to the PrefService that manages the preferences as
75 // a syncable_prefs::PrefServiceSyncable. 70 // a syncable_prefs::PrefServiceSyncable.
76 virtual syncable_prefs::PrefServiceSyncable* GetSyncablePrefs() = 0; 71 virtual syncable_prefs::PrefServiceSyncable* GetSyncablePrefs() = 0;
77 72
78 // Sets the ExitType for the ChromeBrowserState. This may be invoked multiple
79 // times during shutdown; only the first such change (the transition from
80 // EXIT_CRASHED to one of the other values) is written to prefs, any later
81 // calls are ignored.
82 //
83 // NOTE: this is invoked internally on a normal shutdown, but is public so
84 // that it can be invoked to handle backgrounding/foregrounding.
85 virtual void SetExitType(ExitType exit_type) = 0;
86
87 // Returns how the last session was shutdown.
88 virtual ExitType GetLastSessionExitType() = 0;
89
90 // Deletes all network related data since |time|. It deletes transport 73 // Deletes all network related data since |time|. It deletes transport
91 // security state since |time| and it also deletes HttpServerProperties data. 74 // security state since |time| and it also deletes HttpServerProperties data.
92 // Works asynchronously, however if the |completion| callback is non-null, it 75 // Works asynchronously, however if the |completion| callback is non-null, it
93 // will be posted on the UI thread once the removal process completes. 76 // will be posted on the UI thread once the removal process completes.
94 // Be aware that theoretically it is possible that |completion| will be 77 // Be aware that theoretically it is possible that |completion| will be
95 // invoked after the Profile instance has been destroyed. 78 // invoked after the Profile instance has been destroyed.
96 virtual void ClearNetworkingHistorySince(base::Time time, 79 virtual void ClearNetworkingHistorySince(base::Time time,
97 const base::Closure& completion) = 0; 80 const base::Closure& completion) = 0;
98 81
99 protected: 82 protected:
100 ChromeBrowserState() {} 83 ChromeBrowserState() {}
101 84
102 private: 85 private:
103 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserState); 86 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserState);
104 }; 87 };
105 88
106 } // namespace ios 89 } // namespace ios
107 90
108 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE _H_ 91 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE _H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/application_context_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698