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

Unified Diff: chrome/utility/font_cache_handler_win.h

Issue 1011023002: Change for building font cache into separate thread inside utility process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed thread name. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/utility/font_cache_handler_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/font_cache_handler_win.h
diff --git a/chrome/utility/font_cache_handler_win.h b/chrome/utility/font_cache_handler_win.h
index 44c63f1af9625b517dddf3e29763f83f5114ca2b..e92ef4a530a502183466a2f596c2453ce96574b5 100644
--- a/chrome/utility/font_cache_handler_win.h
+++ b/chrome/utility/font_cache_handler_win.h
@@ -6,8 +6,15 @@
#define CHROME_UTILITY_FONT_CACHE_HANDLER_WIN_H_
#include "base/files/file_path.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "chrome/utility/utility_message_handler.h"
+namespace base {
+class TaskRunner;
+class Thread;
+}
+
// Handles requests to build a static direct write font cache. Must be invoked
// in a non-sandboxed utility process. We build static font cache in utility
// process as it is time consuming as well as crash prone thing. We already
@@ -24,6 +31,14 @@ class FontCacheHandler : public UtilityMessageHandler {
private:
void OnBuildFontCache(const base::FilePath& full_path);
+ void StartBuildingFontCache(const base::FilePath& full_path);
+ void Cleanup();
+
+ scoped_refptr<base::TaskRunner> utility_task_runner_;
+
+ // Thread that caching process runs on, while FontCacheHandler handles
+ // messages from the browser process.
+ scoped_ptr<base::Thread> cache_thread_;
DISALLOW_COPY_AND_ASSIGN(FontCacheHandler);
};
« no previous file with comments | « no previous file | chrome/utility/font_cache_handler_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698