| 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 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h" |
| 6 | 6 |
| 7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
| 8 #include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h" | 8 #include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h" |
| 9 #include "chrome/browser/drive/event_logger.h" | 9 #include "components/drive/event_logger.h" |
| 10 | 10 |
| 11 namespace extensions { | 11 namespace extensions { |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 const int kSlowOperationThresholdMs = 500; // In ms. | 14 const int kSlowOperationThresholdMs = 500; // In ms. |
| 15 | 15 |
| 16 } // namespace | 16 } // namespace |
| 17 | 17 |
| 18 LoggedAsyncExtensionFunction::LoggedAsyncExtensionFunction() | 18 LoggedAsyncExtensionFunction::LoggedAsyncExtensionFunction() |
| 19 : log_on_completion_(false) { | 19 : log_on_completion_(false) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 34 } else if (elapsed >= kSlowOperationThresholdMs) { | 34 } else if (elapsed >= kSlowOperationThresholdMs) { |
| 35 logger->Log(logging::LOG_WARNING, | 35 logger->Log(logging::LOG_WARNING, |
| 36 "PEFORMANCE WARNING: %s[%d] was slow. (elapsed time: %sms)", | 36 "PEFORMANCE WARNING: %s[%d] was slow. (elapsed time: %sms)", |
| 37 name(), request_id(), base::Int64ToString(elapsed).c_str()); | 37 name(), request_id(), base::Int64ToString(elapsed).c_str()); |
| 38 } | 38 } |
| 39 } | 39 } |
| 40 ChromeAsyncExtensionFunction::SendResponse(success); | 40 ChromeAsyncExtensionFunction::SendResponse(success); |
| 41 } | 41 } |
| 42 | 42 |
| 43 } // namespace extensions | 43 } // namespace extensions |
| OLD | NEW |