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

Unified Diff: content/browser/download/mhtml_generation_manager.h

Issue 9566001: Hide MHTMLGenerationManager from chrome. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/download/mhtml_generation_manager.h
===================================================================
--- content/browser/download/mhtml_generation_manager.h (revision 124331)
+++ content/browser/download/mhtml_generation_manager.h (working copy)
@@ -7,11 +7,9 @@
#include <map>
-#include "base/memory/ref_counted.h"
+#include "base/memory/singleton.h"
#include "base/platform_file.h"
#include "base/process.h"
-#include "content/common/content_export.h"
-#include "content/public/browser/browser_thread.h"
#include "ipc/ipc_platform_file.h"
class FilePath;
@@ -20,12 +18,9 @@
class WebContents;
}
-class CONTENT_EXPORT MHTMLGenerationManager
- : public base::RefCountedThreadSafe<
- MHTMLGenerationManager, content::BrowserThread::DeleteOnUIThread> {
+class MHTMLGenerationManager {
public:
- MHTMLGenerationManager();
- ~MHTMLGenerationManager();
+ static MHTMLGenerationManager* GetInstance();
typedef base::Callback<void(const FilePath& /* path to the MHTML file */,
int64 /* size of the file */)> GenerateMHTMLCallback;
@@ -42,6 +37,8 @@
void MHTMLGenerated(int job_id, int64 mhtml_data_size);
private:
+ friend struct DefaultSingletonTraits<MHTMLGenerationManager>;
+
struct Job{
Job();
~Job();
@@ -61,6 +58,9 @@
GenerateMHTMLCallback callback;
};
+ MHTMLGenerationManager();
+ ~MHTMLGenerationManager();
+
// Called on the file thread to create |file|.
void CreateFile(int job_id,
const FilePath& file,

Powered by Google App Engine
This is Rietveld 408576698