Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: chrome/browser/extensions/api/developer_private/developer_private_api.cc

Issue 22191003: [Apps Developer Tool] Show installation warnings as chrome://extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update as comments. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/apps_debugger/css/items.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 for (std::vector<extensions::InstallWarning>::const_iterator it =
304 item.install_warnings().begin();
305 it != item.install_warnings().end(); ++it) {
306 developer::InstallWarning* warning = new developer::InstallWarning();
307 warning->is_html = (it->format == InstallWarning::FORMAT_HTML);
308 warning->message = it->message;
309 info->install_warnings.push_back(make_linked_ptr(warning));
310 }
302 } 311 }
303 312
304 info->incognito_enabled = service->IsIncognitoEnabled(item.id()); 313 info->incognito_enabled = service->IsIncognitoEnabled(item.id());
305 info->wants_file_access = item.wants_file_access(); 314 info->wants_file_access = item.wants_file_access();
306 info->allow_file_access = service->AllowFileAccess(&item); 315 info->allow_file_access = service->AllowFileAccess(&item);
307 info->allow_reload = Manifest::IsUnpackedLocation(item.location()); 316 info->allow_reload = Manifest::IsUnpackedLocation(item.location());
308 info->is_unpacked = Manifest::IsUnpackedLocation(item.location()); 317 info->is_unpacked = Manifest::IsUnpackedLocation(item.location());
309 info->terminated = service->terminated_extensions()->Contains(item.id()); 318 info->terminated = service->terminated_extensions()->Contains(item.id());
310 info->allow_incognito = item.can_be_incognito_enabled(); 319 info->allow_incognito = item.can_be_incognito_enabled();
311 320
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 1266
1258 #undef SET_STRING 1267 #undef SET_STRING
1259 return true; 1268 return true;
1260 } 1269 }
1261 1270
1262 DeveloperPrivateGetStringsFunction::~DeveloperPrivateGetStringsFunction() {} 1271 DeveloperPrivateGetStringsFunction::~DeveloperPrivateGetStringsFunction() {}
1263 1272
1264 } // namespace api 1273 } // namespace api
1265 1274
1266 } // namespace extensions 1275 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/apps_debugger/css/items.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698