1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/xpcom/threads/nsEnvironment.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,34 @@ 1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef nsEnvironment_h__ 1.10 +#define nsEnvironment_h__ 1.11 + 1.12 +#include "mozilla/Attributes.h" 1.13 +#include "mozilla/Mutex.h" 1.14 +#include "nsIEnvironment.h" 1.15 + 1.16 +#define NS_ENVIRONMENT_CID \ 1.17 + { 0X3D68F92UL, 0X9513, 0X4E25, \ 1.18 + { 0X9B, 0XE9, 0X7C, 0XB2, 0X39, 0X87, 0X41, 0X72 } } 1.19 +#define NS_ENVIRONMENT_CONTRACTID "@mozilla.org/process/environment;1" 1.20 + 1.21 +class nsEnvironment MOZ_FINAL : public nsIEnvironment 1.22 +{ 1.23 +public: 1.24 + NS_DECL_THREADSAFE_ISUPPORTS 1.25 + NS_DECL_NSIENVIRONMENT 1.26 + 1.27 + static nsresult Create(nsISupports *aOuter, REFNSIID aIID, 1.28 + void **aResult); 1.29 + 1.30 +private: 1.31 + nsEnvironment() : mLock("nsEnvironment.mLock") { } 1.32 + ~nsEnvironment(); 1.33 + 1.34 + mozilla::Mutex mLock; 1.35 +}; 1.36 + 1.37 +#endif /* !nsEnvironment_h__ */