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_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 | 474 |
475 void ExtensionService::InitEventRouters() { | 475 void ExtensionService::InitEventRouters() { |
476 if (event_routers_initialized_) | 476 if (event_routers_initialized_) |
477 return; | 477 return; |
478 | 478 |
479 #if defined(ENABLE_EXTENSIONS) | 479 #if defined(ENABLE_EXTENSIONS) |
480 downloads_event_router_.reset(new ExtensionDownloadsEventRouter(profile_)); | 480 downloads_event_router_.reset(new ExtensionDownloadsEventRouter(profile_)); |
481 history_event_router_.reset(new HistoryExtensionEventRouter()); | 481 history_event_router_.reset(new HistoryExtensionEventRouter()); |
482 history_event_router_->ObserveProfile(profile_); | 482 history_event_router_->ObserveProfile(profile_); |
483 browser_event_router_.reset(new ExtensionBrowserEventRouter(profile_)); | 483 browser_event_router_.reset(new ExtensionBrowserEventRouter(profile_)); |
484 browser_event_router_->Init(&toolbar_model_); | 484 browser_event_router_->Init(); |
485 preference_event_router_.reset(new ExtensionPreferenceEventRouter(profile_)); | 485 preference_event_router_.reset(new ExtensionPreferenceEventRouter(profile_)); |
486 bookmark_event_router_.reset(new BookmarkExtensionEventRouter( | 486 bookmark_event_router_.reset(new BookmarkExtensionEventRouter( |
487 profile_->GetBookmarkModel())); | 487 profile_->GetBookmarkModel())); |
488 bookmark_event_router_->Init(); | 488 bookmark_event_router_->Init(); |
489 cookies_event_router_.reset(new | 489 cookies_event_router_.reset(new |
490 extensions::ExtensionCookiesEventRouter(profile_)); | 490 extensions::ExtensionCookiesEventRouter(profile_)); |
491 cookies_event_router_->Init(); | 491 cookies_event_router_->Init(); |
492 management_event_router_.reset(new ExtensionManagementEventRouter(profile_)); | 492 management_event_router_.reset(new ExtensionManagementEventRouter(profile_)); |
493 management_event_router_->Init(); | 493 management_event_router_->Init(); |
494 ExtensionProcessesEventRouter::GetInstance()->ObserveProfile(profile_); | 494 ExtensionProcessesEventRouter::GetInstance()->ObserveProfile(profile_); |
(...skipping 2062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2557 // To coexist with certain unit tests that don't have an IO thread message | 2557 // To coexist with certain unit tests that don't have an IO thread message |
2558 // loop available at ExtensionService shutdown, we lazy-initialize this | 2558 // loop available at ExtensionService shutdown, we lazy-initialize this |
2559 // object so that those cases neither create nor destroy an | 2559 // object so that those cases neither create nor destroy an |
2560 // APIResourceController. | 2560 // APIResourceController. |
2561 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 2561 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
2562 if (!api_resource_controller_) { | 2562 if (!api_resource_controller_) { |
2563 api_resource_controller_ = new extensions::APIResourceController(); | 2563 api_resource_controller_ = new extensions::APIResourceController(); |
2564 } | 2564 } |
2565 return api_resource_controller_; | 2565 return api_resource_controller_; |
2566 } | 2566 } |
OLD | NEW |