Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mock_nonce_generator.h
Go to the documentation of this file.
1 // Copyright 2013 Google Inc. All Rights Reserved.
14 
16 
17 #ifndef PAGESPEED_KERNEL_UTIL_MOCK_NONCE_GENERATOR_H_
18 #define PAGESPEED_KERNEL_UTIL_MOCK_NONCE_GENERATOR_H_
19 
21 
24 
25 namespace net_instaweb {
26 
29  public:
30  explicit MockNonceGenerator(AbstractMutex* mutex)
31  : NonceGenerator(mutex), counter_(0) { }
32  virtual ~MockNonceGenerator();
33 
34  protected:
35  virtual uint64 NewNonceImpl();
36 
37  private:
38  uint64 counter_;
39 
40 
41 };
42 
43 }
44 
45 #endif
virtual uint64 NewNonceImpl()
Subclasses must implement this method. Locking is already handled.
Abstract interface for implementing a mutex.
Definition: abstract_mutex.h:28
A nonce generator that simply yields successive integers starting from 0.
Definition: mock_nonce_generator.h:28
Definition: nonce_generator.h:28
NonceGenerator(AbstractMutex *mutex)
Takes ownership of mutex.
Definition: nonce_generator.h:36