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

Side by Side Diff: chrome/browser/ui/webui/signin/signin_utils.cc

Issue 2383823002: With force signin enabled, the signin dialog will be displayed after profile creation instead of br… (Closed)
Patch Set: cr Created 4 years, 2 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
« no previous file with comments | « chrome/browser/ui/webui/signin/signin_utils.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/webui/signin/signin_utils.h" 5 #include "chrome/browser/ui/webui/signin/signin_utils.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/browser_finder.h" 12 #include "chrome/browser/ui/browser_finder.h"
13 #include "chrome/common/pref_names.h"
12 #include "components/guest_view/browser/guest_view_manager.h" 14 #include "components/guest_view/browser/guest_view_manager.h"
15 #include "components/prefs/pref_service.h"
13 #include "content/public/browser/web_contents.h" 16 #include "content/public/browser/web_contents.h"
14 #include "content/public/browser/web_ui.h" 17 #include "content/public/browser/web_ui.h"
15 #include "extensions/browser/guest_view/web_view/web_view_guest.h" 18 #include "extensions/browser/guest_view/web_view/web_view_guest.h"
16 19
17 namespace { 20 namespace {
18 21
19 bool AddWebContentsToSet(std::set<content::WebContents*>* frame_set, 22 bool AddWebContentsToSet(std::set<content::WebContents*>* frame_set,
20 const std::string& web_view_name, 23 const std::string& web_view_name,
21 content::WebContents* web_contents) { 24 content::WebContents* web_contents) {
22 auto* web_view = extensions::WebViewGuest::FromWebContents(web_contents); 25 auto* web_view = extensions::WebViewGuest::FromWebContents(web_contents);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 const bool success = args->GetDouble(0, &height); 71 const bool success = args->GetDouble(0, &height);
69 DCHECK(success); 72 DCHECK(success);
70 73
71 Browser* browser = GetDesktopBrowser(web_ui); 74 Browser* browser = GetDesktopBrowser(web_ui);
72 if (browser) { 75 if (browser) {
73 browser->signin_view_controller()->SetModalSigninHeight( 76 browser->signin_view_controller()->SetModalSigninHeight(
74 static_cast<int>(height)); 77 static_cast<int>(height));
75 } 78 }
76 } 79 }
77 80
81 bool IsForceSigninEnabled() {
82 PrefService* prefs = g_browser_process->local_state();
83 return prefs->GetBoolean(prefs::kForceBrowserSignin);
84 }
85
78 } // namespace signin 86 } // namespace signin
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/signin/signin_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698