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

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

Issue 12253022: Manifest handler for all keys background-related. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
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/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "chrome/browser/extensions/extension_service.h" 13 #include "chrome/browser/extensions/extension_service.h"
14 #include "chrome/browser/extensions/webstore_standalone_installer.h" 14 #include "chrome/browser/extensions/webstore_standalone_installer.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/common/chrome_switches.h" 16 #include "chrome/common/chrome_switches.h"
17 #include "chrome/common/extensions/api/i18n/default_locale_handler.h" 17 #include "chrome/common/extensions/api/i18n/default_locale_handler.h"
18 #include "chrome/common/extensions/extension.h" 18 #include "chrome/common/extensions/extension.h"
19 #include "chrome/common/extensions/extension_manifest_constants.h"
20 #include "chrome/common/extensions/manifest_handler.h"
21 #include "content/public/browser/web_contents.h" 19 #include "content/public/browser/web_contents.h"
22 #include "ipc/ipc_message.h" 20 #include "ipc/ipc_message.h"
23 21
24 namespace { 22 namespace {
25 23
26 void PrintPackExtensionMessage(const std::string& message) { 24 void PrintPackExtensionMessage(const std::string& message) {
27 printf("%s\n", message.c_str()); 25 printf("%s\n", message.c_str());
28 } 26 }
29 27
30 } // namespace 28 } // namespace
31 29
32 namespace extensions { 30 namespace extensions {
33 31
34 StartupHelper::StartupHelper() : pack_job_succeeded_(false) { 32 StartupHelper::StartupHelper() : pack_job_succeeded_(false) {
35 ManifestHandler::Register(extension_manifest_keys::kDefaultLocale, 33 (new DefaultLocaleHandler)->Register();
36 make_linked_ptr(new DefaultLocaleHandler));
37 } 34 }
38 35
39 void StartupHelper::OnPackSuccess( 36 void StartupHelper::OnPackSuccess(
40 const base::FilePath& crx_path, 37 const base::FilePath& crx_path,
41 const base::FilePath& output_private_key_path) { 38 const base::FilePath& output_private_key_path) {
42 pack_job_succeeded_ = true; 39 pack_job_succeeded_ = true;
43 PrintPackExtensionMessage( 40 PrintPackExtensionMessage(
44 UTF16ToUTF8( 41 UTF16ToUTF8(
45 PackExtensionJob::StandardSuccessMessage(crx_path, 42 PackExtensionJob::StandardSuccessMessage(crx_path,
46 output_private_key_path))); 43 output_private_key_path)));
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 } 213 }
217 return id; 214 return id;
218 } 215 }
219 216
220 StartupHelper::~StartupHelper() { 217 StartupHelper::~StartupHelper() {
221 if (pack_job_.get()) 218 if (pack_job_.get())
222 pack_job_->ClearClient(); 219 pack_job_->ClearClient();
223 } 220 }
224 221
225 } // namespace extensions 222 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698