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

Unified Diff: chrome/browser/dom_ui/chrome_url_data_manager.h

Issue 179069: Improve New Tab Page load performance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/dom_ui/chrome_url_data_manager.h
===================================================================
--- chrome/browser/dom_ui/chrome_url_data_manager.h (revision 25173)
+++ chrome/browser/dom_ui/chrome_url_data_manager.h (working copy)
@@ -59,7 +59,18 @@
// the request is over.
void SendResponse(int request_id, RefCountedBytes* bytes);
- MessageLoop* message_loop() const { return message_loop_; }
+ // Returns the MessageLoop on which the DataSource wishes to have
+ // StartDataRequest called to handle the request for |path|. If the
+ // DataSource does not care which thread StartDataRequest is called on,
+ // this should return NULL. The default implementation always returns
+ // message_loop_, which generally results in processing on the UI thread.
+ // It may be beneficial to return NULL for requests that are safe to handle
+ // directly on the IO thread. This can improve performance by satisfying
+ // such requests more rapidly when there is a large amount of UI thread
+ // contention.
+ virtual MessageLoop* MessageLoopForRequestPath(const std::string& path)
+ const;
+
const std::string& source_name() const { return source_name_; }
static void SetFontAndTextDirection(DictionaryValue* localized_strings);
« no previous file with comments | « no previous file | chrome/browser/dom_ui/chrome_url_data_manager.cc » ('j') | chrome/browser/dom_ui/chrome_url_data_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698