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

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: Fix some lint errors. 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.
Mark Mentovai 2010/12/13 20:44:46 fudgey.
Bons 2010/12/13 22:08:27 Done.
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) { async_ = async; }
Mark Mentovai 2010/12/13 20:44:46 If the member is named async_, this should be set_
Bons 2010/12/13 22:08:27 Done.
48
48 private: 49 private:
49 friend class base::RefCountedThreadSafe<PackExtensionJob>; 50 friend class base::RefCountedThreadSafe<PackExtensionJob>;
50 51
51 virtual ~PackExtensionJob(); 52 virtual ~PackExtensionJob();
52 53
53 void RunOnFileThread(); 54 // Depending on the value of |async_|, this could be run on either the client
Mark Mentovai 2010/12/13 20:44:46 This still sounds like it’ll run on one thread or
Bons 2010/12/13 22:08:27 Done.
55 // or file thread.
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 async_;
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

Powered by Google App Engine
This is Rietveld 408576698