Bug 789217 - 0003. Bring up keystore. r=khuey
authorChuck Lee <chulee@mozilla.com>
Tue, 01 Oct 2013 12:09:57 +0800
changeset 164460 1192f75d0d22eaa51c2f945cc485a8c1f5d97e48
parent 164459 f671257977b28b1ff7e8e8cd60092347d56dc851
child 164461 4a5442007b43d0cf7176cf2b018404bd7bacc90e
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs789217
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 789217 - 0003. Bring up keystore. r=khuey
dom/system/gonk/SystemWorkerManager.cpp
dom/system/gonk/SystemWorkerManager.h
--- a/dom/system/gonk/SystemWorkerManager.cpp
+++ b/dom/system/gonk/SystemWorkerManager.cpp
@@ -26,16 +26,17 @@
 #include "mozilla/dom/workers/Workers.h"
 #ifdef MOZ_WIDGET_GONK
 #include "mozilla/ipc/Netd.h"
 #include "AutoMounter.h"
 #include "TimeZoneSettingObserver.h"
 #include "AudioManager.h"
 #endif
 #include "mozilla/ipc/Ril.h"
+#include "mozilla/ipc/KeyStore.h"
 #include "nsIObserverService.h"
 #include "nsCxPusher.h"
 #include "nsServiceManagerUtils.h"
 #include "nsThreadUtils.h"
 #include "nsRadioInterfaceLayer.h"
 #include "WifiWorker.h"
 
 USING_WORKERS_NAMESPACE
@@ -336,16 +337,18 @@ SystemWorkerManager::Init()
   mozilla::AutoSafeJSContext cx;
 
   nsresult rv = InitWifi(cx);
   if (NS_FAILED(rv)) {
     NS_WARNING("Failed to initialize WiFi Networking!");
     return rv;
   }
 
+  InitKeyStore(cx);
+
 #ifdef MOZ_WIDGET_GONK
   InitAutoMounter();
   InitializeTimeZoneSettingObserver();
   rv = InitNetd(cx);
   NS_ENSURE_SUCCESS(rv, rv);
   nsCOMPtr<nsIAudioManager> audioManager =
     do_GetService(NS_AUDIOMANAGER_CONTRACTID);
 #endif
@@ -540,16 +543,23 @@ SystemWorkerManager::InitWifi(JSContext 
 {
   nsCOMPtr<nsIWorkerHolder> worker = do_CreateInstance(kWifiWorkerCID);
   NS_ENSURE_TRUE(worker, NS_ERROR_FAILURE);
 
   mWifiWorker = worker;
   return NS_OK;
 }
 
+nsresult
+SystemWorkerManager::InitKeyStore(JSContext *cx)
+{
+  mKeyStore = new KeyStore();
+  return NS_OK;
+}
+
 NS_IMPL_ISUPPORTS3(SystemWorkerManager,
                    nsIObserver,
                    nsIInterfaceRequestor,
                    nsISystemWorkerManager)
 
 NS_IMETHODIMP
 SystemWorkerManager::Observe(nsISupports *aSubject, const char *aTopic,
                              const PRUnichar *aData)
--- a/dom/system/gonk/SystemWorkerManager.h
+++ b/dom/system/gonk/SystemWorkerManager.h
@@ -30,16 +30,17 @@
 
 class nsIWorkerHolder;
 
 namespace mozilla {
 
 namespace ipc {
   class RilConsumer;
   class UnixSocketRawData;
+  class KeyStore;
 }
 
 namespace dom {
 namespace gonk {
 
 class SystemWorkerManager : public nsIObserver,
                             public nsIInterfaceRequestor,
                             public nsISystemWorkerManager
@@ -65,23 +66,25 @@ public:
 private:
   SystemWorkerManager();
   ~SystemWorkerManager();
 
 #ifdef MOZ_WIDGET_GONK
   nsresult InitNetd(JSContext *cx);
 #endif
   nsresult InitWifi(JSContext *cx);
+  nsresult InitKeyStore(JSContext *cx);
 
 #ifdef MOZ_WIDGET_GONK
   nsCOMPtr<nsIWorkerHolder> mNetdWorker;
 #endif
   nsCOMPtr<nsIWorkerHolder> mWifiWorker;
 
   nsTArray<nsRefPtr<ipc::RilConsumer> > mRilConsumers;
+  nsRefPtr<ipc::KeyStore> mKeyStore;
 
   bool mShutdown;
 };
 
 }
 }
 }