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

Side by Side Diff: chrome/browser/ui/webui/policy_ui.h

Issue 10236003: Added RefreshPolicies to PolicyService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_WEBUI_POLICY_UI_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_POLICY_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_POLICY_UI_H_ 6 #define CHROME_BROWSER_UI_WEBUI_POLICY_UI_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h"
10 #include "base/values.h" 11 #include "base/values.h"
11 #include "chrome/browser/policy/cloud_policy_subsystem.h" 12 #include "chrome/browser/policy/cloud_policy_subsystem.h"
12 #include "chrome/browser/policy/configuration_policy_reader.h" 13 #include "chrome/browser/policy/configuration_policy_reader.h"
13 #include "content/public/browser/web_ui_controller.h" 14 #include "content/public/browser/web_ui_controller.h"
14 #include "content/public/browser/web_ui_message_handler.h" 15 #include "content/public/browser/web_ui_message_handler.h"
15 16
16 namespace policy { 17 namespace policy {
17 class CloudPolicyDataStore; 18 class CloudPolicyDataStore;
18 } 19 }
19 20
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // |refresh_pref| and returns it as a string16. 60 // |refresh_pref| and returns it as a string16.
60 string16 GetPolicyFetchInterval(const char* refresh_pref); 61 string16 GetPolicyFetchInterval(const char* refresh_pref);
61 62
62 // Returns the string corresponding to the CloudPolicySubsystem::ErrorDetails 63 // Returns the string corresponding to the CloudPolicySubsystem::ErrorDetails
63 // enum value |error_details|. 64 // enum value |error_details|.
64 static string16 CreateStatusMessageString( 65 static string16 CreateStatusMessageString(
65 policy::CloudPolicySubsystem::ErrorDetails error_details); 66 policy::CloudPolicySubsystem::ErrorDetails error_details);
66 67
67 scoped_ptr<policy::PolicyStatus> policy_status_; 68 scoped_ptr<policy::PolicyStatus> policy_status_;
68 69
70 // Used to post a callback to RefreshPolicies with a WeakPtr to |this|.
71 base::WeakPtrFactory<PolicyUIHandler> weak_ptr_factory_;
72
69 DISALLOW_COPY_AND_ASSIGN(PolicyUIHandler); 73 DISALLOW_COPY_AND_ASSIGN(PolicyUIHandler);
70 }; 74 };
71 75
72 // The Web UI handler for about:policy. 76 // The Web UI handler for about:policy.
73 class PolicyUI : public content::WebUIController { 77 class PolicyUI : public content::WebUIController {
74 public: 78 public:
75 explicit PolicyUI(content::WebUI* web_ui); 79 explicit PolicyUI(content::WebUI* web_ui);
76 virtual ~PolicyUI(); 80 virtual ~PolicyUI();
77 81
78 private: 82 private:
79 DISALLOW_COPY_AND_ASSIGN(PolicyUI); 83 DISALLOW_COPY_AND_ASSIGN(PolicyUI);
80 }; 84 };
81 85
82 #endif // CHROME_BROWSER_UI_WEBUI_POLICY_UI_H_ 86 #endif // CHROME_BROWSER_UI_WEBUI_POLICY_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698