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

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

Issue 5703004: Fix extension packer command-line code for Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed mento's comments and fixed win compile error. Created 10 years 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_PACK_EXTENSION_JOB_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_PACK_EXTENSION_JOB_H_
6 #define CHROME_BROWSER_EXTENSIONS_PACK_EXTENSION_JOB_H_ 6 #define CHROME_BROWSER_EXTENSIONS_PACK_EXTENSION_JOB_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 15 matching lines...) Expand all
26 virtual void OnPackFailure(const std::string& message) = 0; 26 virtual void OnPackFailure(const std::string& message) = 0;
27 27
28 protected: 28 protected:
29 virtual ~Client() {} 29 virtual ~Client() {}
30 }; 30 };
31 31
32 PackExtensionJob(Client* client, 32 PackExtensionJob(Client* client,
33 const FilePath& root_directory, 33 const FilePath& root_directory,
34 const FilePath& key_file); 34 const FilePath& key_file);
35 35
36 // Starts the packing thread job. See http://crbug.com/27944 for more details 36 // Starts the packing job.
37 // on why this function is needed.
38 void Start(); 37 void Start();
39 38
40 // The client should call this when it is destroyed to prevent 39 // The client should call this when it is destroyed to prevent
41 // PackExtensionJob from attempting to access it. 40 // PackExtensionJob from attempting to access it.
42 void ClearClient(); 41 void ClearClient();
43 42
44 // The standard packing success message. 43 // The standard packing success message.
45 static std::wstring StandardSuccessMessage(const FilePath& crx_file, 44 static std::wstring StandardSuccessMessage(const FilePath& crx_file,
46 const FilePath& key_file); 45 const FilePath& key_file);
47 46
47 void set_asynchronous(bool async) { asynchronous_ = async; }
48 bool asynchronous() { return asynchronous_; }
Mark Mentovai 2010/12/13 22:11:57 Should be bool asynchronous() const { return asy
49
48 private: 50 private:
49 friend class base::RefCountedThreadSafe<PackExtensionJob>; 51 friend class base::RefCountedThreadSafe<PackExtensionJob>;
50 52
51 virtual ~PackExtensionJob(); 53 virtual ~PackExtensionJob();
52 54
53 void RunOnFileThread(); 55 // If |asynchronous_| is false, this is run on whichever thread calls it.
56 void Run();
54 void ReportSuccessOnClientThread(); 57 void ReportSuccessOnClientThread();
55 void ReportFailureOnClientThread(const std::string& error); 58 void ReportFailureOnClientThread(const std::string& error);
56 59
57 BrowserThread::ID client_thread_id_; 60 BrowserThread::ID client_thread_id_;
58 Client* client_; 61 Client* client_;
59 FilePath root_directory_; 62 FilePath root_directory_;
60 FilePath key_file_; 63 FilePath key_file_;
61 FilePath crx_file_out_; 64 FilePath crx_file_out_;
62 FilePath key_file_out_; 65 FilePath key_file_out_;
66 bool asynchronous_;
63 67
64 DISALLOW_COPY_AND_ASSIGN(PackExtensionJob); 68 DISALLOW_COPY_AND_ASSIGN(PackExtensionJob);
65 }; 69 };
66 70
67 #endif // CHROME_BROWSER_EXTENSIONS_PACK_EXTENSION_JOB_H_ 71 #endif // CHROME_BROWSER_EXTENSIONS_PACK_EXTENSION_JOB_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extensions_startup.cc ('k') | chrome/browser/extensions/pack_extension_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698