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

Side by Side Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 12077030: Allow signin to continue even if sync is disabled by policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows sync integration test failure Created 7 years, 10 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 | Annotate | Revision Log
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/webui/options/browser_options_handler.h" 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 Profile::FromWebUI(web_ui())); 1068 Profile::FromWebUI(web_ui()));
1069 1069
1070 bool status_has_error = sync_ui_util::GetStatusLabels( 1070 bool status_has_error = sync_ui_util::GetStatusLabels(
1071 service, *signin, sync_ui_util::WITH_HTML, &status_label, &link_label) == 1071 service, *signin, sync_ui_util::WITH_HTML, &status_label, &link_label) ==
1072 sync_ui_util::SYNC_ERROR; 1072 sync_ui_util::SYNC_ERROR;
1073 sync_status->SetString("statusText", status_label); 1073 sync_status->SetString("statusText", status_label);
1074 sync_status->SetString("actionLinkText", link_label); 1074 sync_status->SetString("actionLinkText", link_label);
1075 sync_status->SetBoolean("hasError", status_has_error); 1075 sync_status->SetBoolean("hasError", status_has_error);
1076 1076
1077 sync_status->SetBoolean("managed", service->IsManaged()); 1077 sync_status->SetBoolean("managed", service->IsManaged());
1078 sync_status->SetBoolean("signedIn",
1079 !signin->GetAuthenticatedUsername().empty());
1078 sync_status->SetBoolean("hasUnrecoverableError", 1080 sync_status->SetBoolean("hasUnrecoverableError",
1079 service->HasUnrecoverableError()); 1081 service->HasUnrecoverableError());
1080 sync_status->SetBoolean( 1082 sync_status->SetBoolean(
1081 "autoLoginVisible", 1083 "autoLoginVisible",
1082 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) && 1084 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) &&
1083 service->IsSyncEnabledAndLoggedIn() && service->IsSyncTokenAvailable()); 1085 service->IsSyncEnabledAndLoggedIn() && service->IsSyncTokenAvailable());
1084 1086
1085 return sync_status.Pass(); 1087 return sync_status.Pass();
1086 } 1088 }
1087 1089
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 1411 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
1410 } 1412 }
1411 StringValue label(label_str); 1413 StringValue label(label_str);
1412 1414
1413 web_ui()->CallJavascriptFunction( 1415 web_ui()->CallJavascriptFunction(
1414 "BrowserOptions.setupProxySettingsSection", disabled, label); 1416 "BrowserOptions.setupProxySettingsSection", disabled, label);
1415 #endif // !defined(OS_CHROMEOS) 1417 #endif // !defined(OS_CHROMEOS)
1416 } 1418 }
1417 1419
1418 } // namespace options 1420 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/ntp_login_handler.cc ('k') | chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698