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

Side by Side Diff: chrome/browser/ui/chrome_pages.cc

Issue 2743323005: MD Settings: enhance restarting Chrome + interacting w/ session restore (Closed)
Patch Set: merge Created 3 years, 9 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/chrome_pages.h" 5 #include "chrome/browser/ui/chrome_pages.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 18 matching lines...) Expand all
29 #include "chrome/browser/ui/tabs/tab_strip_model.h" 29 #include "chrome/browser/ui/tabs/tab_strip_model.h"
30 #include "chrome/browser/ui/webui/options/content_settings_handler.h" 30 #include "chrome/browser/ui/webui/options/content_settings_handler.h"
31 #include "chrome/browser/ui/webui/site_settings_helper.h" 31 #include "chrome/browser/ui/webui/site_settings_helper.h"
32 #include "chrome/common/chrome_features.h" 32 #include "chrome/common/chrome_features.h"
33 #include "chrome/common/chrome_switches.h" 33 #include "chrome/common/chrome_switches.h"
34 #include "chrome/common/url_constants.h" 34 #include "chrome/common/url_constants.h"
35 #include "components/signin/core/browser/signin_header_helper.h" 35 #include "components/signin/core/browser/signin_header_helper.h"
36 #include "components/signin/core/common/profile_management_switches.h" 36 #include "components/signin/core/common/profile_management_switches.h"
37 #include "content/public/browser/user_metrics.h" 37 #include "content/public/browser/user_metrics.h"
38 #include "content/public/browser/web_contents.h" 38 #include "content/public/browser/web_contents.h"
39 #include "content/public/common/url_constants.h"
39 #include "extensions/browser/extension_prefs.h" 40 #include "extensions/browser/extension_prefs.h"
40 #include "extensions/common/constants.h" 41 #include "extensions/common/constants.h"
41 #include "google_apis/gaia/gaia_urls.h" 42 #include "google_apis/gaia/gaia_urls.h"
42 #include "net/base/url_util.h" 43 #include "net/base/url_util.h"
43 #include "ui/base/window_open_disposition.h" 44 #include "ui/base/window_open_disposition.h"
44 45
45 #if defined(OS_WIN) 46 #if defined(OS_WIN)
46 #include "chrome/browser/win/enumerate_modules_model.h" 47 #include "chrome/browser/win/enumerate_modules_model.h"
47 #endif 48 #endif
48 49
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 ShowSingletonTab(browser, GURL(kChromeUISlowURL)); 261 ShowSingletonTab(browser, GURL(kChromeUISlowURL));
261 #endif 262 #endif
262 } 263 }
263 264
264 GURL GetSettingsUrl(const std::string& sub_page) { 265 GURL GetSettingsUrl(const std::string& sub_page) {
265 return GURL(std::string(kChromeUISettingsURL) + sub_page); 266 return GURL(std::string(kChromeUISettingsURL) + sub_page);
266 } 267 }
267 268
268 bool IsSettingsSubPage(const GURL& url, const std::string& sub_page) { 269 bool IsSettingsSubPage(const GURL& url, const std::string& sub_page) {
269 return (url.SchemeIs(content::kChromeUIScheme) && 270 return (url.SchemeIs(content::kChromeUIScheme) &&
270 (url.host_piece() == chrome::kChromeUISettingsHost || 271 (url.host_piece() == content::kChromeUISettingsHost ||
271 url.host_piece() == chrome::kChromeUISettingsFrameHost) && 272 url.host_piece() == chrome::kChromeUISettingsFrameHost) &&
272 url.path_piece() == "/" + sub_page); 273 url.path_piece() == "/" + sub_page);
273 } 274 }
274 275
275 bool IsTrustedPopupWindowWithScheme(const Browser* browser, 276 bool IsTrustedPopupWindowWithScheme(const Browser* browser,
276 const std::string& scheme) { 277 const std::string& scheme) {
277 if (!browser->is_type_popup() || !browser->is_trusted_source()) 278 if (!browser->is_type_popup() || !browser->is_trusted_source())
278 return false; 279 return false;
279 if (scheme.empty()) // Any trusted popup window 280 if (scheme.empty()) // Any trusted popup window
280 return true; 281 return true;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 SigninManagerFactory::GetForProfile(original_profile); 456 SigninManagerFactory::GetForProfile(original_profile);
456 DCHECK(manager->IsSigninAllowed()); 457 DCHECK(manager->IsSigninAllowed());
457 if (manager->IsAuthenticated()) 458 if (manager->IsAuthenticated())
458 ShowSettings(browser); 459 ShowSettings(browser);
459 else 460 else
460 ShowBrowserSignin(browser, access_point); 461 ShowBrowserSignin(browser, access_point);
461 } 462 }
462 #endif 463 #endif
463 464
464 } // namespace chrome 465 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698