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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // Returns true if this is the first time chrome is run for this user. | 64 // Returns true if this is the first time chrome is run for this user. |
65 bool IsChromeFirstRun(); | 65 bool IsChromeFirstRun(); |
66 | 66 |
67 // Creates the sentinel file that signals that chrome has been configured. | 67 // Creates the sentinel file that signals that chrome has been configured. |
68 bool CreateSentinel(); | 68 bool CreateSentinel(); |
69 | 69 |
70 // Get RLZ ping delay pref name. | 70 // Get RLZ ping delay pref name. |
71 std::string GetPingDelayPrefName(); | 71 std::string GetPingDelayPrefName(); |
72 | 72 |
73 // Register user preferences used by the MasterPrefs structure. | 73 // Register user preferences used by the MasterPrefs structure. |
74 void RegisterUserPrefs(PrefService* prefs); | 74 void RegisterUserPrefs(PrefServiceSyncable* prefs); |
75 | 75 |
76 // Removes the sentinel file created in ConfigDone(). Returns false if the | 76 // Removes the sentinel file created in ConfigDone(). Returns false if the |
77 // sentinel file could not be removed. | 77 // sentinel file could not be removed. |
78 bool RemoveSentinel(); | 78 bool RemoveSentinel(); |
79 | 79 |
80 // Sets the kShouldShowFirstRunBubble local state pref so that the browser | 80 // Sets the kShouldShowFirstRunBubble local state pref so that the browser |
81 // shows the bubble once the main message loop gets going (or refrains from | 81 // shows the bubble once the main message loop gets going (or refrains from |
82 // showing the bubble, if |show_bubble| is false). Returns false if the pref | 82 // showing the bubble, if |show_bubble| is false). Returns false if the pref |
83 // could not be set. This function can be called multiple times, but only the | 83 // could not be set. This function can be called multiple times, but only the |
84 // initial call will actually set the preference. | 84 // initial call will actually set the preference. |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 const content::NotificationDetails& details) OVERRIDE; | 152 const content::NotificationDetails& details) OVERRIDE; |
153 | 153 |
154 content::NotificationRegistrar registrar_; | 154 content::NotificationRegistrar registrar_; |
155 | 155 |
156 DISALLOW_COPY_AND_ASSIGN(FirstRunBubbleLauncher); | 156 DISALLOW_COPY_AND_ASSIGN(FirstRunBubbleLauncher); |
157 }; | 157 }; |
158 | 158 |
159 } // namespace first_run | 159 } // namespace first_run |
160 | 160 |
161 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 161 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
OLD | NEW |