OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 CHROME_BROWSER_PROFILE_RESETTER_PROFILE_RESETTER_H_ | 5 #ifndef CHROME_BROWSER_PROFILE_RESETTER_PROFILE_RESETTER_H_ |
6 #define CHROME_BROWSER_PROFILE_RESETTER_PROFILE_RESETTER_H_ | 6 #define CHROME_BROWSER_PROFILE_RESETTER_PROFILE_RESETTER_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 static_assert(sizeof(ResettableFlags) == sizeof(Resettable), | 55 static_assert(sizeof(ResettableFlags) == sizeof(Resettable), |
56 "ResettableFlags should be the same size as Resettable"); | 56 "ResettableFlags should be the same size as Resettable"); |
57 | 57 |
58 explicit ProfileResetter(Profile* profile); | 58 explicit ProfileResetter(Profile* profile); |
59 ~ProfileResetter() override; | 59 ~ProfileResetter() override; |
60 | 60 |
61 // Resets |resettable_flags| and calls |callback| on the UI thread on | 61 // Resets |resettable_flags| and calls |callback| on the UI thread on |
62 // completion. |default_settings| allows the caller to specify some default | 62 // completion. |default_settings| allows the caller to specify some default |
63 // settings. |default_settings| shouldn't be NULL. | 63 // settings. |default_settings| shouldn't be NULL. |
64 void Reset(ResettableFlags resettable_flags, | 64 virtual void Reset(ResettableFlags resettable_flags, |
65 scoped_ptr<BrandcodedDefaultSettings> master_settings, | 65 scoped_ptr<BrandcodedDefaultSettings> master_settings, |
66 const base::Closure& callback); | 66 const base::Closure& callback); |
67 | 67 |
68 bool IsActive() const; | 68 virtual bool IsActive() const; |
69 | 69 |
70 private: | 70 private: |
71 // Marks |resettable| as done and triggers |callback_| if all pending jobs | 71 // Marks |resettable| as done and triggers |callback_| if all pending jobs |
72 // have completed. | 72 // have completed. |
73 void MarkAsDone(Resettable resettable); | 73 void MarkAsDone(Resettable resettable); |
74 | 74 |
75 void ResetDefaultSearchEngine(); | 75 void ResetDefaultSearchEngine(); |
76 void ResetHomepage(); | 76 void ResetHomepage(); |
77 void ResetContentSettings(); | 77 void ResetContentSettings(); |
78 void ResetCookiesAndSiteData(); | 78 void ResetCookiesAndSiteData(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 typedef base::RefCountedData<base::CancellationFlag> SharedCancellationFlag; | 115 typedef base::RefCountedData<base::CancellationFlag> SharedCancellationFlag; |
116 | 116 |
117 // On Windows returns all the shortcuts which launch Chrome and corresponding | 117 // On Windows returns all the shortcuts which launch Chrome and corresponding |
118 // arguments. |cancel| can be passed to abort the operation earlier. | 118 // arguments. |cancel| can be passed to abort the operation earlier. |
119 // Call on FILE thread. | 119 // Call on FILE thread. |
120 std::vector<ShortcutCommand> GetChromeLaunchShortcuts( | 120 std::vector<ShortcutCommand> GetChromeLaunchShortcuts( |
121 const scoped_refptr<SharedCancellationFlag>& cancel); | 121 const scoped_refptr<SharedCancellationFlag>& cancel); |
122 | 122 |
123 #endif // CHROME_BROWSER_PROFILE_RESETTER_PROFILE_RESETTER_H_ | 123 #endif // CHROME_BROWSER_PROFILE_RESETTER_PROFILE_RESETTER_H_ |
OLD | NEW |