Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1142)

Side by Side Diff: chrome/browser/extensions/extension_service.cc

Issue 10826156: Plumb invalidations from Tango to the extensions code for the Push Messaging API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make pushMessaging non-optional Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 input_method_event_router_.reset( 516 input_method_event_router_.reset(
517 new chromeos::ExtensionInputMethodEventRouter); 517 new chromeos::ExtensionInputMethodEventRouter);
518 518
519 ExtensionMediaPlayerEventRouter::GetInstance()->Init(profile_); 519 ExtensionMediaPlayerEventRouter::GetInstance()->Init(profile_);
520 extensions::InputImeEventRouter::GetInstance()->Init(); 520 extensions::InputImeEventRouter::GetInstance()->Init();
521 #endif 521 #endif
522 #endif // defined(ENABLE_EXTENSIONS) 522 #endif // defined(ENABLE_EXTENSIONS)
523 event_routers_initialized_ = true; 523 event_routers_initialized_ = true;
524 } 524 }
525 525
526 void ExtensionService::Shutdown() {
527 push_messaging_event_router_->Shutdown();
Munjal (Google) 2012/08/14 18:56:37 Can't we clean up the event router in the destruct
dcheng 2012/08/14 21:39:59 We cannot. We have dependencies such that PSS depe
528 }
529
526 const Extension* ExtensionService::GetExtensionById( 530 const Extension* ExtensionService::GetExtensionById(
527 const std::string& id, bool include_disabled) const { 531 const std::string& id, bool include_disabled) const {
528 return GetExtensionByIdInternal(id, true, include_disabled, false); 532 return GetExtensionByIdInternal(id, true, include_disabled, false);
529 } 533 }
530 534
531 void ExtensionService::Init() { 535 void ExtensionService::Init() {
532 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 536 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
533 537
534 DCHECK(!ready_); // Can't redo init. 538 DCHECK(!ready_); // Can't redo init.
535 DCHECK_EQ(extensions_.size(), 0u); 539 DCHECK_EQ(extensions_.size(), 0u);
(...skipping 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after
2552 2556
2553 ExtensionService::NaClModuleInfoList::iterator 2557 ExtensionService::NaClModuleInfoList::iterator
2554 ExtensionService::FindNaClModule(const GURL& url) { 2558 ExtensionService::FindNaClModule(const GURL& url) {
2555 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); 2559 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin();
2556 iter != nacl_module_list_.end(); ++iter) { 2560 iter != nacl_module_list_.end(); ++iter) {
2557 if (iter->url == url) 2561 if (iter->url == url)
2558 return iter; 2562 return iter;
2559 } 2563 }
2560 return nacl_module_list_.end(); 2564 return nacl_module_list_.end();
2561 } 2565 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698