OLD | NEW |
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_FIRST_RUN_FIRST_RUN_H_ | 5 #ifndef CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
6 #define CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 6 #define CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "content/public/browser/notification_observer.h" | 15 #include "content/public/browser/notification_observer.h" |
16 #include "content/public/browser/notification_registrar.h" | 16 #include "content/public/browser/notification_registrar.h" |
17 #include "ui/gfx/native_widget_types.h" | 17 #include "ui/gfx/native_widget_types.h" |
18 | 18 |
19 class CommandLine; | 19 class CommandLine; |
20 class FilePath; | 20 class FilePath; |
21 class GURL; | 21 class GURL; |
22 class PrefService; | 22 class PrefServiceSyncable; |
23 class Profile; | 23 class Profile; |
24 class ProcessSingleton; | 24 class ProcessSingleton; |
25 | 25 |
26 // This namespace contains the chrome first-run installation actions needed to | 26 // This namespace contains the chrome first-run installation actions needed to |
27 // fully test the custom installer. It also contains the opposite actions to | 27 // fully test the custom installer. It also contains the opposite actions to |
28 // execute during uninstall. When the first run UI is ready we won't | 28 // execute during uninstall. When the first run UI is ready we won't |
29 // do the actions unconditionally. Currently the only action is to create a | 29 // do the actions unconditionally. Currently the only action is to create a |
30 // desktop shortcut. | 30 // desktop shortcut. |
31 // | 31 // |
32 // The way we detect first-run is by looking at a 'sentinel' file. | 32 // The way we detect first-run is by looking at a 'sentinel' file. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // Returns true if this is the first time chrome is run for this user. | 73 // Returns true if this is the first time chrome is run for this user. |
74 bool IsChromeFirstRun(); | 74 bool IsChromeFirstRun(); |
75 | 75 |
76 // Creates the sentinel file that signals that chrome has been configured. | 76 // Creates the sentinel file that signals that chrome has been configured. |
77 bool CreateSentinel(); | 77 bool CreateSentinel(); |
78 | 78 |
79 // Get RLZ ping delay pref name. | 79 // Get RLZ ping delay pref name. |
80 std::string GetPingDelayPrefName(); | 80 std::string GetPingDelayPrefName(); |
81 | 81 |
82 // Register user preferences used by the MasterPrefs structure. | 82 // Register user preferences used by the MasterPrefs structure. |
83 void RegisterUserPrefs(PrefService* prefs); | 83 void RegisterUserPrefs(PrefServiceSyncable* prefs); |
84 | 84 |
85 // Removes the sentinel file created in ConfigDone(). Returns false if the | 85 // Removes the sentinel file created in ConfigDone(). Returns false if the |
86 // sentinel file could not be removed. | 86 // sentinel file could not be removed. |
87 bool RemoveSentinel(); | 87 bool RemoveSentinel(); |
88 | 88 |
89 // Sets the kShowFirstRunBubbleOption local state pref so that the browser | 89 // Sets the kShowFirstRunBubbleOption local state pref so that the browser |
90 // shows the bubble once the main message loop gets going (or refrains from | 90 // shows the bubble once the main message loop gets going (or refrains from |
91 // showing the bubble, if |show_bubble| is not FIRST_RUN_BUBBLE_SHOW). | 91 // showing the bubble, if |show_bubble| is not FIRST_RUN_BUBBLE_SHOW). |
92 // Once FIRST_RUN_BUBBLE_SUPPRESS is set, no other value can be set. | 92 // Once FIRST_RUN_BUBBLE_SUPPRESS is set, no other value can be set. |
93 // Returns false if the pref service could not be retrieved. | 93 // Returns false if the pref service could not be retrieved. |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 const content::NotificationDetails& details) OVERRIDE; | 170 const content::NotificationDetails& details) OVERRIDE; |
171 | 171 |
172 content::NotificationRegistrar registrar_; | 172 content::NotificationRegistrar registrar_; |
173 | 173 |
174 DISALLOW_COPY_AND_ASSIGN(FirstRunBubbleLauncher); | 174 DISALLOW_COPY_AND_ASSIGN(FirstRunBubbleLauncher); |
175 }; | 175 }; |
176 | 176 |
177 } // namespace first_run | 177 } // namespace first_run |
178 | 178 |
179 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 179 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
OLD | NEW |