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

Side by Side Diff: chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc

Issue 549313004: Remove implicit conversions from scoped_refptr to T* in c/b/chromeos/policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/chromeos/policy/user_cloud_policy_manager_chromeos.h" 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.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/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 void UserCloudPolicyManagerChromeOS::Connect( 106 void UserCloudPolicyManagerChromeOS::Connect(
107 PrefService* local_state, 107 PrefService* local_state,
108 DeviceManagementService* device_management_service, 108 DeviceManagementService* device_management_service,
109 scoped_refptr<net::URLRequestContextGetter> system_request_context, 109 scoped_refptr<net::URLRequestContextGetter> system_request_context,
110 UserAffiliation user_affiliation) { 110 UserAffiliation user_affiliation) {
111 DCHECK(device_management_service); 111 DCHECK(device_management_service);
112 DCHECK(local_state); 112 DCHECK(local_state);
113 local_state_ = local_state; 113 local_state_ = local_state;
114 scoped_refptr<net::URLRequestContextGetter> request_context; 114 scoped_refptr<net::URLRequestContextGetter> request_context;
115 if (system_request_context) { 115 if (system_request_context.get()) {
116 // |system_request_context| can be null for tests. 116 // |system_request_context| can be null for tests.
117 // Use the system request context here instead of a context derived 117 // Use the system request context here instead of a context derived
118 // from the Profile because Connect() is called before the profile is 118 // from the Profile because Connect() is called before the profile is
119 // fully initialized (required so we can perform the initial policy load). 119 // fully initialized (required so we can perform the initial policy load).
120 // TODO(atwilson): Change this to use a UserPolicyRequestContext once 120 // TODO(atwilson): Change this to use a UserPolicyRequestContext once
121 // Connect() is called after profile initialization. http://crbug.com/323591 121 // Connect() is called after profile initialization. http://crbug.com/323591
122 request_context = new SystemPolicyRequestContext( 122 request_context = new SystemPolicyRequestContext(
123 system_request_context, GetUserAgent()); 123 system_request_context, GetUserAgent());
124 } 124 }
125 scoped_ptr<CloudPolicyClient> cloud_policy_client( 125 scoped_ptr<CloudPolicyClient> cloud_policy_client(
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 // OnComponentCloudPolicyUpdated() once it's ready. 386 // OnComponentCloudPolicyUpdated() once it's ready.
387 return; 387 return;
388 } 388 }
389 389
390 core()->StartRefreshScheduler(); 390 core()->StartRefreshScheduler();
391 core()->TrackRefreshDelayPref(local_state_, 391 core()->TrackRefreshDelayPref(local_state_,
392 policy_prefs::kUserPolicyRefreshRate); 392 policy_prefs::kUserPolicyRefreshRate);
393 } 393 }
394 394
395 } // namespace policy 395 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698