| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/extensions_startup.h" | 5 #include "chrome/browser/extensions/extensions_startup.h" |
| 6 | 6 |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 if (!cmd_line.HasSwitch(switches::kUninstallExtension)) | 73 if (!cmd_line.HasSwitch(switches::kUninstallExtension)) |
| 74 return false; | 74 return false; |
| 75 | 75 |
| 76 ExtensionService* extension_service = profile->GetExtensionService(); | 76 ExtensionService* extension_service = profile->GetExtensionService(); |
| 77 if (!extension_service) | 77 if (!extension_service) |
| 78 return false; | 78 return false; |
| 79 | 79 |
| 80 std::string extension_id = cmd_line.GetSwitchValueASCII( | 80 std::string extension_id = cmd_line.GetSwitchValueASCII( |
| 81 switches::kUninstallExtension); | 81 switches::kUninstallExtension); |
| 82 if (ExtensionService::UninstallExtensionHelper(extension_service, | 82 return ExtensionService::UninstallExtensionHelper(extension_service, |
| 83 extension_id)) { | 83 extension_id); |
| 84 return true; | |
| 85 } | |
| 86 | |
| 87 return false; | |
| 88 } | 84 } |
| 89 | 85 |
| 90 ExtensionsStartupUtil::~ExtensionsStartupUtil() { | 86 ExtensionsStartupUtil::~ExtensionsStartupUtil() { |
| 91 if (pack_job_.get()) | 87 if (pack_job_.get()) |
| 92 pack_job_->ClearClient(); | 88 pack_job_->ClearClient(); |
| 93 } | 89 } |
| OLD | NEW |