 7065093869
			
		
	
	
	
	
	7065093869* feat: add will-redirect to allow people to prevent 30X redirects * spec: add tests for the will-redirect event * refactor: implement will-redirect using NavigationThrottle instead of PostTask This avoids a potential race condition and immediately cancels the navigation * docs: add docs for did-redirect-navigation * refactor: move AtomNavigationThrottle out of net folder * refactor: update header guard for atom_navigation_throttle.h * refactor: fix chromium style errors in the GN build * refactor: update throttle impl to NOTREACHED and std::make_unqique
		
			
				
	
	
		
			27 lines
		
	
	
	
		
			760 B
			
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
	
		
			760 B
			
		
	
	
	
		
			C++
		
	
	
	
	
	
| // Copyright (c) 2018 GitHub, Inc.
 | |
| // Use of this source code is governed by the MIT license that can be
 | |
| // found in the LICENSE file.
 | |
| 
 | |
| #ifndef ATOM_BROWSER_ATOM_NAVIGATION_THROTTLE_H_
 | |
| #define ATOM_BROWSER_ATOM_NAVIGATION_THROTTLE_H_
 | |
| 
 | |
| #include "content/public/browser/navigation_throttle.h"
 | |
| 
 | |
| namespace atom {
 | |
| 
 | |
| class AtomNavigationThrottle : public content::NavigationThrottle {
 | |
|  public:
 | |
|   explicit AtomNavigationThrottle(content::NavigationHandle* handle);
 | |
|   ~AtomNavigationThrottle() override;
 | |
| 
 | |
|   AtomNavigationThrottle::ThrottleCheckResult WillRedirectRequest() override;
 | |
| 
 | |
|   const char* GetNameForLogging() override;
 | |
| 
 | |
|  private:
 | |
|   DISALLOW_COPY_AND_ASSIGN(AtomNavigationThrottle);
 | |
| };
 | |
| 
 | |
| }  // namespace atom
 | |
| 
 | |
| #endif  // ATOM_BROWSER_ATOM_NAVIGATION_THROTTLE_H_
 |