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

Side by Side Diff: chromeos/dbus/session_manager_client.cc

Issue 337053005: Precache policy-for-extensions for device-local accounts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed ios tests Created 6 years, 6 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) 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 "chromeos/dbus/session_manager_client.h" 5 #include "chromeos/dbus/session_manager_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 }; 566 };
567 567
568 // The SessionManagerClient implementation used on Linux desktop, 568 // The SessionManagerClient implementation used on Linux desktop,
569 // which does nothing. 569 // which does nothing.
570 class SessionManagerClientStubImpl : public SessionManagerClient { 570 class SessionManagerClientStubImpl : public SessionManagerClient {
571 public: 571 public:
572 SessionManagerClientStubImpl() : delegate_(NULL) {} 572 SessionManagerClientStubImpl() : delegate_(NULL) {}
573 virtual ~SessionManagerClientStubImpl() {} 573 virtual ~SessionManagerClientStubImpl() {}
574 574
575 // SessionManagerClient overrides 575 // SessionManagerClient overrides
576 virtual void Init(dbus::Bus* bus) OVERRIDE { 576 virtual void Init(dbus::Bus* bus) OVERRIDE {}
577 // Make sure that there are no keys left over from a previous browser run.
578 base::FilePath user_policy_key_dir;
579 if (PathService::Get(chromeos::DIR_USER_POLICY_KEYS,
580 &user_policy_key_dir)) {
581 base::WorkerPool::PostTask(
582 FROM_HERE,
583 base::Bind(base::IgnoreResult(&base::DeleteFile),
584 user_policy_key_dir, true),
585 false);
586 }
587 }
588
589 virtual void SetStubDelegate(StubDelegate* delegate) OVERRIDE { 577 virtual void SetStubDelegate(StubDelegate* delegate) OVERRIDE {
590 delegate_ = delegate; 578 delegate_ = delegate;
591 } 579 }
592 virtual void AddObserver(Observer* observer) OVERRIDE { 580 virtual void AddObserver(Observer* observer) OVERRIDE {
593 observers_.AddObserver(observer); 581 observers_.AddObserver(observer);
594 } 582 }
595 virtual void RemoveObserver(Observer* observer) OVERRIDE { 583 virtual void RemoveObserver(Observer* observer) OVERRIDE {
596 observers_.RemoveObserver(observer); 584 observers_.RemoveObserver(observer);
597 } 585 }
598 virtual bool HasObserver(Observer* observer) OVERRIDE { 586 virtual bool HasObserver(Observer* observer) OVERRIDE {
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 732
745 SessionManagerClient* SessionManagerClient::Create( 733 SessionManagerClient* SessionManagerClient::Create(
746 DBusClientImplementationType type) { 734 DBusClientImplementationType type) {
747 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) 735 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION)
748 return new SessionManagerClientImpl(); 736 return new SessionManagerClientImpl();
749 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); 737 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type);
750 return new SessionManagerClientStubImpl(); 738 return new SessionManagerClientStubImpl();
751 } 739 }
752 740
753 } // namespace chromeos 741 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698