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

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

Issue 98433003: Fixed crash in CloudPolicyManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos build Created 7 years 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/cloud_policy_manager.h" 5 #include "chrome/browser/policy/cloud/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/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 this, 125 this,
126 schema_registry(), 126 schema_registry(),
127 core(), 127 core(),
128 resource_cache.Pass(), 128 resource_cache.Pass(),
129 request_context, 129 request_context,
130 file_task_runner_, 130 file_task_runner_,
131 io_task_runner_)); 131 io_task_runner_));
132 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) 132 #endif // !defined(OS_ANDROID) && !defined(OS_IOS)
133 } 133 }
134 134
135 void CloudPolicyManager::ClearAndDestroyComponentCloudPolicyService() {
136 #if !defined(OS_ANDROID) && !defined(OS_IOS)
137 if (component_policy_service_) {
138 component_policy_service_->ClearCache();
139 component_policy_service_.reset();
140 }
141 #endif // !defined(OS_ANDROID) && !defined(OS_IOS)
142 }
143
135 void CloudPolicyManager::OnRefreshComplete(bool success) { 144 void CloudPolicyManager::OnRefreshComplete(bool success) {
136 waiting_for_policy_refresh_ = false; 145 waiting_for_policy_refresh_ = false;
137 CheckAndPublishPolicy(); 146 CheckAndPublishPolicy();
138 } 147 }
139 148
140 } // namespace policy 149 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698