| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef IdentifiersFactory_h | 26 #ifndef IdentifiersFactory_h |
| 27 #define IdentifiersFactory_h | 27 #define IdentifiersFactory_h |
| 28 | 28 |
| 29 #include <wtf/text/WTFString.h> | 29 #include <wtf/text/WTFString.h> |
| 30 | 30 |
| 31 #if ENABLE(INSPECTOR) | |
| 32 | 31 |
| 33 namespace WebCore { | 32 namespace WebCore { |
| 34 | 33 |
| 35 class IdentifiersFactory { | 34 class IdentifiersFactory { |
| 36 public: | 35 public: |
| 37 static void setProcessId(long processId) { s_processId = processId; } | 36 static void setProcessId(long processId) { s_processId = processId; } |
| 38 static String createIdentifier(); | 37 static String createIdentifier(); |
| 39 static String requestId(unsigned long identifier); | 38 static String requestId(unsigned long identifier); |
| 40 private: | 39 private: |
| 41 static String addProcessIdPrefixTo(const String& id); | 40 static String addProcessIdPrefixTo(const String& id); |
| 42 | 41 |
| 43 static long s_processId; | 42 static long s_processId; |
| 44 }; | 43 }; |
| 45 | 44 |
| 46 } // namespace WebCore | 45 } // namespace WebCore |
| 47 | 46 |
| 48 #endif // !defined(IdentifiersFactory_h) | |
| 49 | 47 |
| 50 #endif // ENABLE(INSPECTOR) | 48 #endif // IdentifiersFactory_h |
| OLD | NEW |