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

Unified Diff: chrome/browser/shell_integration.h

Issue 2888693003: Remove the usage of BrowserThread::FILE in the shell_integration* files (Closed)
Patch Set: Added a comment and fix typo Created 3 years, 7 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/browser/shell_integration.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/shell_integration.h
diff --git a/chrome/browser/shell_integration.h b/chrome/browser/shell_integration.h
index 7730a029341a1784afa657930d611138218a5a36..e6b1bbb40ce9686c2bd8eca086be712f928eefdc 100644
--- a/chrome/browser/shell_integration.h
+++ b/chrome/browser/shell_integration.h
@@ -18,6 +18,7 @@
namespace base {
class CommandLine;
+class SequencedTaskRunner;
}
namespace shell_integration {
@@ -129,9 +130,9 @@ using DefaultWebClientWorkerCallback =
// Helper objects that handle checking if Chrome is the default browser
// or application for a url protocol on Windows and Linux, and also setting
-// it as the default. These operations are performed asynchronously on the
-// file thread since registry access (on Windows) or the preference database
-// (on Linux) are involved and this can be slow.
+// it as the default. These operations are performed asynchronously on a
+// blocking sequence since registry access (on Windows) or the preference
+// database (on Linux) are involved and this can be slow.
// By default, the worker will present the user with an interactive flow if
// required by the platform. This can be suppressed via
// set_interactive_permitted(), in which case an attempt to set Chrome as
@@ -174,12 +175,18 @@ class DefaultWebClientWorker
bool interactive_permitted_ = true;
private:
- // Checks whether Chrome is the default web client. Always called on the
- // FILE thread. When |is_following_set_as_default| is true, The default state
- // will be reported to UMA as the result of the set-as-default operation.
+ // Returns the global task runner that sequences all the file operations of
+ // each workers.
+ static scoped_refptr<base::SequencedTaskRunner> GetTaskRunner();
+
+ // Checks whether Chrome is the default web client. Always called on a
+ // blocking sequence. When |is_following_set_as_default| is true, The default
+ // state will be reported to UMA as the result of the set-as-default
+ // operation.
void CheckIsDefault(bool is_following_set_as_default);
- // Sets Chrome as the default web client. Always called on the FILE thread.
+ // Sets Chrome as the default web client. Always called on a blocking
+ // sequence.
void SetAsDefault();
// Implementation of CheckIsDefault() and SetAsDefault() for subclasses.
« no previous file with comments | « no previous file | chrome/browser/shell_integration.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698