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 <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 const char kTooManyListeners[] = "Each extension may have at most one " | 106 const char kTooManyListeners[] = "Each extension may have at most one " |
107 "onDeterminingFilename listener between all of its renderer execution " | 107 "onDeterminingFilename listener between all of its renderer execution " |
108 "contexts."; | 108 "contexts."; |
109 const char kUnexpectedDeterminer[] = "Unexpected determineFilename call"; | 109 const char kUnexpectedDeterminer[] = "Unexpected determineFilename call"; |
110 const char kUserGesture[] = "User gesture required"; | 110 const char kUserGesture[] = "User gesture required"; |
111 | 111 |
112 } // namespace download_extension_errors | 112 } // namespace download_extension_errors |
113 | 113 |
114 namespace errors = download_extension_errors; | 114 namespace errors = download_extension_errors; |
115 | 115 |
| 116 namespace extensions { |
| 117 |
116 namespace { | 118 namespace { |
117 | 119 |
118 namespace downloads = extensions::api::downloads; | 120 namespace downloads = extensions::api::downloads; |
119 | 121 |
120 // Default icon size for getFileIcon() in pixels. | 122 // Default icon size for getFileIcon() in pixels. |
121 const int kDefaultIconSize = 32; | 123 const int kDefaultIconSize = 32; |
122 | 124 |
123 // Parameter keys | 125 // Parameter keys |
124 const char kByExtensionIdKey[] = "byExtensionId"; | 126 const char kByExtensionIdKey[] = "byExtensionId"; |
125 const char kByExtensionNameKey[] = "byExtensionName"; | 127 const char kByExtensionNameKey[] = "byExtensionName"; |
(...skipping 1767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1893 void ExtensionDownloadsEventRouter::OnExtensionUnloaded( | 1895 void ExtensionDownloadsEventRouter::OnExtensionUnloaded( |
1894 content::BrowserContext* browser_context, | 1896 content::BrowserContext* browser_context, |
1895 const extensions::Extension* extension, | 1897 const extensions::Extension* extension, |
1896 extensions::UnloadedExtensionInfo::Reason reason) { | 1898 extensions::UnloadedExtensionInfo::Reason reason) { |
1897 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1899 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
1898 std::set<const extensions::Extension*>::iterator iter = | 1900 std::set<const extensions::Extension*>::iterator iter = |
1899 shelf_disabling_extensions_.find(extension); | 1901 shelf_disabling_extensions_.find(extension); |
1900 if (iter != shelf_disabling_extensions_.end()) | 1902 if (iter != shelf_disabling_extensions_.end()) |
1901 shelf_disabling_extensions_.erase(iter); | 1903 shelf_disabling_extensions_.erase(iter); |
1902 } | 1904 } |
| 1905 |
| 1906 } // namespace extensions |
OLD | NEW |