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_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_ | 5 #ifndef CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_ |
6 #define CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_ | 6 #define CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
76 | 76 |
77 // When called the first time, reads the value of the preference kWasRestarted | 77 // When called the first time, reads the value of the preference kWasRestarted |
78 // and resets it to false. Subsequent calls return the value which was read | 78 // and resets it to false. Subsequent calls return the value which was read |
79 // the first time. | 79 // the first time. |
80 static bool WasRestarted(); | 80 static bool WasRestarted(); |
81 | 81 |
82 static SessionStartupPref GetSessionStartupPref( | 82 static SessionStartupPref GetSessionStartupPref( |
83 const CommandLine& command_line, | 83 const CommandLine& command_line, |
84 Profile* profile); | 84 Profile* profile); |
85 | 85 |
86 void set_is_set_as_default_dialog_suppressed(bool new_value) { | |
Ben Goodger (Google)
2012/08/01 18:00:20
set_default_browser_dialog_suppressed
the double
motek.
2012/08/01 20:44:52
I liked this one for its comedic value. But you ar
| |
87 is_set_as_default_dialog_suppressed_ = new_value; | |
88 } | |
89 | |
90 bool is_set_as_default_dialog_suppressed() const { | |
91 return is_set_as_default_dialog_suppressed_; | |
92 } | |
93 | |
86 private: | 94 private: |
87 friend class CloudPrintProxyPolicyTest; | 95 friend class CloudPrintProxyPolicyTest; |
88 friend class CloudPrintProxyPolicyStartupTest; | 96 friend class CloudPrintProxyPolicyStartupTest; |
89 friend class StartupBrowserCreatorImpl; | 97 friend class StartupBrowserCreatorImpl; |
90 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, | 98 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, |
91 ReadingWasRestartedAfterNormalStart); | 99 ReadingWasRestartedAfterNormalStart); |
92 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, | 100 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, |
93 ReadingWasRestartedAfterRestart); | 101 ReadingWasRestartedAfterRestart); |
94 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, UpdateWithTwoProfiles); | 102 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, UpdateWithTwoProfiles); |
95 | 103 |
(...skipping 15 matching lines...) Expand all Loading... | |
111 // Callback after a profile has been created. | 119 // Callback after a profile has been created. |
112 static void ProcessCommandLineOnProfileCreated( | 120 static void ProcessCommandLineOnProfileCreated( |
113 const CommandLine& cmd_line, | 121 const CommandLine& cmd_line, |
114 const FilePath& cur_dir, | 122 const FilePath& cur_dir, |
115 Profile* profile, | 123 Profile* profile, |
116 Profile::CreateStatus status); | 124 Profile::CreateStatus status); |
117 | 125 |
118 // Additional tabs to open during first run. | 126 // Additional tabs to open during first run. |
119 std::vector<GURL> first_run_tabs_; | 127 std::vector<GURL> first_run_tabs_; |
120 | 128 |
129 // True if the set-as-default dialog has been explicitly supressed. | |
130 // This information is used to allow the default browser prompt to show on | |
131 // first-run when the dialog has been suppressed. | |
132 bool is_set_as_default_dialog_suppressed_; | |
133 | |
121 // True if we have already read and reset the preference kWasRestarted. (A | 134 // True if we have already read and reset the preference kWasRestarted. (A |
122 // member variable instead of a static variable inside WasRestarted because | 135 // member variable instead of a static variable inside WasRestarted because |
123 // of testing.) | 136 // of testing.) |
124 static bool was_restarted_read_; | 137 static bool was_restarted_read_; |
125 | 138 |
126 DISALLOW_COPY_AND_ASSIGN(StartupBrowserCreator); | 139 DISALLOW_COPY_AND_ASSIGN(StartupBrowserCreator); |
127 }; | 140 }; |
128 | 141 |
129 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_ | 142 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_ |
OLD | NEW |