OLD | NEW |
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/updater/extension_updater.h" | 5 #include "chrome/browser/extensions/updater/extension_updater.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <set> | 10 #include <set> |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 } | 584 } |
585 | 585 |
586 void ExtensionUpdater::NotifyStarted() { | 586 void ExtensionUpdater::NotifyStarted() { |
587 content::NotificationService::current()->Notify( | 587 content::NotificationService::current()->Notify( |
588 extensions::NOTIFICATION_EXTENSION_UPDATING_STARTED, | 588 extensions::NOTIFICATION_EXTENSION_UPDATING_STARTED, |
589 content::Source<Profile>(profile_), | 589 content::Source<Profile>(profile_), |
590 content::NotificationService::NoDetails()); | 590 content::NotificationService::NoDetails()); |
591 } | 591 } |
592 | 592 |
593 void ExtensionUpdater::NotifyIfFinished(int request_id) { | 593 void ExtensionUpdater::NotifyIfFinished(int request_id) { |
594 DCHECK(ContainsKey(requests_in_progress_, request_id)); | 594 DCHECK(base::ContainsKey(requests_in_progress_, request_id)); |
595 const InProgressCheck& request = requests_in_progress_[request_id]; | 595 const InProgressCheck& request = requests_in_progress_[request_id]; |
596 if (request.in_progress_ids_.empty()) { | 596 if (request.in_progress_ids_.empty()) { |
597 VLOG(2) << "Finished update check " << request_id; | 597 VLOG(2) << "Finished update check " << request_id; |
598 if (!request.callback.is_null()) | 598 if (!request.callback.is_null()) |
599 request.callback.Run(); | 599 request.callback.Run(); |
600 requests_in_progress_.erase(request_id); | 600 requests_in_progress_.erase(request_id); |
601 } | 601 } |
602 } | 602 } |
603 | 603 |
604 } // namespace extensions | 604 } // namespace extensions |
OLD | NEW |