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_THROTTLE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_MERGE_SESSION_THROTTLE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_MERGE_SESSION_THROTTLE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_MERGE_SESSION_THROTTLE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/atomic_ref_count.h" | 10 #include "base/atomic_ref_count.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 public: | 33 public: |
34 // Passed a boolean indicating whether or not it is OK to proceed with the | 34 // Passed a boolean indicating whether or not it is OK to proceed with the |
35 // page load. | 35 // page load. |
36 typedef base::Closure CompletionCallback; | 36 typedef base::Closure CompletionCallback; |
37 | 37 |
38 explicit MergeSessionThrottle(net::URLRequest* request, | 38 explicit MergeSessionThrottle(net::URLRequest* request, |
39 content::ResourceType resource_type); | 39 content::ResourceType resource_type); |
40 virtual ~MergeSessionThrottle(); | 40 virtual ~MergeSessionThrottle(); |
41 | 41 |
42 // content::ResourceThrottle implementation: | 42 // content::ResourceThrottle implementation: |
43 virtual void WillStartRequest(bool* defer) OVERRIDE; | 43 virtual void WillStartRequest(bool* defer) override; |
44 virtual const char* GetNameForLogging() const OVERRIDE; | 44 virtual const char* GetNameForLogging() const override; |
45 | 45 |
46 // Checks if session is already merged. | 46 // Checks if session is already merged. |
47 static bool AreAllSessionMergedAlready(); | 47 static bool AreAllSessionMergedAlready(); |
48 | 48 |
49 private: | 49 private: |
50 | 50 |
51 // MergeSessionLoadPage callback. | 51 // MergeSessionLoadPage callback. |
52 void OnBlockingPageComplete(); | 52 void OnBlockingPageComplete(); |
53 | 53 |
54 // Erase the state associated with a deferred load request. | 54 // Erase the state associated with a deferred load request. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // encountered profiles. This is used to determine if a throttle should | 87 // encountered profiles. This is used to determine if a throttle should |
88 // even be even added to new requests. Value of 0 (initial) means that we | 88 // even be even added to new requests. Value of 0 (initial) means that we |
89 // probably have some profiles to restore, while 1 means that all known | 89 // probably have some profiles to restore, while 1 means that all known |
90 // profiles are restored. | 90 // profiles are restored. |
91 static base::AtomicRefCount all_profiles_restored_; | 91 static base::AtomicRefCount all_profiles_restored_; |
92 | 92 |
93 DISALLOW_COPY_AND_ASSIGN(MergeSessionThrottle); | 93 DISALLOW_COPY_AND_ASSIGN(MergeSessionThrottle); |
94 }; | 94 }; |
95 | 95 |
96 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_MERGE_SESSION_THROTTLE_H_ | 96 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_MERGE_SESSION_THROTTLE_H_ |
OLD | NEW |