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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 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 "chrome/browser/policy/cloud/cloud_policy_validator.h" 5 #include "chrome/browser/policy/cloud/cloud_policy_validator.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" 10 #include "chrome/browser/policy/cloud/cloud_policy_constants.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 timestamp_option_(TIMESTAMP_REQUIRED), 124 timestamp_option_(TIMESTAMP_REQUIRED),
125 dm_token_option_(DM_TOKEN_REQUIRED), 125 dm_token_option_(DM_TOKEN_REQUIRED),
126 allow_key_rotation_(false) {} 126 allow_key_rotation_(false) {}
127 127
128 void CloudPolicyValidatorBase::PostValidationTask( 128 void CloudPolicyValidatorBase::PostValidationTask(
129 const base::Closure& completion_callback) { 129 const base::Closure& completion_callback) {
130 content::BrowserThread::PostTask( 130 content::BrowserThread::PostTask(
131 content::BrowserThread::FILE, FROM_HERE, 131 content::BrowserThread::FILE, FROM_HERE,
132 base::Bind(&CloudPolicyValidatorBase::PerformValidation, 132 base::Bind(&CloudPolicyValidatorBase::PerformValidation,
133 base::Passed(scoped_ptr<CloudPolicyValidatorBase>(this)), 133 base::Passed(scoped_ptr<CloudPolicyValidatorBase>(this)),
134 MessageLoop::current()->message_loop_proxy(), 134 base::MessageLoop::current()->message_loop_proxy(),
135 completion_callback)); 135 completion_callback));
136 } 136 }
137 137
138 // static 138 // static
139 void CloudPolicyValidatorBase::PerformValidation( 139 void CloudPolicyValidatorBase::PerformValidation(
140 scoped_ptr<CloudPolicyValidatorBase> self, 140 scoped_ptr<CloudPolicyValidatorBase> self,
141 scoped_refptr<base::MessageLoopProxy> message_loop, 141 scoped_refptr<base::MessageLoopProxy> message_loop,
142 const base::Closure& completion_callback) { 142 const base::Closure& completion_callback) {
143 // Run the validation activities on this thread. 143 // Run the validation activities on this thread.
144 self->RunValidation(); 144 self->RunValidation();
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 } 367 }
368 verifier.VerifyUpdate(reinterpret_cast<const uint8*>(data.c_str()), 368 verifier.VerifyUpdate(reinterpret_cast<const uint8*>(data.c_str()),
369 data.size()); 369 data.size());
370 return verifier.VerifyFinal(); 370 return verifier.VerifyFinal();
371 } 371 }
372 372
373 template class CloudPolicyValidator<em::CloudPolicySettings>; 373 template class CloudPolicyValidator<em::CloudPolicySettings>;
374 template class CloudPolicyValidator<em::ExternalPolicyData>; 374 template class CloudPolicyValidator<em::ExternalPolicyData>;
375 375
376 } // namespace policy 376 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698