Index: crypto/nss_util.cc |
=================================================================== |
--- crypto/nss_util.cc (revision 79901) |
+++ crypto/nss_util.cc (working copy) |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "base/nss_util.h" |
-#include "base/nss_util_internal.h" |
+#include "crypto/nss_util.h" |
+#include "crypto/nss_util_internal.h" |
#include <nss.h> |
#include <plarena.h> |
@@ -39,7 +39,7 @@ |
#include "base/synchronization/lock.h" |
#endif // defined(USE_NSS) |
-namespace base { |
+namespace crypto { |
namespace { |
@@ -143,7 +143,7 @@ |
// singleton. |
class NSPRInitSingleton { |
private: |
- friend struct DefaultLazyInstanceTraits<NSPRInitSingleton>; |
+ friend struct base::DefaultLazyInstanceTraits<NSPRInitSingleton>; |
NSPRInitSingleton() { |
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0); |
@@ -161,8 +161,9 @@ |
} |
}; |
-LazyInstance<NSPRInitSingleton, LeakyLazyInstanceTraits<NSPRInitSingleton> > |
- g_nspr_singleton(LINKER_INITIALIZED); |
+base::LazyInstance<NSPRInitSingleton, |
+ base::LeakyLazyInstanceTraits<NSPRInitSingleton> > |
+ g_nspr_singleton(base::LINKER_INITIALIZED); |
class NSSInitSingleton { |
public: |
@@ -215,7 +216,7 @@ |
} |
private: |
- friend struct DefaultLazyInstanceTraits<NSSInitSingleton>; |
+ friend struct base::DefaultLazyInstanceTraits<NSSInitSingleton>; |
NSSInitSingleton() |
: real_db_slot_(NULL), |
@@ -372,8 +373,9 @@ |
// static |
bool NSSInitSingleton::force_nodb_init_ = false; |
-LazyInstance<NSSInitSingleton, LeakyLazyInstanceTraits<NSSInitSingleton> > |
- g_nss_singleton(LINKER_INITIALIZED); |
+base::LazyInstance<NSSInitSingleton, |
+ base::LeakyLazyInstanceTraits<NSSInitSingleton> > |
+ g_nss_singleton(base::LINKER_INITIALIZED); |
} // namespace |
@@ -393,7 +395,7 @@ |
// Initializing SSL causes us to do blocking IO. |
// Temporarily allow it until we fix |
// http://code.google.com/p/chromium/issues/detail?id=59847 |
- ThreadRestrictions::ScopedAllowIO allow_io; |
+ base::ThreadRestrictions::ScopedAllowIO allow_io; |
g_nss_singleton.Get(); |
} |
@@ -402,7 +404,7 @@ |
} |
void DisableNSSForkCheck() { |
- scoped_ptr<Environment> env(Environment::Create()); |
+ scoped_ptr<base::Environment> env(base::Environment::Create()); |
env->SetVar("NSS_STRICT_NOFORK", "DISABLED"); |
} |
@@ -486,11 +488,11 @@ |
// TODO(port): Implement this more simply. We can convert by subtracting an |
// offset (the difference between NSPR's and base::Time's epochs). |
-Time PRTimeToBaseTime(PRTime prtime) { |
+base::Time PRTimeToBaseTime(PRTime prtime) { |
PRExplodedTime prxtime; |
PR_ExplodeTime(prtime, PR_GMTParameters, &prxtime); |
- Time::Exploded exploded; |
+ base::Time::Exploded exploded; |
exploded.year = prxtime.tm_year; |
exploded.month = prxtime.tm_month + 1; |
exploded.day_of_week = prxtime.tm_wday; |
@@ -500,11 +502,11 @@ |
exploded.second = prxtime.tm_sec; |
exploded.millisecond = prxtime.tm_usec / 1000; |
- return Time::FromUTCExploded(exploded); |
+ return base::Time::FromUTCExploded(exploded); |
} |
PK11SlotInfo* GetDefaultNSSKeySlot() { |
return g_nss_singleton.Get().GetDefaultKeySlot(); |
} |
-} // namespace base |
+} // namespace crypto |