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

Unified Diff: chrome/browser/ui/webui/flags_ui.h

Issue 12330137: Allow normal users to change per session flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix include for a moved file. Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/flags_warning.html ('k') | chrome/browser/ui/webui/flags_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/flags_ui.h
diff --git a/chrome/browser/ui/webui/flags_ui.h b/chrome/browser/ui/webui/flags_ui.h
index 0cac343829d09634ce8296c13989aced7401cc26..301ae86ffbb20e9d9415b8fd28385bf4a7884af3 100644
--- a/chrome/browser/ui/webui/flags_ui.h
+++ b/chrome/browser/ui/webui/flags_ui.h
@@ -5,10 +5,17 @@
#ifndef CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_
#define CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_
+#include "base/memory/weak_ptr.h"
#include "content/public/browser/web_ui_controller.h"
#include "ui/base/layout.h"
+#ifdef OS_CHROMEOS
+#include "chrome/browser/chromeos/settings/device_settings_service.h"
+#endif
+
class PrefRegistrySimple;
+class PrefRegistrySyncable;
+class Profile;
namespace base {
class RefCountedMemory;
@@ -17,12 +24,28 @@ class RefCountedMemory;
class FlagsUI : public content::WebUIController {
public:
explicit FlagsUI(content::WebUI* web_ui);
+ virtual ~FlagsUI();
static base::RefCountedMemory* GetFaviconResourceBytes(
ui::ScaleFactor scale_factor);
static void RegisterPrefs(PrefRegistrySimple* registry);
+#ifdef OS_CHROMEOS
+ static void RegisterUserPrefs(PrefRegistrySyncable* registry);
+#endif
private:
+#ifdef OS_CHROMEOS
+ // On ChromeOS verifying if the owner is signed in is async operation and only
+ // after finishing it the UI can be properly populated. This function is the
+ // callback for whether the owner is signed in. It will respectively pick the
+ // proper PrefService for the flags interface.
+ void FinishInitialization(
+ Profile* profile,
+ chromeos::DeviceSettingsService::OwnershipStatus status,
+ bool current_user_is_owner);
+#endif
+ base::WeakPtrFactory<FlagsUI> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(FlagsUI);
};
« no previous file with comments | « chrome/browser/resources/flags_warning.html ('k') | chrome/browser/ui/webui/flags_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698