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

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

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 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSIONS_STARTUP_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_STARTUP_HELPER_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSIONS_STARTUP_H_ 6 #define CHROME_BROWSER_EXTENSIONS_STARTUP_HELPER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "chrome/browser/extensions/pack_extension_job.h" 9 #include "chrome/browser/extensions/pack_extension_job.h"
10 10
11 class CommandLine; 11 class CommandLine;
12 class Profile; 12 class Profile;
13 13
14 namespace extensions {
15
14 // Initialization helpers for various Extension startup actions. 16 // Initialization helpers for various Extension startup actions.
15 class ExtensionsStartupUtil : public PackExtensionJob::Client { 17 class StartupHelper : public PackExtensionJob::Client {
16 public: 18 public:
17 ExtensionsStartupUtil(); 19 StartupHelper();
18 virtual ~ExtensionsStartupUtil(); 20 virtual ~StartupHelper();
19 21
20 virtual void OnPackSuccess(const FilePath& crx_path, 22 virtual void OnPackSuccess(const FilePath& crx_path,
21 const FilePath& output_private_key_path) OVERRIDE; 23 const FilePath& output_private_key_path) OVERRIDE;
22 virtual void OnPackFailure( 24 virtual void OnPackFailure(const std::string& error_message,
23 const std::string& error_message, 25 ExtensionCreator::ErrorType type) OVERRIDE;
24 extensions::ExtensionCreator::ErrorType type) OVERRIDE;
25 26
26 // Handle --pack-extension flag from the |cmd_line| by packing the specified 27 // Handle --pack-extension flag from the |cmd_line| by packing the specified
27 // extension. Returns false if the pack job failed. 28 // extension. Returns false if the pack job failed.
28 bool PackExtension(const CommandLine& cmd_line); 29 bool PackExtension(const CommandLine& cmd_line);
29 30
30 // Handle --uninstall-extension flag from the |cmd_line| by uninstalling the 31 // Handle --uninstall-extension flag from the |cmd_line| by uninstalling the
31 // specified extension from |profile|. Returns false if the uninstall job 32 // specified extension from |profile|. Returns false if the uninstall job
32 // could not be started. 33 // could not be started.
33 bool UninstallExtension(const CommandLine& cmd_line, Profile* profile); 34 bool UninstallExtension(const CommandLine& cmd_line, Profile* profile);
34 35
35 private: 36 private:
36 scoped_refptr<PackExtensionJob> pack_job_; 37 scoped_refptr<PackExtensionJob> pack_job_;
37 bool pack_job_succeeded_; 38 bool pack_job_succeeded_;
38 39
39 DISALLOW_COPY_AND_ASSIGN(ExtensionsStartupUtil); 40 DISALLOW_COPY_AND_ASSIGN(StartupHelper);
40 }; 41 };
41 42
42 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_STARTUP_H_ 43 } // namespace extensions
44
45 #endif // CHROME_BROWSER_EXTENSIONS_STARTUP_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/shell_window_registry.cc ('k') | chrome/browser/extensions/startup_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698