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

Side by Side Diff: chrome/browser/supervised_user/legacy/supervised_user_registration_utility.cc

Issue 1104643003: Supervised users: Post blocking pool tasks with CONTINUE_SHUTDOWN behavior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@issue388560
Patch Set: Created 5 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/supervised_user/legacy/supervised_user_registration_uti lity.h" 5 #include "chrome/browser/supervised_user/legacy/supervised_user_registration_uti lity.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 pending_supervised_user_id_, 299 pending_supervised_user_id_,
300 supervised_users::kChromeOSPasswordData, 300 supervised_users::kChromeOSPasswordData,
301 scoped_ptr<base::Value>(info.password_data.DeepCopy()), 301 scoped_ptr<base::Value>(info.password_data.DeepCopy()),
302 base::Bind( 302 base::Bind(
303 &SupervisedUserRegistrationUtilityImpl:: 303 &SupervisedUserRegistrationUtilityImpl::
304 OnPasswordChangeAcknowledged, 304 OnPasswordChangeAcknowledged,
305 weak_ptr_factory_.GetWeakPtr()))); 305 weak_ptr_factory_.GetWeakPtr())));
306 } 306 }
307 307
308 syncer::GetSessionName( 308 syncer::GetSessionName(
309 content::BrowserThread::GetBlockingPool(), 309 content::BrowserThread::GetBlockingPool()
310 ->GetTaskRunnerWithShutdownBehavior(
311 base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN).get(),
310 base::Bind(&SupervisedUserRegistrationUtilityImpl::FetchToken, 312 base::Bind(&SupervisedUserRegistrationUtilityImpl::FetchToken,
311 weak_ptr_factory_.GetWeakPtr())); 313 weak_ptr_factory_.GetWeakPtr()));
312 } 314 }
313 315
314 void SupervisedUserRegistrationUtilityImpl::CancelPendingRegistration() { 316 void SupervisedUserRegistrationUtilityImpl::CancelPendingRegistration() {
315 AbortPendingRegistration( 317 AbortPendingRegistration(
316 false, // Don't run the callback. The error will be ignored. 318 false, // Don't run the callback. The error will be ignored.
317 GoogleServiceAuthError(GoogleServiceAuthError::NONE)); 319 GoogleServiceAuthError(GoogleServiceAuthError::NONE));
318 } 320 }
319 321
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 pending_supervised_user_id_); 410 pending_supervised_user_id_);
409 } 411 }
410 } 412 }
411 413
412 if (run_callback) 414 if (run_callback)
413 callback_.Run(error, pending_supervised_user_token_); 415 callback_.Run(error, pending_supervised_user_token_);
414 callback_.Reset(); 416 callback_.Reset();
415 } 417 }
416 418
417 } // namespace 419 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698