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

Side by Side Diff: chrome/browser/policy/cloud/user_cloud_policy_manager.cc

Issue 49783006: policy: Remove SigninManager from UserCloudPolicyStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 1 month 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 "chrome/browser/policy/cloud/user_cloud_policy_manager.h" 5 #include "chrome/browser/policy/cloud/user_cloud_policy_manager.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/sequenced_task_runner.h" 9 #include "base/sequenced_task_runner.h"
10 #include "chrome/browser/policy/cloud/cloud_external_data_manager.h" 10 #include "chrome/browser/policy/cloud/cloud_external_data_manager.h"
(...skipping 28 matching lines...) Expand all
39 UserCloudPolicyManagerFactory::GetInstance()->Unregister(profile_, this); 39 UserCloudPolicyManagerFactory::GetInstance()->Unregister(profile_, this);
40 } 40 }
41 41
42 void UserCloudPolicyManager::Shutdown() { 42 void UserCloudPolicyManager::Shutdown() {
43 if (external_data_manager_) 43 if (external_data_manager_)
44 external_data_manager_->Disconnect(); 44 external_data_manager_->Disconnect();
45 CloudPolicyManager::Shutdown(); 45 CloudPolicyManager::Shutdown();
46 BrowserContextKeyedService::Shutdown(); 46 BrowserContextKeyedService::Shutdown();
47 } 47 }
48 48
49 void UserCloudPolicyManager::SetSigninUsername(const std::string& username) {
50 store_->SetSigninUsername(username);
51 }
52
49 void UserCloudPolicyManager::Connect( 53 void UserCloudPolicyManager::Connect(
50 PrefService* local_state, 54 PrefService* local_state,
51 scoped_refptr<net::URLRequestContextGetter> request_context, 55 scoped_refptr<net::URLRequestContextGetter> request_context,
52 scoped_ptr<CloudPolicyClient> client) { 56 scoped_ptr<CloudPolicyClient> client) {
53 core()->Connect(client.Pass()); 57 core()->Connect(client.Pass());
54 core()->StartRefreshScheduler(); 58 core()->StartRefreshScheduler();
55 core()->TrackRefreshDelayPref(local_state, 59 core()->TrackRefreshDelayPref(local_state,
56 policy_prefs::kUserPolicyRefreshRate); 60 policy_prefs::kUserPolicyRefreshRate);
57 if (external_data_manager_) 61 if (external_data_manager_)
58 external_data_manager_->Connect(request_context); 62 external_data_manager_->Connect(request_context);
(...skipping 17 matching lines...) Expand all
76 // all external data references have been removed, causing the 80 // all external data references have been removed, causing the
77 // |external_data_manager_| to clear its cache as well. 81 // |external_data_manager_| to clear its cache as well.
78 store_->Clear(); 82 store_->Clear();
79 } 83 }
80 84
81 bool UserCloudPolicyManager::IsClientRegistered() const { 85 bool UserCloudPolicyManager::IsClientRegistered() const {
82 return client() && client()->is_registered(); 86 return client() && client()->is_registered();
83 } 87 }
84 88
85 } // namespace policy 89 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698