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

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

Issue 2785753003: Exclude building signin view controller and its delegate on ChromeOS (Closed)
Patch Set: Exclude SigninViewController on ChromeOS Created 3 years, 8 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 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/browser_process.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 Browser* GetDesktopBrowser(content::WebUI* web_ui) { 60 Browser* GetDesktopBrowser(content::WebUI* web_ui) {
61 Browser* browser = 61 Browser* browser =
62 chrome::FindBrowserWithWebContents(web_ui->GetWebContents()); 62 chrome::FindBrowserWithWebContents(web_ui->GetWebContents());
63 if (!browser) 63 if (!browser)
64 browser = chrome::FindLastActiveWithProfile(Profile::FromWebUI(web_ui)); 64 browser = chrome::FindLastActiveWithProfile(Profile::FromWebUI(web_ui));
65 return browser; 65 return browser;
66 } 66 }
67 67
68 void SetInitializedModalHeight(content::WebUI* web_ui, 68 void SetInitializedModalHeight(content::WebUI* web_ui,
69 const base::ListValue* args) { 69 const base::ListValue* args) {
70 #if defined(OS_CHROMEOS)
71 NOTREACHED();
72 #else
70 double height; 73 double height;
71 const bool success = args->GetDouble(0, &height); 74 const bool success = args->GetDouble(0, &height);
72 DCHECK(success); 75 DCHECK(success);
73 76
74 Browser* browser = GetDesktopBrowser(web_ui); 77 Browser* browser = GetDesktopBrowser(web_ui);
75 if (browser) { 78 if (browser) {
76 browser->signin_view_controller()->SetModalSigninHeight( 79 browser->signin_view_controller()->SetModalSigninHeight(
77 static_cast<int>(height)); 80 static_cast<int>(height));
78 } 81 }
82 #endif
79 } 83 }
80 84
81 bool IsForceSigninEnabled() { 85 bool IsForceSigninEnabled() {
82 PrefService* prefs = g_browser_process->local_state(); 86 PrefService* prefs = g_browser_process->local_state();
83 return prefs->GetBoolean(prefs::kForceBrowserSignin); 87 return prefs->GetBoolean(prefs::kForceBrowserSignin);
84 } 88 }
85 89
86 } // namespace signin 90 } // namespace signin
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/signin/signin_error_handler.cc ('k') | chrome/browser/ui/webui/signin/sync_confirmation_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698