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

Side by Side Diff: chrome/browser/extensions/startup_helper.cc

Issue 12256041: Fix a bug where extensions created with locale info from the command line is broken. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ManifestHandler in StartupHelper Created 7 years, 10 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 | no next file » | 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/startup_helper.h" 5 #include "chrome/browser/extensions/startup_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "chrome/browser/extensions/extension_service.h" 12 #include "chrome/browser/extensions/extension_service.h"
13 #include "chrome/browser/extensions/webstore_standalone_installer.h" 13 #include "chrome/browser/extensions/webstore_standalone_installer.h"
14 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/common/chrome_switches.h" 15 #include "chrome/common/chrome_switches.h"
16 #include "chrome/common/extensions/api/i18n/default_locale_handler.h"
16 #include "chrome/common/extensions/extension.h" 17 #include "chrome/common/extensions/extension.h"
18 #include "chrome/common/extensions/extension_manifest_constants.h"
19 #include "chrome/common/extensions/manifest_handler.h"
17 #include "content/public/browser/web_contents.h" 20 #include "content/public/browser/web_contents.h"
18 #include "ipc/ipc_message.h" 21 #include "ipc/ipc_message.h"
19 22
20 namespace { 23 namespace {
21 24
22 void PrintPackExtensionMessage(const std::string& message) { 25 void PrintPackExtensionMessage(const std::string& message) {
23 printf("%s\n", message.c_str()); 26 printf("%s\n", message.c_str());
24 } 27 }
25 28
26 } // namespace 29 } // namespace
27 30
28 namespace extensions { 31 namespace extensions {
29 32
30 StartupHelper::StartupHelper() : pack_job_succeeded_(false) {} 33 StartupHelper::StartupHelper() : pack_job_succeeded_(false) {
34 ManifestHandler::Register(extension_manifest_keys::kDefaultLocale,
35 make_linked_ptr(new DefaultLocaleHandler));
36 }
31 37
32 void StartupHelper::OnPackSuccess( 38 void StartupHelper::OnPackSuccess(
33 const base::FilePath& crx_path, 39 const base::FilePath& crx_path,
34 const base::FilePath& output_private_key_path) { 40 const base::FilePath& output_private_key_path) {
35 pack_job_succeeded_ = true; 41 pack_job_succeeded_ = true;
36 PrintPackExtensionMessage( 42 PrintPackExtensionMessage(
37 UTF16ToUTF8( 43 UTF16ToUTF8(
38 PackExtensionJob::StandardSuccessMessage(crx_path, 44 PackExtensionJob::StandardSuccessMessage(crx_path,
39 output_private_key_path))); 45 output_private_key_path)));
40 } 46 }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 LOG(ERROR) << "InstallFromWebstore failed with error: " << helper.error(); 160 LOG(ERROR) << "InstallFromWebstore failed with error: " << helper.error();
155 return helper.success(); 161 return helper.success();
156 } 162 }
157 163
158 StartupHelper::~StartupHelper() { 164 StartupHelper::~StartupHelper() {
159 if (pack_job_.get()) 165 if (pack_job_.get())
160 pack_job_->ClearClient(); 166 pack_job_->ClearClient();
161 } 167 }
162 168
163 } // namespace extensions 169 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698