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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator_impl.cc

Issue 2166693002: [MD Settings] PROOF OF CONCEPT - DO NOT LAND - URL rewrite (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
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 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 #endif 113 #endif
114 114
115 #if defined(ENABLE_RLZ) 115 #if defined(ENABLE_RLZ)
116 #include "components/rlz/rlz_tracker.h" 116 #include "components/rlz/rlz_tracker.h"
117 #endif 117 #endif
118 118
119 using content::ChildProcessSecurityPolicy; 119 using content::ChildProcessSecurityPolicy;
120 using content::WebContents; 120 using content::WebContents;
121 using extensions::Extension; 121 using extensions::Extension;
122 122
123 extern bool UsesMdSettings();
124 extern bool (*g_settingsFlagFunc)(void);
125
123 namespace { 126 namespace {
124 127
125 // Utility functions ---------------------------------------------------------- 128 // Utility functions ----------------------------------------------------------
126 129
127 enum LaunchMode { 130 enum LaunchMode {
128 LM_TO_BE_DECIDED = 0, // Possibly direct launch or via a shortcut. 131 LM_TO_BE_DECIDED = 0, // Possibly direct launch or via a shortcut.
129 LM_AS_WEBAPP, // Launched as a installed web application. 132 LM_AS_WEBAPP, // Launched as a installed web application.
130 LM_WITH_URLS, // Launched with urls in the cmd line. 133 LM_WITH_URLS, // Launched with urls in the cmd line.
131 LM_SHORTCUT_NONE, // Not launched from a shortcut. 134 LM_SHORTCUT_NONE, // Not launched from a shortcut.
132 LM_SHORTCUT_NONAME, // Launched from shortcut but no name available. 135 LM_SHORTCUT_NONAME, // Launched from shortcut but no name available.
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 // login item or Lion's resume feature. 615 // login item or Lion's resume feature.
613 if (base::mac::WasLaunchedAsLoginOrResumeItem()) { 616 if (base::mac::WasLaunchedAsLoginOrResumeItem()) {
614 restore_behavior = restore_behavior & 617 restore_behavior = restore_behavior &
615 ~SessionRestore::ALWAYS_CREATE_TABBED_BROWSER; 618 ~SessionRestore::ALWAYS_CREATE_TABBED_BROWSER;
616 } 619 }
617 #endif 620 #endif
618 621
619 std::vector<GURL> adjusted_urls(urls_to_open); 622 std::vector<GURL> adjusted_urls(urls_to_open);
620 AddSpecialURLs(&adjusted_urls); 623 AddSpecialURLs(&adjusted_urls);
621 624
625 g_settingsFlagFunc = &UsesMdSettings;
626
622 // The startup code only executes for browsers launched in desktop mode. Ash 627 // The startup code only executes for browsers launched in desktop mode. Ash
623 // should never get here. 628 // should never get here.
624 Browser* browser = SessionRestore::RestoreSession( 629 Browser* browser = SessionRestore::RestoreSession(
625 profile_, NULL, restore_behavior, adjusted_urls); 630 profile_, NULL, restore_behavior, adjusted_urls);
626 631
627 AddInfoBarsIfNecessary(browser, chrome::startup::IS_PROCESS_STARTUP); 632 AddInfoBarsIfNecessary(browser, chrome::startup::IS_PROCESS_STARTUP);
628 return true; 633 return true;
629 } 634 }
630 635
631 Browser* browser = ProcessSpecifiedURLs(urls_to_open); 636 Browser* browser = ProcessSpecifiedURLs(urls_to_open);
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 #if defined(OS_WIN) 994 #if defined(OS_WIN)
990 TriggeredProfileResetter* triggered_profile_resetter = 995 TriggeredProfileResetter* triggered_profile_resetter =
991 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); 996 TriggeredProfileResetterFactory::GetForBrowserContext(profile_);
992 // TriggeredProfileResetter instance will be nullptr for incognito profiles. 997 // TriggeredProfileResetter instance will be nullptr for incognito profiles.
993 if (triggered_profile_resetter) { 998 if (triggered_profile_resetter) {
994 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); 999 has_reset_trigger = triggered_profile_resetter->HasResetTrigger();
995 } 1000 }
996 #endif // defined(OS_WIN) 1001 #endif // defined(OS_WIN)
997 return has_reset_trigger; 1002 return has_reset_trigger;
998 } 1003 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_features.cc » ('j') | components/sessions/content/content_serialized_navigation_driver.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698