| 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 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 std::map<DownloadManager*, ManagerDestructionObserver*>* | 893 std::map<DownloadManager*, ManagerDestructionObserver*>* |
| 894 ManagerDestructionObserver::manager_file_existence_last_checked_ = NULL; | 894 ManagerDestructionObserver::manager_file_existence_last_checked_ = NULL; |
| 895 | 895 |
| 896 void OnDeterminingFilenameWillDispatchCallback( | 896 void OnDeterminingFilenameWillDispatchCallback( |
| 897 bool* any_determiners, | 897 bool* any_determiners, |
| 898 ExtensionDownloadsEventRouterData* data, | 898 ExtensionDownloadsEventRouterData* data, |
| 899 content::BrowserContext* context, | 899 content::BrowserContext* context, |
| 900 const extensions::Extension* extension, | 900 const extensions::Extension* extension, |
| 901 base::ListValue* event_args) { | 901 base::ListValue* event_args) { |
| 902 *any_determiners = true; | 902 *any_determiners = true; |
| 903 base::Time installed = extensions::ExtensionSystem::Get( | 903 base::Time installed = extensions::ExtensionPrefs::Get(context)-> |
| 904 context)->extension_service()->extension_prefs()-> | |
| 905 GetInstallTime(extension->id()); | 904 GetInstallTime(extension->id()); |
| 906 data->AddPendingDeterminer(extension->id(), installed); | 905 data->AddPendingDeterminer(extension->id(), installed); |
| 907 } | 906 } |
| 908 | 907 |
| 909 bool Fault(bool error, | 908 bool Fault(bool error, |
| 910 const char* message_in, | 909 const char* message_in, |
| 911 std::string* message_out) { | 910 std::string* message_out) { |
| 912 if (!error) | 911 if (!error) |
| 913 return false; | 912 return false; |
| 914 *message_out = message_in; | 913 *message_out = message_in; |
| (...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1899 extensions::UnloadedExtensionInfo* unloaded = | 1898 extensions::UnloadedExtensionInfo* unloaded = |
| 1900 content::Details<extensions::UnloadedExtensionInfo>(details).ptr(); | 1899 content::Details<extensions::UnloadedExtensionInfo>(details).ptr(); |
| 1901 std::set<const extensions::Extension*>::iterator iter = | 1900 std::set<const extensions::Extension*>::iterator iter = |
| 1902 shelf_disabling_extensions_.find(unloaded->extension); | 1901 shelf_disabling_extensions_.find(unloaded->extension); |
| 1903 if (iter != shelf_disabling_extensions_.end()) | 1902 if (iter != shelf_disabling_extensions_.end()) |
| 1904 shelf_disabling_extensions_.erase(iter); | 1903 shelf_disabling_extensions_.erase(iter); |
| 1905 break; | 1904 break; |
| 1906 } | 1905 } |
| 1907 } | 1906 } |
| 1908 } | 1907 } |
| OLD | NEW |