OLD | NEW |
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/chromeos/platform_keys/platform_keys_service.h" | 5 #include "chrome/browser/chromeos/platform_keys/platform_keys_service.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/callback.h" | 9 #include "base/callback.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 }; | 505 }; |
506 | 506 |
507 PlatformKeysService::SelectDelegate::SelectDelegate() { | 507 PlatformKeysService::SelectDelegate::SelectDelegate() { |
508 } | 508 } |
509 | 509 |
510 PlatformKeysService::SelectDelegate::~SelectDelegate() { | 510 PlatformKeysService::SelectDelegate::~SelectDelegate() { |
511 } | 511 } |
512 | 512 |
513 PlatformKeysService::PlatformKeysService( | 513 PlatformKeysService::PlatformKeysService( |
514 bool profile_is_managed, | 514 bool profile_is_managed, |
| 515 PrefService* profile_prefs, |
| 516 policy::PolicyService* profile_policies, |
515 content::BrowserContext* browser_context, | 517 content::BrowserContext* browser_context, |
516 extensions::StateStore* state_store) | 518 extensions::StateStore* state_store) |
517 : browser_context_(browser_context), | 519 : browser_context_(browser_context), |
518 key_permissions_(profile_is_managed, state_store), | 520 key_permissions_(profile_is_managed, |
| 521 profile_prefs, |
| 522 profile_policies, |
| 523 state_store), |
519 weak_factory_(this) { | 524 weak_factory_(this) { |
520 DCHECK(browser_context); | 525 DCHECK(browser_context); |
521 DCHECK(state_store); | 526 DCHECK(state_store); |
522 } | 527 } |
523 | 528 |
524 PlatformKeysService::~PlatformKeysService() { | 529 PlatformKeysService::~PlatformKeysService() { |
525 } | 530 } |
526 | 531 |
527 void PlatformKeysService::SetSelectDelegate( | 532 void PlatformKeysService::SetSelectDelegate( |
528 scoped_ptr<SelectDelegate> delegate) { | 533 scoped_ptr<SelectDelegate> delegate) { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 while (!tasks_.empty() && tasks_.front()->IsDone()) | 594 while (!tasks_.empty() && tasks_.front()->IsDone()) |
590 tasks_.pop(); | 595 tasks_.pop(); |
591 | 596 |
592 // Now either the queue is empty or the next task is not finished yet and it | 597 // Now either the queue is empty or the next task is not finished yet and it |
593 // can be started. | 598 // can be started. |
594 if (!tasks_.empty()) | 599 if (!tasks_.empty()) |
595 tasks_.front()->Start(); | 600 tasks_.front()->Start(); |
596 } | 601 } |
597 | 602 |
598 } // namespace chromeos | 603 } // namespace chromeos |
OLD | NEW |