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

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

Issue 1053663003: Cleanup: Remove unused variables in chrome/ found by Scythe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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/policy_ui.h" 5 #include "chrome/browser/ui/webui/policy_ui.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 387
388 void GetChromePolicyValues(base::DictionaryValue* values) const; 388 void GetChromePolicyValues(base::DictionaryValue* values) const;
389 389
390 void HandleInitialized(const base::ListValue* args); 390 void HandleInitialized(const base::ListValue* args);
391 void HandleReloadPolicies(const base::ListValue* args); 391 void HandleReloadPolicies(const base::ListValue* args);
392 392
393 void OnRefreshPoliciesDone() const; 393 void OnRefreshPoliciesDone() const;
394 394
395 policy::PolicyService* GetPolicyService() const; 395 policy::PolicyService* GetPolicyService() const;
396 396
397 bool initialized_;
398 std::string device_domain_; 397 std::string device_domain_;
399 398
400 // Providers that supply status dictionaries for user and device policy, 399 // Providers that supply status dictionaries for user and device policy,
401 // respectively. These are created on initialization time as appropriate for 400 // respectively. These are created on initialization time as appropriate for
402 // the platform (Chrome OS / desktop) and type of policy that is in effect. 401 // the platform (Chrome OS / desktop) and type of policy that is in effect.
403 scoped_ptr<CloudPolicyStatusProvider> user_status_provider_; 402 scoped_ptr<CloudPolicyStatusProvider> user_status_provider_;
404 scoped_ptr<CloudPolicyStatusProvider> device_status_provider_; 403 scoped_ptr<CloudPolicyStatusProvider> device_status_provider_;
405 404
406 #if defined(ENABLE_EXTENSIONS) 405 #if defined(ENABLE_EXTENSIONS)
407 content::NotificationRegistrar registrar_; 406 content::NotificationRegistrar registrar_;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 if (user_id == user_id_) 518 if (user_id == user_id_)
520 NotifyStatusChange(); 519 NotifyStatusChange();
521 } 520 }
522 521
523 void DeviceLocalAccountPolicyStatusProvider::OnDeviceLocalAccountsChanged() { 522 void DeviceLocalAccountPolicyStatusProvider::OnDeviceLocalAccountsChanged() {
524 NotifyStatusChange(); 523 NotifyStatusChange();
525 } 524 }
526 #endif 525 #endif
527 526
528 PolicyUIHandler::PolicyUIHandler() 527 PolicyUIHandler::PolicyUIHandler()
529 : initialized_(false), 528 : weak_factory_(this) {
530 weak_factory_(this) {
531 } 529 }
532 530
533 PolicyUIHandler::~PolicyUIHandler() { 531 PolicyUIHandler::~PolicyUIHandler() {
534 GetPolicyService()->RemoveObserver(policy::POLICY_DOMAIN_CHROME, this); 532 GetPolicyService()->RemoveObserver(policy::POLICY_DOMAIN_CHROME, this);
535 GetPolicyService()->RemoveObserver(policy::POLICY_DOMAIN_EXTENSIONS, this); 533 GetPolicyService()->RemoveObserver(policy::POLICY_DOMAIN_EXTENSIONS, this);
536 policy::SchemaRegistry* registry = 534 policy::SchemaRegistry* registry =
537 policy::SchemaRegistryServiceFactory::GetForContext( 535 policy::SchemaRegistryServiceFactory::GetForContext(
538 Profile::FromWebUI(web_ui())->GetOriginalProfile())->registry(); 536 Profile::FromWebUI(web_ui())->GetOriginalProfile())->registry();
539 registry->RemoveObserver(this); 537 registry->RemoveObserver(this);
540 } 538 }
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 } 808 }
811 809
812 PolicyUI::PolicyUI(content::WebUI* web_ui) : WebUIController(web_ui) { 810 PolicyUI::PolicyUI(content::WebUI* web_ui) : WebUIController(web_ui) {
813 web_ui->AddMessageHandler(new PolicyUIHandler); 811 web_ui->AddMessageHandler(new PolicyUIHandler);
814 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), 812 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui),
815 CreatePolicyUIHTMLSource()); 813 CreatePolicyUIHTMLSource());
816 } 814 }
817 815
818 PolicyUI::~PolicyUI() { 816 PolicyUI::~PolicyUI() {
819 } 817 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/sync_setup_handler_unittest.cc ('k') | chrome/browser/ui/zoom/zoom_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698