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

Unified Diff: chrome/browser/extensions/platform_app_service.cc

Issue 11299326: Revert 170660 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/platform_app_service.cc
===================================================================
--- chrome/browser/extensions/platform_app_service.cc (revision 170888)
+++ chrome/browser/extensions/platform_app_service.cc (working copy)
@@ -1,45 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/extensions/platform_app_service.h"
-
-#include "chrome/browser/extensions/extension_host.h"
-#include "chrome/common/chrome_notification_types.h"
-#include "chrome/common/extensions/extension.h"
-#include "content/public/browser/browser_context.h"
-#include "content/public/browser/notification_details.h"
-#include "content/public/browser/notification_service.h"
-#include "content/public/browser/notification_types.h"
-
-namespace extensions {
-
-PlatformAppService::PlatformAppService(Profile* profile) {
-#if !defined(OS_CHROMEOS)
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_CREATED,
- content::Source<content::BrowserContext>(profile));
-#endif
-}
-
-PlatformAppService::~PlatformAppService() {}
-
-void PlatformAppService::Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- switch (type) {
- case chrome::NOTIFICATION_EXTENSION_HOST_CREATED: {
-// This code causes problems at logout for ChromeOS, and is not necessary anyway
-// as the browser process lifetime is defined by the session.
-#if !defined(OS_CHROMEOS)
- ExtensionHost* host = content::Details<ExtensionHost>(details).ptr();
- if (host->extension()->is_platform_app())
- host->SetKeepsBrowserProcessAlive();
-#endif
- break;
- }
- default:
- NOTREACHED();
- }
-}
-
-} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/platform_app_service.h ('k') | chrome/browser/extensions/platform_app_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698