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 #include "chrome/browser/extensions/extension_function_registry.h" | 5 #include "chrome/browser/extensions/extension_function_registry.h" |
6 | 6 |
7 #include "chrome/browser/accessibility/accessibility_extension_api.h" | 7 #include "chrome/browser/accessibility/accessibility_extension_api.h" |
8 #include "chrome/browser/bookmarks/bookmark_extension_api.h" | 8 #include "chrome/browser/bookmarks/bookmark_extension_api.h" |
9 #include "chrome/browser/bookmarks/bookmark_manager_extension_api.h" | 9 #include "chrome/browser/bookmarks/bookmark_manager_extension_api.h" |
10 #include "chrome/browser/extensions/api/app/app_api.h" | 10 #include "chrome/browser/extensions/api/app/app_api.h" |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 RegisterFunction<extensions::MetricsRecordValueFunction>(); | 216 RegisterFunction<extensions::MetricsRecordValueFunction>(); |
217 RegisterFunction<extensions::MetricsRecordPercentageFunction>(); | 217 RegisterFunction<extensions::MetricsRecordPercentageFunction>(); |
218 RegisterFunction<extensions::MetricsRecordCountFunction>(); | 218 RegisterFunction<extensions::MetricsRecordCountFunction>(); |
219 RegisterFunction<extensions::MetricsRecordSmallCountFunction>(); | 219 RegisterFunction<extensions::MetricsRecordSmallCountFunction>(); |
220 RegisterFunction<extensions::MetricsRecordMediumCountFunction>(); | 220 RegisterFunction<extensions::MetricsRecordMediumCountFunction>(); |
221 RegisterFunction<extensions::MetricsRecordTimeFunction>(); | 221 RegisterFunction<extensions::MetricsRecordTimeFunction>(); |
222 RegisterFunction<extensions::MetricsRecordMediumTimeFunction>(); | 222 RegisterFunction<extensions::MetricsRecordMediumTimeFunction>(); |
223 RegisterFunction<extensions::MetricsRecordLongTimeFunction>(); | 223 RegisterFunction<extensions::MetricsRecordLongTimeFunction>(); |
224 | 224 |
225 // RLZ. | 225 // RLZ. |
226 #if defined(OS_WIN) || defined(OS_MACOSX) | 226 #if defined(ENABLE_RLZ) |
227 RegisterFunction<RlzRecordProductEventFunction>(); | 227 RegisterFunction<RlzRecordProductEventFunction>(); |
228 RegisterFunction<RlzGetAccessPointRlzFunction>(); | 228 RegisterFunction<RlzGetAccessPointRlzFunction>(); |
229 RegisterFunction<RlzSendFinancialPingFunction>(); | 229 RegisterFunction<RlzSendFinancialPingFunction>(); |
230 RegisterFunction<RlzClearProductStateFunction>(); | 230 RegisterFunction<RlzClearProductStateFunction>(); |
231 #endif | 231 #endif |
232 | 232 |
233 // Cookies. | 233 // Cookies. |
234 RegisterFunction<extensions::GetCookieFunction>(); | 234 RegisterFunction<extensions::GetCookieFunction>(); |
235 RegisterFunction<extensions::GetAllCookiesFunction>(); | 235 RegisterFunction<extensions::GetAllCookiesFunction>(); |
236 RegisterFunction<extensions::SetCookieFunction>(); | 236 RegisterFunction<extensions::SetCookieFunction>(); |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 } | 537 } |
538 | 538 |
539 ExtensionFunction* ExtensionFunctionRegistry::NewFunction( | 539 ExtensionFunction* ExtensionFunctionRegistry::NewFunction( |
540 const std::string& name) { | 540 const std::string& name) { |
541 FactoryMap::iterator iter = factories_.find(name); | 541 FactoryMap::iterator iter = factories_.find(name); |
542 DCHECK(iter != factories_.end()); | 542 DCHECK(iter != factories_.end()); |
543 ExtensionFunction* function = iter->second(); | 543 ExtensionFunction* function = iter->second(); |
544 function->set_name(name); | 544 function->set_name(name); |
545 return function; | 545 return function; |
546 } | 546 } |
OLD | NEW |