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

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

Issue 342003005: Show alert failure for reloading unpacked extensions with bad manifest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved path handling back to C++ Created 6 years, 5 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
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/app_window.h" 9 #include "apps/app_window.h"
10 #include "apps/app_window_registry.h" 10 #include "apps/app_window_registry.h"
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 723
724 DeveloperPrivateAllowIncognitoFunction:: 724 DeveloperPrivateAllowIncognitoFunction::
725 ~DeveloperPrivateAllowIncognitoFunction() {} 725 ~DeveloperPrivateAllowIncognitoFunction() {}
726 726
727 bool DeveloperPrivateReloadFunction::RunSync() { 727 bool DeveloperPrivateReloadFunction::RunSync() {
728 scoped_ptr<Reload::Params> params(Reload::Params::Create(*args_)); 728 scoped_ptr<Reload::Params> params(Reload::Params::Create(*args_));
729 EXTENSION_FUNCTION_VALIDATE(params.get()); 729 EXTENSION_FUNCTION_VALIDATE(params.get());
730 730
731 CHECK(!params->item_id.empty()); 731 CHECK(!params->item_id.empty());
732 ExtensionService* service = GetExtensionService(GetProfile()); 732 ExtensionService* service = GetExtensionService(GetProfile());
733 service->ReloadExtension(params->item_id); 733 service->ReloadExtension(params->item_id, true);
734 return true; 734 return true;
735 } 735 }
736 736
737 bool DeveloperPrivateShowPermissionsDialogFunction::RunSync() { 737 bool DeveloperPrivateShowPermissionsDialogFunction::RunSync() {
738 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &extension_id_)); 738 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &extension_id_));
739 CHECK(!extension_id_.empty()); 739 CHECK(!extension_id_.empty());
740 AppWindowRegistry* registry = AppWindowRegistry::Get(GetProfile()); 740 AppWindowRegistry* registry = AppWindowRegistry::Get(GetProfile());
741 DCHECK(registry); 741 DCHECK(registry);
742 AppWindow* app_window = 742 AppWindow* app_window =
743 registry->GetAppWindowForRenderViewHost(render_view_host()); 743 registry->GetAppWindowForRenderViewHost(render_view_host());
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 } 1398 }
1399 1399
1400 error_ui_util::HandleOpenDevTools(dict); 1400 error_ui_util::HandleOpenDevTools(dict);
1401 1401
1402 return true; 1402 return true;
1403 } 1403 }
1404 1404
1405 } // namespace api 1405 } // namespace api
1406 1406
1407 } // namespace extensions 1407 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698