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

Unified Diff: chromeos/network/network_handler.h

Issue 15649018: Call crypto::InitializeTPMToken on the IO thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/network/network_handler.h
diff --git a/chromeos/network/network_handler.h b/chromeos/network/network_handler.h
index e3df697cad688d8a0144e4429361cad91f2e4cc9..1ce4a084d592ab098bad5e8a9c684ea380eb53c1 100644
--- a/chromeos/network/network_handler.h
+++ b/chromeos/network/network_handler.h
@@ -6,9 +6,14 @@
#define CHROMEOS_NETWORK_NETWORK_HANDLER_H_
#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "chromeos/chromeos_export.h"
+namespace base {
+class SequencedTaskRunner;
+}
+
namespace chromeos {
class CertLoader;
@@ -25,7 +30,12 @@ class NetworkStateHandler;
class CHROMEOS_EXPORT NetworkHandler {
public:
// Sets the global instance. Must be called before any calls to Get().
- static void Initialize();
+ // |io_task_runner| is used to initialize CertLoader.
+ static void Initialize(
+ const scoped_refptr<base::SequencedTaskRunner>& io_task_runner);
+
+ // Sets the global instance for testing.
+ static void InitializeForTest();
// Destroys the global instance.
static void Shutdown();
@@ -51,7 +61,7 @@ class CHROMEOS_EXPORT NetworkHandler {
NetworkHandler();
virtual ~NetworkHandler();
- void Init();
+ void Init(const scoped_refptr<base::SequencedTaskRunner>& io_task_runner);
// The order of these determines the (inverse) destruction order.
scoped_ptr<CertLoader> cert_loader_;

Powered by Google App Engine
This is Rietveld 408576698