| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHROMEOS_LOGIN_SIGNIN_MERGE_SESSION_THROTTLING_UTILS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_MERGE_SESSION_THROTTLING_UTILS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_MERGE_SESSION_THROTTLING_UTILS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_MERGE_SESSION_THROTTLING_UTILS_H_ |
| 7 | 7 |
| 8 #include "base/atomic_ref_count.h" | 8 #include "base/atomic_ref_count.h" |
| 9 #include "net/base/completion_callback.h" | 9 #include "net/base/completion_callback.h" |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 using CompletionCallback = base::Closure; | 26 using CompletionCallback = base::Closure; |
| 27 | 27 |
| 28 // Checks if session is already merged. This is safe to call on all threads. | 28 // Checks if session is already merged. This is safe to call on all threads. |
| 29 bool AreAllSessionMergedAlready(); | 29 bool AreAllSessionMergedAlready(); |
| 30 | 30 |
| 31 // Adds/removes |profile| to/from the blocking profiles set. This should be | 31 // Adds/removes |profile| to/from the blocking profiles set. This should be |
| 32 // called on the UI thread. | 32 // called on the UI thread. |
| 33 void BlockProfile(Profile* profile); | 33 void BlockProfile(Profile* profile); |
| 34 void UnblockProfile(Profile* profile); | 34 void UnblockProfile(Profile* profile); |
| 35 | 35 |
| 36 // Whether requests from |web_contents| should currently be delayed. This | 36 // Whether requests from |web_contents| or |profile| should currently be |
| 37 // should be called on the UI thread. | 37 // delayed. This should be called on the UI thread. |
| 38 bool ShouldDelayRequest(Profile* profile); |
| 38 bool ShouldDelayRequest(content::WebContents* web_contents); | 39 bool ShouldDelayRequest(content::WebContents* web_contents); |
| 39 | 40 |
| 40 // True if the load of |url| should be delayed. The function is safe to be | 41 // True if the load of |url| should be delayed. The function is safe to be |
| 41 // called on any thread. | 42 // called on any thread. |
| 42 bool ShouldDelayUrl(const GURL& url); | 43 bool ShouldDelayUrl(const GURL& url); |
| 43 | 44 |
| 44 } // namespace merge_session_throttling_utils | 45 } // namespace merge_session_throttling_utils |
| 45 | 46 |
| 46 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_MERGE_SESSION_THROTTLING_UTILS_H
_ | 47 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_MERGE_SESSION_THROTTLING_UTILS_H
_ |
| OLD | NEW |