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

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

Issue 1395043002: Remove ability for users to launch ephemeral apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/install_tracker.h" 5 #include "chrome/browser/extensions/install_tracker.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/extensions/install_tracker_factory.h" 9 #include "chrome/browser/extensions/install_tracker_factory.h"
10 #include "content/public/browser/notification_service.h" 10 #include "content/public/browser/notification_service.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 void InstallTracker::RemoveActiveInstall(const std::string& extension_id) { 72 void InstallTracker::RemoveActiveInstall(const std::string& extension_id) {
73 active_installs_.erase(extension_id); 73 active_installs_.erase(extension_id);
74 } 74 }
75 75
76 void InstallTracker::OnBeginExtensionInstall( 76 void InstallTracker::OnBeginExtensionInstall(
77 const InstallObserver::ExtensionInstallParams& params) { 77 const InstallObserver::ExtensionInstallParams& params) {
78 ActiveInstallsMap::iterator install_data = 78 ActiveInstallsMap::iterator install_data =
79 active_installs_.find(params.extension_id); 79 active_installs_.find(params.extension_id);
80 if (install_data == active_installs_.end()) { 80 if (install_data == active_installs_.end()) {
81 ActiveInstallData install_data(params.extension_id); 81 ActiveInstallData install_data(params.extension_id);
82 install_data.is_ephemeral = params.is_ephemeral;
83 active_installs_.insert(std::make_pair(params.extension_id, install_data)); 82 active_installs_.insert(std::make_pair(params.extension_id, install_data));
84 } 83 }
85 84
86 FOR_EACH_OBSERVER(InstallObserver, observers_, 85 FOR_EACH_OBSERVER(InstallObserver, observers_,
87 OnBeginExtensionInstall(params)); 86 OnBeginExtensionInstall(params));
88 } 87 }
89 88
90 void InstallTracker::OnBeginExtensionDownload(const std::string& extension_id) { 89 void InstallTracker::OnBeginExtensionDownload(const std::string& extension_id) {
91 FOR_EACH_OBSERVER( 90 FOR_EACH_OBSERVER(
92 InstallObserver, observers_, OnBeginExtensionDownload(extension_id)); 91 InstallObserver, observers_, OnBeginExtensionDownload(extension_id));
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 const Extension* extension, 152 const Extension* extension,
154 bool is_update) { 153 bool is_update) {
155 RemoveActiveInstall(extension->id()); 154 RemoveActiveInstall(extension->id());
156 } 155 }
157 156
158 void InstallTracker::OnAppsReordered() { 157 void InstallTracker::OnAppsReordered() {
159 FOR_EACH_OBSERVER(InstallObserver, observers_, OnAppsReordered()); 158 FOR_EACH_OBSERVER(InstallObserver, observers_, OnAppsReordered());
160 } 159 }
161 160
162 } // namespace extensions 161 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/install_observer.cc ('k') | chrome/browser/extensions/install_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698