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

Unified Diff: chrome/browser/extensions/startup_helper.cc

Issue 10824204: Move small c/b/extensions classes into extensions namespace no.2 (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for cq + nitfix Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/startup_helper.h ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/startup_helper.cc
diff --git a/chrome/browser/extensions/extensions_startup.cc b/chrome/browser/extensions/startup_helper.cc
similarity index 73%
rename from chrome/browser/extensions/extensions_startup.cc
rename to chrome/browser/extensions/startup_helper.cc
index cd11840f73b394350878e2a49af308d0bb04ba44..2b74c7e25193df55afb449f2279cb23f093c6351 100644
--- a/chrome/browser/extensions/extensions_startup.cc
+++ b/chrome/browser/extensions/startup_helper.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/extensions/extensions_startup.h"
+#include "chrome/browser/extensions/startup_helper.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
@@ -12,11 +12,12 @@
#include "chrome/browser/ui/simple_message_box.h"
#include "chrome/common/chrome_switches.h"
-ExtensionsStartupUtil::ExtensionsStartupUtil() : pack_job_succeeded_(false) {}
+namespace extensions {
-void ExtensionsStartupUtil::OnPackSuccess(
- const FilePath& crx_path,
- const FilePath& output_private_key_path) {
+StartupHelper::StartupHelper() : pack_job_succeeded_(false) {}
+
+void StartupHelper::OnPackSuccess(const FilePath& crx_path,
+ const FilePath& output_private_key_path) {
pack_job_succeeded_ = true;
chrome::ShowMessageBox(NULL, ASCIIToUTF16("Extension Packaging Success"),
PackExtensionJob::StandardSuccessMessage(crx_path,
@@ -24,14 +25,13 @@ void ExtensionsStartupUtil::OnPackSuccess(
chrome::MESSAGE_BOX_TYPE_INFORMATION);
}
-void ExtensionsStartupUtil::OnPackFailure(
- const std::string& error_message,
- extensions::ExtensionCreator::ErrorType type) {
+void StartupHelper::OnPackFailure(const std::string& error_message,
+ ExtensionCreator::ErrorType type) {
chrome::ShowMessageBox(NULL, ASCIIToUTF16("Extension Packaging Error"),
UTF8ToUTF16(error_message), chrome::MESSAGE_BOX_TYPE_WARNING);
}
-bool ExtensionsStartupUtil::PackExtension(const CommandLine& cmd_line) {
+bool StartupHelper::PackExtension(const CommandLine& cmd_line) {
if (!cmd_line.HasSwitch(switches::kPackExtension))
return false;
@@ -45,15 +45,15 @@ bool ExtensionsStartupUtil::PackExtension(const CommandLine& cmd_line) {
// Launch a job to perform the packing on the file thread. Ignore warnings
// from the packing process. (e.g. Overwrite any existing crx file.)
pack_job_ = new PackExtensionJob(this, src_dir, private_key_path,
- extensions::ExtensionCreator::kOverwriteCRX);
+ ExtensionCreator::kOverwriteCRX);
pack_job_->set_asynchronous(false);
pack_job_->Start();
return pack_job_succeeded_;
}
-bool ExtensionsStartupUtil::UninstallExtension(const CommandLine& cmd_line,
- Profile* profile) {
+bool StartupHelper::UninstallExtension(const CommandLine& cmd_line,
+ Profile* profile) {
DCHECK(profile);
if (!cmd_line.HasSwitch(switches::kUninstallExtension))
@@ -69,7 +69,9 @@ bool ExtensionsStartupUtil::UninstallExtension(const CommandLine& cmd_line,
extension_id);
}
-ExtensionsStartupUtil::~ExtensionsStartupUtil() {
+StartupHelper::~StartupHelper() {
if (pack_job_.get())
pack_job_->ClearClient();
}
+
+} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/startup_helper.h ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698