Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator.h

Issue 10702097: Adds browser preferences to configure first-run flow on Windows 8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renamed the new field in SBC. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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_default_browser_dialog_suppressed(bool new_value) {
87 is_default_browser_dialog_suppressed_ = new_value;
88 }
89
90 bool is_default_browser_dialog_suppressed() const {
91 return is_default_browser_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
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_default_browser_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_
OLDNEW
« no previous file with comments | « chrome/browser/ui/startup/default_browser_prompt_win.cc ('k') | chrome/browser/ui/startup/startup_browser_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698