OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_RECORD_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_RECORD_RECORD_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_RECORD_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_RECORD_RECORD_API_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/extensions/extension_function.h" | 9 #include "chrome/browser/extensions/extension_function.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
12 #include "base/time.h" | 12 #include "base/time.h" |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 const FilePath::CharType kURLErrorsSuffix[] = FILE_PATH_LITERAL(".errors"); | 16 const FilePath::CharType kURLErrorsSuffix[] = FILE_PATH_LITERAL(".errors"); |
17 const char kErrorsKey[] = "errors"; | 17 const char kErrorsKey[] = "errors"; |
18 const char kStatsKey[] = "stats"; | 18 const char kStatsKey[] = "stats"; |
19 | 19 |
20 }; | 20 }; |
21 | 21 |
| 22 namespace extensions { |
| 23 |
22 // ProcessStrategy abstracts the API's starting and waiting on a test | 24 // ProcessStrategy abstracts the API's starting and waiting on a test |
23 // browser instance. This lets us browser-test the API without actually | 25 // browser instance. This lets us browser-test the API without actually |
24 // firing up a sub browser instance. | 26 // firing up a sub browser instance. |
25 class ProcessStrategy { | 27 class ProcessStrategy { |
26 public: | 28 public: |
27 // Needed to void build warnings | 29 // Needed to void build warnings |
28 virtual ~ProcessStrategy(); | 30 virtual ~ProcessStrategy(); |
29 | 31 |
30 // Used only in test version to pump the blocking pool queue, | 32 // Used only in test version to pump the blocking pool queue, |
31 // which doesn't otherwise happen during test. | 33 // which doesn't otherwise happen during test. |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 FilePath stats_file_path_; | 154 FilePath stats_file_path_; |
153 | 155 |
154 // This time datum marks the start and end of the sub-browser run. | 156 // This time datum marks the start and end of the sub-browser run. |
155 base::Time timer_; | 157 base::Time timer_; |
156 | 158 |
157 // These two data are additional information returned to caller. | 159 // These two data are additional information returned to caller. |
158 int run_time_ms_; | 160 int run_time_ms_; |
159 std::string stats_; | 161 std::string stats_; |
160 }; | 162 }; |
161 | 163 |
162 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_RECORD_API_H_ | 164 } // namespace extensions |
| 165 |
| 166 #endif // CHROME_BROWSER_EXTENSIONS_API_RECORD_RECORD_API_H_ |
OLD | NEW |