| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BLIMP_ENGINE_APP_BLIMP_ENGINE_CONFIG_H_ | 5 #ifndef BLIMP_ENGINE_APP_BLIMP_ENGINE_CONFIG_H_ |
| 6 #define BLIMP_ENGINE_APP_BLIMP_ENGINE_CONFIG_H_ | 6 #define BLIMP_ENGINE_APP_BLIMP_ENGINE_CONFIG_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 // Attempts to create a BlimpEngineConfig based on the parameters in the | 36 // Attempts to create a BlimpEngineConfig based on the parameters in the |
| 37 // specified CommandLine. This validates all of the command line switches and | 37 // specified CommandLine. This validates all of the command line switches and |
| 38 // parses all files specified. Returns a non-null std::unique_ptr on success. | 38 // parses all files specified. Returns a non-null std::unique_ptr on success. |
| 39 static std::unique_ptr<BlimpEngineConfig> Create( | 39 static std::unique_ptr<BlimpEngineConfig> Create( |
| 40 const base::CommandLine& cmd_line); | 40 const base::CommandLine& cmd_line); |
| 41 | 41 |
| 42 // Creates a BlimpEngineConfig based on individual components. Should only | 42 // Creates a BlimpEngineConfig based on individual components. Should only |
| 43 // be used for testing. | 43 // be used for testing. |
| 44 static std::unique_ptr<BlimpEngineConfig> CreateForTest( | 44 static std::unique_ptr<BlimpEngineConfig> CreateForTest( |
| 45 const std::string& client_token); | 45 const std::string& client_auth_token); |
| 46 | 46 |
| 47 // Returns the client token. | 47 // Returns the client token. |
| 48 const std::string& client_token() const; | 48 const std::string& client_auth_token() const; |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 explicit BlimpEngineConfig(const std::string& client_token); | 51 explicit BlimpEngineConfig(const std::string& client_auth_token); |
| 52 | 52 |
| 53 const std::string client_token_; | 53 const std::string client_auth_token_; |
| 54 | 54 |
| 55 DISALLOW_COPY_AND_ASSIGN(BlimpEngineConfig); | 55 DISALLOW_COPY_AND_ASSIGN(BlimpEngineConfig); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace engine | 58 } // namespace engine |
| 59 } // namespace blimp | 59 } // namespace blimp |
| 60 | 60 |
| 61 #endif // BLIMP_ENGINE_APP_BLIMP_ENGINE_CONFIG_H_ | 61 #endif // BLIMP_ENGINE_APP_BLIMP_ENGINE_CONFIG_H_ |
| OLD | NEW |