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

Unified Diff: chrome/browser/chromeos/arc/arc_support_host.cc

Issue 2102793002: arc: Implement silent OptIn mode for managed Arc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/arc/arc_support_host.cc
diff --git a/chrome/browser/chromeos/arc/arc_support_host.cc b/chrome/browser/chromeos/arc/arc_support_host.cc
index 3713eb058dab9ea26329320fbb9e032a40d6dcb9..25b0e0ba29ae48835e3c7be85152319e39956074 100644
--- a/chrome/browser/chromeos/arc/arc_support_host.cc
+++ b/chrome/browser/chromeos/arc/arc_support_host.cc
@@ -28,12 +28,14 @@
namespace {
const char kAction[] = "action";
-const char kCode[] = "code";
const char kCanEnable[] = "canEnable";
-const char kStatus[] = "status";
+const char kCode[] = "code";
+const char kCountryCode[] = "countryCode";
const char kData[] = "data";
const char kDeviceId[] = "deviceId";
const char kOn[] = "on";
+const char kSilentMode[] = "silentMode";
+const char kStatus[] = "status";
const char kPage[] = "page";
const char kText[] = "text";
const char kActionInitialize[] = "initialize";
@@ -136,7 +138,7 @@ void ArcSupportHost::Initialize() {
const std::string& app_locale = g_browser_process->GetApplicationLocale();
const std::string& country_code = base::CountryCodeForCurrentTimezone();
- localized_strings->SetString("countryCode", country_code);
+ localized_strings->SetString(kCountryCode, country_code);
webui::SetLoadTimeDataDefaults(app_locale, localized_strings.get());
@@ -151,6 +153,8 @@ void ArcSupportHost::Initialize() {
request.SetString(kAction, kActionInitialize);
request.Set(kData, std::move(localized_strings));
request.SetString(kDeviceId, device_id);
+ request.SetBoolean(kSilentMode, arc_auth_service->IsArcManaged());
+
base::JSONWriter::Write(request, &request_string);
client_->PostMessageFromNativeHost(request_string);
}
« no previous file with comments | « chrome/browser/chromeos/arc/arc_auth_service.cc ('k') | chrome/browser/resources/chromeos/arc_support/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698