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

Unified Diff: chrome/browser/ui/startup/startup_browser_creator_impl.h

Issue 1226643002: Welcome page changes for Windows 10 and over. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rewording in policy_templates.json and sync to position 338549 Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/startup/startup_browser_creator_impl.h
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.h b/chrome/browser/ui/startup/startup_browser_creator_impl.h
index 8103e208e2145bb205fba476f4540029cfd4c912..8559056dfdba6bcf7e8a78a95ffd28848b3c805d 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.h
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.h
@@ -30,7 +30,7 @@ class WebContents;
namespace internals {
GURL GetWelcomePageURL();
-}
+} // namespace internals
// Assists launching the application and appending the initial tabs for a
// browser window.
@@ -79,6 +79,12 @@ class StartupBrowserCreatorImpl {
FRIEND_TEST_ALL_PREFIXES(BrowserTest, RestorePinnedTabs);
FRIEND_TEST_ALL_PREFIXES(BrowserTest, AppIdSwitch);
+ enum class WelcomeRunType {
+ NONE, // Do not inject the welcome page for this run.
+ FIRST_TAB, // Inject the welcome page as the first tab.
+ FIRST_RUN_LAST_TAB, // Inject the welcome page as the last first-run tab.
+ };
+
// If the process was launched with the web application command line flags,
// e.g. --app=http://www.google.com/ or --app_id=... return true.
// In this case |app_url| or |app_id| are populated if they're non-null.
@@ -141,15 +147,16 @@ class StartupBrowserCreatorImpl {
// Adds additional startup URLs to the specified vector.
void AddStartupURLs(std::vector<GURL>* startup_urls) const;
- // Checks whether the Preferences backup is invalid and notifies user in
- // that case.
- void CheckPreferencesBackup(Profile* profile);
+ // Initializes |welcome_run_type_| for this launch. Also persists state to
+ // suppress injecting the welcome page for future launches.
+ void InitializeWelcomeRunType(const std::vector<GURL>& urls_to_open);
const base::FilePath cur_dir_;
const base::CommandLine& command_line_;
Profile* profile_;
StartupBrowserCreator* browser_creator_;
bool is_first_run_;
+ WelcomeRunType welcome_run_type_;
DISALLOW_COPY_AND_ASSIGN(StartupBrowserCreatorImpl);
};

Powered by Google App Engine
This is Rietveld 408576698