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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // Update ALL if you add new values and check whether the type of | 45 // Update ALL if you add new values and check whether the type of |
46 // ResettableFlags needs to be enlarged. | 46 // ResettableFlags needs to be enlarged. |
47 ALL = DEFAULT_SEARCH_ENGINE | HOMEPAGE | CONTENT_SETTINGS | | 47 ALL = DEFAULT_SEARCH_ENGINE | HOMEPAGE | CONTENT_SETTINGS | |
48 COOKIES_AND_SITE_DATA | EXTENSIONS | STARTUP_PAGES | PINNED_TABS | | 48 COOKIES_AND_SITE_DATA | EXTENSIONS | STARTUP_PAGES | PINNED_TABS | |
49 SHORTCUTS | 49 SHORTCUTS |
50 }; | 50 }; |
51 | 51 |
52 // Bit vector for Resettable enum. | 52 // Bit vector for Resettable enum. |
53 typedef uint32 ResettableFlags; | 53 typedef uint32 ResettableFlags; |
54 | 54 |
55 COMPILE_ASSERT(sizeof(ResettableFlags) == sizeof(Resettable), | 55 static_assert(sizeof(ResettableFlags) == sizeof(Resettable), |
56 type_ResettableFlags_doesnt_match_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. |accepted_send_feedback| | 63 // settings. |default_settings| shouldn't be NULL. |accepted_send_feedback| |
64 // identifies whether the user accepted to send feedback or not. | 64 // identifies whether the user accepted to send feedback or not. |
65 void Reset(ResettableFlags resettable_flags, | 65 void Reset(ResettableFlags resettable_flags, |
66 scoped_ptr<BrandcodedDefaultSettings> master_settings, | 66 scoped_ptr<BrandcodedDefaultSettings> master_settings, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 typedef base::RefCountedData<base::CancellationFlag> SharedCancellationFlag; | 117 typedef base::RefCountedData<base::CancellationFlag> SharedCancellationFlag; |
118 | 118 |
119 // On Windows returns all the shortcuts which launch Chrome and corresponding | 119 // On Windows returns all the shortcuts which launch Chrome and corresponding |
120 // arguments. |cancel| can be passed to abort the operation earlier. | 120 // arguments. |cancel| can be passed to abort the operation earlier. |
121 // Call on FILE thread. | 121 // Call on FILE thread. |
122 std::vector<ShortcutCommand> GetChromeLaunchShortcuts( | 122 std::vector<ShortcutCommand> GetChromeLaunchShortcuts( |
123 const scoped_refptr<SharedCancellationFlag>& cancel); | 123 const scoped_refptr<SharedCancellationFlag>& cancel); |
124 | 124 |
125 #endif // CHROME_BROWSER_PROFILE_RESETTER_PROFILE_RESETTER_H_ | 125 #endif // CHROME_BROWSER_PROFILE_RESETTER_PROFILE_RESETTER_H_ |
OLD | NEW |