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

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

Issue 2793393002: CrOS settings/metrics: Correctly store Subscriptions (Closed)
Patch Set: . 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
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.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 (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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 #include "ash/shell.h" // nogncheck 123 #include "ash/shell.h" // nogncheck
124 #include "chrome/browser/browser_process_platform_part.h" 124 #include "chrome/browser/browser_process_platform_part.h"
125 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" 125 #include "chrome/browser/chromeos/accessibility/accessibility_util.h"
126 #include "chrome/browser/chromeos/arc/arc_util.h" 126 #include "chrome/browser/chromeos/arc/arc_util.h"
127 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h" 127 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h"
128 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" 128 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
129 #include "chrome/browser/chromeos/net/wake_on_wifi_manager.h" 129 #include "chrome/browser/chromeos/net/wake_on_wifi_manager.h"
130 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 130 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
131 #include "chrome/browser/chromeos/profiles/profile_helper.h" 131 #include "chrome/browser/chromeos/profiles/profile_helper.h"
132 #include "chrome/browser/chromeos/reset/metrics.h" 132 #include "chrome/browser/chromeos/reset/metrics.h"
133 #include "chrome/browser/chromeos/settings/cros_settings.h"
134 #include "chrome/browser/chromeos/system/timezone_util.h" 133 #include "chrome/browser/chromeos/system/timezone_util.h"
135 #include "chrome/browser/policy/profile_policy_connector.h" 134 #include "chrome/browser/policy/profile_policy_connector.h"
136 #include "chrome/browser/policy/profile_policy_connector_factory.h" 135 #include "chrome/browser/policy/profile_policy_connector_factory.h"
137 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" 136 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
138 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" 137 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h"
139 #include "chrome/browser/ui/browser_window.h" 138 #include "chrome/browser/ui/browser_window.h"
140 #include "chromeos/chromeos_switches.h" 139 #include "chromeos/chromeos_switches.h"
141 #include "chromeos/dbus/dbus_thread_manager.h" 140 #include "chromeos/dbus/dbus_thread_manager.h"
142 #include "chromeos/dbus/power_manager_client.h" 141 #include "chromeos/dbus/power_manager_client.h"
143 #include "components/arc/arc_util.h" 142 #include "components/arc/arc_util.h"
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, std::string()))); 1133 policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, std::string())));
1135 policy_registrar_->Observe( 1134 policy_registrar_->Observe(
1136 policy::key::kUserAvatarImage, 1135 policy::key::kUserAvatarImage,
1137 base::Bind(&BrowserOptionsHandler::OnUserImagePolicyChanged, 1136 base::Bind(&BrowserOptionsHandler::OnUserImagePolicyChanged,
1138 base::Unretained(this))); 1137 base::Unretained(this)));
1139 policy_registrar_->Observe( 1138 policy_registrar_->Observe(
1140 policy::key::kWallpaperImage, 1139 policy::key::kWallpaperImage,
1141 base::Bind(&BrowserOptionsHandler::OnWallpaperPolicyChanged, 1140 base::Bind(&BrowserOptionsHandler::OnWallpaperPolicyChanged,
1142 base::Unretained(this))); 1141 base::Unretained(this)));
1143 } 1142 }
1144 chromeos::CrosSettings::Get()->AddSettingsObserver( 1143 system_timezone_policy_observer_ =
1145 chromeos::kSystemTimezonePolicy, 1144 chromeos::CrosSettings::Get()->AddSettingsObserver(
1146 base::Bind(&BrowserOptionsHandler::OnSystemTimezonePolicyChanged, 1145 chromeos::kSystemTimezonePolicy,
1147 weak_ptr_factory_.GetWeakPtr())); 1146 base::Bind(&BrowserOptionsHandler::OnSystemTimezonePolicyChanged,
1147 weak_ptr_factory_.GetWeakPtr()));
1148 local_state_pref_change_registrar_.Init(g_browser_process->local_state()); 1148 local_state_pref_change_registrar_.Init(g_browser_process->local_state());
1149 local_state_pref_change_registrar_.Add( 1149 local_state_pref_change_registrar_.Add(
1150 prefs::kSystemTimezoneAutomaticDetectionPolicy, 1150 prefs::kSystemTimezoneAutomaticDetectionPolicy,
1151 base::Bind(&BrowserOptionsHandler:: 1151 base::Bind(&BrowserOptionsHandler::
1152 OnSystemTimezoneAutomaticDetectionPolicyChanged, 1152 OnSystemTimezoneAutomaticDetectionPolicyChanged,
1153 base::Unretained(this))); 1153 base::Unretained(this)));
1154 ArcAppListPrefs* arc_prefs = ArcAppListPrefs::Get(profile); 1154 ArcAppListPrefs* arc_prefs = ArcAppListPrefs::Get(profile);
1155 if (arc_prefs) 1155 if (arc_prefs)
1156 arc_prefs->AddObserver(this); 1156 arc_prefs->AddObserver(this);
1157 #else // !defined(OS_CHROMEOS) 1157 #else // !defined(OS_CHROMEOS)
(...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after
2364 2364
2365 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { 2365 bool BrowserOptionsHandler::IsDeviceOwnerProfile() {
2366 #if defined(OS_CHROMEOS) 2366 #if defined(OS_CHROMEOS)
2367 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); 2367 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui()));
2368 #else 2368 #else
2369 return true; 2369 return true;
2370 #endif 2370 #endif
2371 } 2371 }
2372 2372
2373 } // namespace options 2373 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698