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

Side by Side Diff: chrome/browser/extensions/api/alarms/alarm_manager.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/alarms/alarm_manager.h" 5 #include "chrome/browser/extensions/api/alarms/alarm_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 storage->GetExtensionValue( 412 storage->GetExtensionValue(
413 extension->id(), 413 extension->id(),
414 kRegisteredAlarms, 414 kRegisteredAlarms,
415 base::Bind( 415 base::Bind(
416 &AlarmManager::ReadFromStorage, AsWeakPtr(), extension->id())); 416 &AlarmManager::ReadFromStorage, AsWeakPtr(), extension->id()));
417 } 417 }
418 } 418 }
419 419
420 void AlarmManager::OnExtensionUninstalled( 420 void AlarmManager::OnExtensionUninstalled(
421 content::BrowserContext* browser_context, 421 content::BrowserContext* browser_context,
422 const Extension* extension) { 422 const Extension* extension,
423 extensions::UninstallReason reason) {
423 RemoveAllAlarms(extension->id(), base::Bind(RemoveAllOnUninstallCallback)); 424 RemoveAllAlarms(extension->id(), base::Bind(RemoveAllOnUninstallCallback));
424 } 425 }
425 426
426 // AlarmManager::Alarm 427 // AlarmManager::Alarm
427 428
428 Alarm::Alarm() 429 Alarm::Alarm()
429 : js_alarm(new api::alarms::Alarm()) { 430 : js_alarm(new api::alarms::Alarm()) {
430 } 431 }
431 432
432 Alarm::Alarm(const std::string& name, 433 Alarm::Alarm(const std::string& name,
(...skipping 28 matching lines...) Expand all
461 if (create_info.period_in_minutes.get()) { 462 if (create_info.period_in_minutes.get()) {
462 js_alarm->period_in_minutes.reset( 463 js_alarm->period_in_minutes.reset(
463 new double(*create_info.period_in_minutes)); 464 new double(*create_info.period_in_minutes));
464 } 465 }
465 } 466 }
466 467
467 Alarm::~Alarm() { 468 Alarm::~Alarm() {
468 } 469 }
469 470
470 } // namespace extensions 471 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/alarms/alarm_manager.h ('k') | chrome/browser/extensions/api/commands/command_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698