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/api/downloads/downloads_api.h" | 5 #include "chrome/browser/extensions/api/downloads/downloads_api.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cctype> | 8 #include <cctype> |
9 #include <iterator> | 9 #include <iterator> |
10 #include <set> | 10 #include <set> |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
780 }; | 780 }; |
781 | 781 |
782 std::map<DownloadManager*, ManagerDestructionObserver*>* | 782 std::map<DownloadManager*, ManagerDestructionObserver*>* |
783 ManagerDestructionObserver::manager_file_existence_last_checked_ = NULL; | 783 ManagerDestructionObserver::manager_file_existence_last_checked_ = NULL; |
784 | 784 |
785 void OnDeterminingFilenameWillDispatchCallback( | 785 void OnDeterminingFilenameWillDispatchCallback( |
786 bool* any_determiners, | 786 bool* any_determiners, |
787 ExtensionDownloadsEventRouterData* data, | 787 ExtensionDownloadsEventRouterData* data, |
788 Profile* profile, | 788 Profile* profile, |
789 const extensions::Extension* extension, | 789 const extensions::Extension* extension, |
790 ListValue* event_args) { | 790 base::ListValue* event_args) { |
791 *any_determiners = true; | 791 *any_determiners = true; |
792 base::Time installed = extensions::ExtensionSystem::Get( | 792 base::Time installed = extensions::ExtensionSystem::Get( |
793 profile)->extension_service()->extension_prefs()-> | 793 profile)->extension_service()->extension_prefs()-> |
794 GetInstallTime(extension->id()); | 794 GetInstallTime(extension->id()); |
795 data->AddPendingDeterminer(extension->id(), installed); | 795 data->AddPendingDeterminer(extension->id(), installed); |
796 } | 796 } |
797 | 797 |
798 } // namespace | 798 } // namespace |
799 | 799 |
800 DownloadsDownloadFunction::DownloadsDownloadFunction() {} | 800 DownloadsDownloadFunction::DownloadsDownloadFunction() {} |
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1502 DownloadsNotificationSource notification_source; | 1502 DownloadsNotificationSource notification_source; |
1503 notification_source.event_name = event_name; | 1503 notification_source.event_name = event_name; |
1504 notification_source.profile = profile_; | 1504 notification_source.profile = profile_; |
1505 content::Source<DownloadsNotificationSource> content_source( | 1505 content::Source<DownloadsNotificationSource> content_source( |
1506 ¬ification_source); | 1506 ¬ification_source); |
1507 content::NotificationService::current()->Notify( | 1507 content::NotificationService::current()->Notify( |
1508 chrome::NOTIFICATION_EXTENSION_DOWNLOADS_EVENT, | 1508 chrome::NOTIFICATION_EXTENSION_DOWNLOADS_EVENT, |
1509 content_source, | 1509 content_source, |
1510 content::Details<std::string>(&json_args)); | 1510 content::Details<std::string>(&json_args)); |
1511 } | 1511 } |
OLD | NEW |