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

Side by Side Diff: chrome/browser/extensions/api/developer_private/developer_private_api.cc

Issue 398083002: Add "UninstallReason" parameter to ExtensionRegistryObserver::OnExtensionUninstalled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix header file. Created 6 years, 5 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 (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/api/developer_private/developer_private_api. h" 5 #include "chrome/browser/extensions/api/developer_private/developer_private_api. h"
6 6
7 #include "apps/app_load_service.h" 7 #include "apps/app_load_service.h"
8 #include "apps/app_restore_service.h" 8 #include "apps/app_restore_service.h"
9 #include "apps/app_window.h" 9 #include "apps/app_window.h"
10 #include "apps/app_window_registry.h" 10 #include "apps/app_window_registry.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 bool is_update, 273 bool is_update,
274 bool from_ephemeral, 274 bool from_ephemeral,
275 const std::string& old_name) { 275 const std::string& old_name) {
276 DCHECK(profile_->IsSameProfile(Profile::FromBrowserContext(browser_context))); 276 DCHECK(profile_->IsSameProfile(Profile::FromBrowserContext(browser_context)));
277 BroadcastItemStateChanged( 277 BroadcastItemStateChanged(
278 browser_context, developer::EVENT_TYPE_INSTALLED, extension->id()); 278 browser_context, developer::EVENT_TYPE_INSTALLED, extension->id());
279 } 279 }
280 280
281 void DeveloperPrivateEventRouter::OnExtensionUninstalled( 281 void DeveloperPrivateEventRouter::OnExtensionUninstalled(
282 content::BrowserContext* browser_context, 282 content::BrowserContext* browser_context,
283 const Extension* extension) { 283 const Extension* extension,
284 extensions::UninstallReason reason) {
284 DCHECK(profile_->IsSameProfile(Profile::FromBrowserContext(browser_context))); 285 DCHECK(profile_->IsSameProfile(Profile::FromBrowserContext(browser_context)));
285 BroadcastItemStateChanged( 286 BroadcastItemStateChanged(
286 browser_context, developer::EVENT_TYPE_UNINSTALLED, extension->id()); 287 browser_context, developer::EVENT_TYPE_UNINSTALLED, extension->id());
287 } 288 }
288 289
289 void DeveloperPrivateEventRouter::OnErrorAdded(const ExtensionError* error) { 290 void DeveloperPrivateEventRouter::OnErrorAdded(const ExtensionError* error) {
290 // We don't want to handle errors thrown by extensions subscribed to these 291 // We don't want to handle errors thrown by extensions subscribed to these
291 // events (currently only the Apps Developer Tool), because doing so risks 292 // events (currently only the Apps Developer Tool), because doing so risks
292 // entering a loop. 293 // entering a loop.
293 if (extension_ids_.find(error->extension_id()) != extension_ids_.end()) 294 if (extension_ids_.find(error->extension_id()) != extension_ids_.end())
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 } 1399 }
1399 1400
1400 error_ui_util::HandleOpenDevTools(dict); 1401 error_ui_util::HandleOpenDevTools(dict);
1401 1402
1402 return true; 1403 return true;
1403 } 1404 }
1404 1405
1405 } // namespace api 1406 } // namespace api
1406 1407
1407 } // namespace extensions 1408 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698