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

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

Issue 2707133006: Start ARC and sign in after Chrome OS login (Closed)
Patch Set: rebase to ToT 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/webui/options/browser_options_handler.h" 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 ->GetPolicies(policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, 1212 ->GetPolicies(policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME,
1213 std::string())) 1213 std::string()))
1214 .Get(policy::key::kUserAvatarImage)); 1214 .Get(policy::key::kUserAvatarImage));
1215 1215
1216 OnWallpaperManagedChanged( 1216 OnWallpaperManagedChanged(
1217 chromeos::WallpaperManager::Get()->IsPolicyControlled( 1217 chromeos::WallpaperManager::Get()->IsPolicyControlled(
1218 user->GetAccountId())); 1218 user->GetAccountId()));
1219 1219
1220 if (arc::IsArcAllowedForProfile(profile) && 1220 if (arc::IsArcAllowedForProfile(profile) &&
1221 !arc::IsArcOptInVerificationDisabled()) { 1221 !arc::IsArcOptInVerificationDisabled()) {
1222 base::Value is_arc_enabled(arc::IsArcPlayStoreEnabledForProfile(profile)); 1222 base::Value is_play_store_enabled(
1223 arc::IsArcPlayStoreEnabledForProfile(profile));
1223 web_ui()->CallJavascriptFunctionUnsafe( 1224 web_ui()->CallJavascriptFunctionUnsafe(
1224 "BrowserOptions.showAndroidAppsSection", 1225 "BrowserOptions.showAndroidAppsSection", is_play_store_enabled);
1225 is_arc_enabled);
1226 // Get the initial state of Android Settings app readiness. 1226 // Get the initial state of Android Settings app readiness.
1227 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = 1227 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info =
1228 ArcAppListPrefs::Get(profile)->GetApp(arc::kSettingsAppId); 1228 ArcAppListPrefs::Get(profile)->GetApp(arc::kSettingsAppId);
1229 if (app_info && app_info->ready) 1229 if (app_info && app_info->ready)
1230 UpdateAndroidSettingsAppState(app_info->ready); 1230 UpdateAndroidSettingsAppState(app_info->ready);
1231 } 1231 }
1232 1232
1233 OnSystemTimezoneAutomaticDetectionPolicyChanged(); 1233 OnSystemTimezoneAutomaticDetectionPolicyChanged();
1234 #endif 1234 #endif
1235 } 1235 }
(...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after
2353 2353
2354 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { 2354 bool BrowserOptionsHandler::IsDeviceOwnerProfile() {
2355 #if defined(OS_CHROMEOS) 2355 #if defined(OS_CHROMEOS)
2356 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); 2356 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui()));
2357 #else 2357 #else
2358 return true; 2358 return true;
2359 #endif 2359 #endif
2360 } 2360 }
2361 2361
2362 } // namespace options 2362 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698