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/drive/logging.h" | 8 #include "chrome/browser/chromeos/drive/logging.h" |
9 | 9 |
10 namespace file_manager { | 10 namespace extensions { |
11 namespace { | 11 namespace { |
12 | 12 |
13 const int kSlowOperationThresholdMs = 500; // In ms. | 13 const int kSlowOperationThresholdMs = 500; // In ms. |
14 | 14 |
15 } // namespace | 15 } // namespace |
16 | 16 |
17 LoggedAsyncExtensionFunction::LoggedAsyncExtensionFunction() | 17 LoggedAsyncExtensionFunction::LoggedAsyncExtensionFunction() |
18 : log_on_completion_(false) { | 18 : log_on_completion_(false) { |
19 start_time_ = base::Time::Now(); | 19 start_time_ = base::Time::Now(); |
20 } | 20 } |
(...skipping 15 matching lines...) Expand all Loading... |
36 logging::LOG_WARNING, | 36 logging::LOG_WARNING, |
37 "PEFORMANCE WARNING: %s[%d] was slow. (elapsed time: %sms)", | 37 "PEFORMANCE WARNING: %s[%d] was slow. (elapsed time: %sms)", |
38 name().c_str(), | 38 name().c_str(), |
39 request_id(), | 39 request_id(), |
40 base::Int64ToString(elapsed).c_str()); | 40 base::Int64ToString(elapsed).c_str()); |
41 } | 41 } |
42 | 42 |
43 AsyncExtensionFunction::SendResponse(success); | 43 AsyncExtensionFunction::SendResponse(success); |
44 } | 44 } |
45 | 45 |
46 } // namespace file_manager | 46 } // namespace extensions |
OLD | NEW |