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.h" | 5 #include "chrome/browser/chromeos/platform_keys/platform_keys.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 const net::CertificateList& certs2, | 64 const net::CertificateList& certs2, |
65 const base::Callback<void(std::unique_ptr<net::CertificateList>)>& | 65 const base::Callback<void(std::unique_ptr<net::CertificateList>)>& |
66 callback) { | 66 callback) { |
67 std::unique_ptr<net::CertificateList> intersection(new net::CertificateList); | 67 std::unique_ptr<net::CertificateList> intersection(new net::CertificateList); |
68 net::CertificateList* const intersection_ptr = intersection.get(); | 68 net::CertificateList* const intersection_ptr = intersection.get(); |
69 | 69 |
70 // This is triggered by a call to the | 70 // This is triggered by a call to the |
71 // chrome.platformKeys.selectClientCertificates extensions API. Completion | 71 // chrome.platformKeys.selectClientCertificates extensions API. Completion |
72 // does not affect browser responsiveness, hence the BACKGROUND priority. | 72 // does not affect browser responsiveness, hence the BACKGROUND priority. |
73 base::PostTaskWithTraitsAndReply( | 73 base::PostTaskWithTraitsAndReply( |
74 FROM_HERE, base::TaskTraits() | 74 FROM_HERE, |
75 .WithPriority(base::TaskPriority::BACKGROUND) | 75 {base::TaskPriority::BACKGROUND, |
76 .WithShutdownBehavior( | 76 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}, |
77 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN), | |
78 base::Bind(&IntersectOnWorkerThread, certs1, certs2, intersection_ptr), | 77 base::Bind(&IntersectOnWorkerThread, certs1, certs2, intersection_ptr), |
79 base::Bind(callback, base::Passed(&intersection))); | 78 base::Bind(callback, base::Passed(&intersection))); |
80 } | 79 } |
81 | 80 |
82 } // namespace platform_keys | 81 } // namespace platform_keys |
83 | 82 |
84 } // namespace chromeos | 83 } // namespace chromeos |
OLD | NEW |