| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // This file contains base classes for fileManagerPrivate API. | 5 // This file contains base classes for fileManagerPrivate API. |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_BASE_H_ | 7 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_BASE_H_ |
| 8 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_BASE_H_ | 8 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_BASE_H_ |
| 9 | 9 |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // the logging is turned off, a warning is emitted when a function call is | 21 // the logging is turned off, a warning is emitted when a function call is |
| 22 // very slow. See the implementation of SendResponse() for details. | 22 // very slow. See the implementation of SendResponse() for details. |
| 23 class LoggedAsyncExtensionFunction : public ChromeAsyncExtensionFunction { | 23 class LoggedAsyncExtensionFunction : public ChromeAsyncExtensionFunction { |
| 24 public: | 24 public: |
| 25 LoggedAsyncExtensionFunction(); | 25 LoggedAsyncExtensionFunction(); |
| 26 | 26 |
| 27 protected: | 27 protected: |
| 28 virtual ~LoggedAsyncExtensionFunction(); | 28 virtual ~LoggedAsyncExtensionFunction(); |
| 29 | 29 |
| 30 // AsyncExtensionFunction overrides. | 30 // AsyncExtensionFunction overrides. |
| 31 virtual void SendResponse(bool success) OVERRIDE; | 31 virtual void SendResponse(bool success) override; |
| 32 | 32 |
| 33 // Sets the logging on completion flag. By default, logging is turned off. | 33 // Sets the logging on completion flag. By default, logging is turned off. |
| 34 void set_log_on_completion(bool log_on_completion) { | 34 void set_log_on_completion(bool log_on_completion) { |
| 35 log_on_completion_ = log_on_completion; | 35 log_on_completion_ = log_on_completion; |
| 36 } | 36 } |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 base::Time start_time_; | 39 base::Time start_time_; |
| 40 bool log_on_completion_; | 40 bool log_on_completion_; |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 } // namespace extensions | 43 } // namespace extensions |
| 44 | 44 |
| 45 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_BASE_H_ | 45 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_BASE_H_ |
| OLD | NEW |