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

Side by Side Diff: chromeos/tpm_token_loader.cc

Issue 419013003: Replace c/b/nss_context by a KeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Flattened components/cert_database folders. Created 6 years, 1 month 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 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 "chromeos/tpm_token_loader.h" 5 #include "chromeos/tpm_token_loader.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 bool success) { 43 bool success) {
44 runner->PostTask(FROM_HERE, base::Bind(callback, success)); 44 runner->PostTask(FROM_HERE, base::Bind(callback, success));
45 } 45 }
46 46
47 } // namespace 47 } // namespace
48 48
49 static TPMTokenLoader* g_tpm_token_loader = NULL; 49 static TPMTokenLoader* g_tpm_token_loader = NULL;
50 50
51 // static 51 // static
52 void TPMTokenLoader::Initialize() { 52 void TPMTokenLoader::Initialize() {
53 if (g_tpm_token_loader && g_tpm_token_loader->initialized_for_test_)
54 return;
53 CHECK(!g_tpm_token_loader); 55 CHECK(!g_tpm_token_loader);
54 g_tpm_token_loader = new TPMTokenLoader(false /*for_test*/); 56 g_tpm_token_loader = new TPMTokenLoader(false /*for_test*/);
55 } 57 }
56 58
57 // static 59 // static
58 void TPMTokenLoader::InitializeForTest() { 60 void TPMTokenLoader::InitializeForTest() {
59 CHECK(!g_tpm_token_loader); 61 CHECK(!g_tpm_token_loader);
60 g_tpm_token_loader = new TPMTokenLoader(true /*for_test*/); 62 g_tpm_token_loader = new TPMTokenLoader(true /*for_test*/);
61 } 63 }
62 64
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 296 }
295 tpm_ready_callback_list_.clear(); 297 tpm_ready_callback_list_.clear();
296 } 298 }
297 299
298 void TPMTokenLoader::LoggedInStateChanged() { 300 void TPMTokenLoader::LoggedInStateChanged() {
299 VLOG(1) << "LoggedInStateChanged"; 301 VLOG(1) << "LoggedInStateChanged";
300 MaybeStartTokenInitialization(); 302 MaybeStartTokenInitialization();
301 } 303 }
302 304
303 } // namespace chromeos 305 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_certificate_importer_impl_unittest.cc ('k') | components/cert_database.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698