| Index: chrome/browser/extensions/api/api_function.cc
|
| diff --git a/chrome/browser/extensions/api/api_function.cc b/chrome/browser/extensions/api/api_function.cc
|
| index 7bcbdc74450b2a33df7ee6ac16d8b17bf76b3cab..398b1392f6feb3b6f06d6e1e5ff8a9fe96485672 100644
|
| --- a/chrome/browser/extensions/api/api_function.cc
|
| +++ b/chrome/browser/extensions/api/api_function.cc
|
| @@ -12,6 +12,29 @@ using content::BrowserThread;
|
|
|
| namespace extensions {
|
|
|
| +ApiFunction::ApiFunction() {
|
| +}
|
| +
|
| +ApiFunction::~ApiFunction() {
|
| +}
|
| +
|
| +int ApiFunction::ExtractSrcId(const DictionaryValue* options) {
|
| + int src_id = -1;
|
| + if (options) {
|
| + if (options->HasKey(kSrcIdKey))
|
| + EXTENSION_FUNCTION_VALIDATE(options->GetInteger(kSrcIdKey, &src_id));
|
| + }
|
| + return src_id;
|
| +}
|
| +
|
| +ApiResourceEventNotifier* ApiFunction::CreateEventNotifier(int src_id) {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + return new ApiResourceEventNotifier(
|
| + profile()->GetExtensionEventRouter(), profile(), extension_id(),
|
| + src_id, source_url());
|
| +}
|
| +
|
| +// AsyncApiFunction
|
| AsyncApiFunction::AsyncApiFunction()
|
| : work_thread_id_(BrowserThread::IO) {
|
| }
|
| @@ -69,20 +92,4 @@ void AsyncApiFunction::RespondOnUIThread() {
|
| SendResponse(Respond());
|
| }
|
|
|
| -int AsyncApiFunction::ExtractSrcId(const DictionaryValue* options) {
|
| - int src_id = -1;
|
| - if (options) {
|
| - if (options->HasKey(kSrcIdKey))
|
| - EXTENSION_FUNCTION_VALIDATE(options->GetInteger(kSrcIdKey, &src_id));
|
| - }
|
| - return src_id;
|
| -}
|
| -
|
| -ApiResourceEventNotifier* AsyncApiFunction::CreateEventNotifier(int src_id) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| - return new ApiResourceEventNotifier(
|
| - profile()->GetExtensionEventRouter(), profile(), extension_id(),
|
| - src_id, source_url());
|
| -}
|
| -
|
| } // namespace extensions
|
|
|