Chromium Code Reviews| 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/developer_private/developer_private_api. h" | 5 #include "chrome/browser/extensions/api/developer_private/developer_private_api. h" |
| 6 | 6 |
| 7 #include "apps/app_load_service.h" | 7 #include "apps/app_load_service.h" |
| 8 #include "apps/app_restore_service.h" | 8 #include "apps/app_restore_service.h" |
| 9 #include "apps/saved_files_service.h" | 9 #include "apps/saved_files_service.h" |
| 10 #include "apps/shell_window.h" | 10 #include "apps/shell_window.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 #include "content/public/browser/browser_thread.h" | 46 #include "content/public/browser/browser_thread.h" |
| 47 #include "content/public/browser/notification_service.h" | 47 #include "content/public/browser/notification_service.h" |
| 48 #include "content/public/browser/render_process_host.h" | 48 #include "content/public/browser/render_process_host.h" |
| 49 #include "content/public/browser/render_view_host.h" | 49 #include "content/public/browser/render_view_host.h" |
| 50 #include "content/public/browser/site_instance.h" | 50 #include "content/public/browser/site_instance.h" |
| 51 #include "content/public/browser/storage_partition.h" | 51 #include "content/public/browser/storage_partition.h" |
| 52 #include "content/public/browser/web_contents.h" | 52 #include "content/public/browser/web_contents.h" |
| 53 #include "extensions/browser/view_type_utils.h" | 53 #include "extensions/browser/view_type_utils.h" |
| 54 #include "extensions/common/constants.h" | 54 #include "extensions/common/constants.h" |
| 55 #include "extensions/common/extension_resource.h" | 55 #include "extensions/common/extension_resource.h" |
| 56 #include "extensions/common/install_warning.h" | |
| 56 #include "extensions/common/switches.h" | 57 #include "extensions/common/switches.h" |
| 57 #include "grit/chromium_strings.h" | 58 #include "grit/chromium_strings.h" |
| 58 #include "grit/generated_resources.h" | 59 #include "grit/generated_resources.h" |
| 59 #include "net/base/net_util.h" | 60 #include "net/base/net_util.h" |
| 60 #include "ui/base/l10n/l10n_util.h" | 61 #include "ui/base/l10n/l10n_util.h" |
| 61 #include "ui/webui/web_ui_util.h" | 62 #include "ui/webui/web_ui_util.h" |
| 62 #include "webkit/browser/fileapi/file_system_context.h" | 63 #include "webkit/browser/fileapi/file_system_context.h" |
| 63 #include "webkit/browser/fileapi/file_system_operation.h" | 64 #include "webkit/browser/fileapi/file_system_operation.h" |
| 64 #include "webkit/browser/fileapi/file_system_operation_runner.h" | 65 #include "webkit/browser/fileapi/file_system_operation_runner.h" |
| 65 #include "webkit/browser/fileapi/syncable/syncable_file_system_util.h" | 66 #include "webkit/browser/fileapi/syncable/syncable_file_system_util.h" |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 292 info->type = developer::ITEM_TYPE_THEME; | 293 info->type = developer::ITEM_TYPE_THEME; |
| 293 } else if (item.is_extension()) { | 294 } else if (item.is_extension()) { |
| 294 info->type = developer::ITEM_TYPE_EXTENSION; | 295 info->type = developer::ITEM_TYPE_EXTENSION; |
| 295 } else { | 296 } else { |
| 296 NOTREACHED(); | 297 NOTREACHED(); |
| 297 } | 298 } |
| 298 | 299 |
| 299 if (Manifest::IsUnpackedLocation(item.location())) { | 300 if (Manifest::IsUnpackedLocation(item.location())) { |
| 300 info->path.reset( | 301 info->path.reset( |
| 301 new std::string(UTF16ToUTF8(item.path().LossyDisplayName()))); | 302 new std::string(UTF16ToUTF8(item.path().LossyDisplayName()))); |
| 303 const std::vector<extensions::InstallWarning>& install_warnings = | |
| 304 item.install_warnings(); | |
| 305 if (!install_warnings.empty()) { | |
| 306 info->install_warnings.reset( | |
| 307 new std::vector<linked_ptr<developer::InstallWarning> >()); | |
| 308 for (std::vector<extensions::InstallWarning>::const_iterator it = | |
| 309 install_warnings.begin(); it != install_warnings.end(); ++it) { | |
| 310 linked_ptr<developer::InstallWarning> install_warning( | |
| 311 new developer::InstallWarning()); | |
| 312 install_warning->is_html = (it->format == InstallWarning::FORMAT_HTML); | |
| 313 install_warning->message = it->message; | |
| 314 info->install_warnings->push_back(install_warning); | |
| 315 } | |
| 316 } | |
|
not at google - send to devlin
2013/08/05 18:21:23
instead:
info->path.reset(...)
for (std::vector<e
zhchbin
2013/08/06 02:05:43
Done.
| |
| 302 } | 317 } |
| 303 | 318 |
| 304 info->incognito_enabled = service->IsIncognitoEnabled(item.id()); | 319 info->incognito_enabled = service->IsIncognitoEnabled(item.id()); |
| 305 info->wants_file_access = item.wants_file_access(); | 320 info->wants_file_access = item.wants_file_access(); |
| 306 info->allow_file_access = service->AllowFileAccess(&item); | 321 info->allow_file_access = service->AllowFileAccess(&item); |
| 307 info->allow_reload = Manifest::IsUnpackedLocation(item.location()); | 322 info->allow_reload = Manifest::IsUnpackedLocation(item.location()); |
| 308 info->is_unpacked = Manifest::IsUnpackedLocation(item.location()); | 323 info->is_unpacked = Manifest::IsUnpackedLocation(item.location()); |
| 309 info->terminated = service->terminated_extensions()->Contains(item.id()); | 324 info->terminated = service->terminated_extensions()->Contains(item.id()); |
| 310 info->allow_incognito = item.can_be_incognito_enabled(); | 325 info->allow_incognito = item.can_be_incognito_enabled(); |
| 311 | 326 |
| (...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1257 | 1272 |
| 1258 #undef SET_STRING | 1273 #undef SET_STRING |
| 1259 return true; | 1274 return true; |
| 1260 } | 1275 } |
| 1261 | 1276 |
| 1262 DeveloperPrivateGetStringsFunction::~DeveloperPrivateGetStringsFunction() {} | 1277 DeveloperPrivateGetStringsFunction::~DeveloperPrivateGetStringsFunction() {} |
| 1263 | 1278 |
| 1264 } // namespace api | 1279 } // namespace api |
| 1265 | 1280 |
| 1266 } // namespace extensions | 1281 } // namespace extensions |
| OLD | NEW |