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

Side by Side Diff: chrome/browser/renderer_host/should_ignore_navigation_resource_throttle.h

Issue 10310124: Implement a ResourceThrottle for URL overriding in Chrome on Android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_RENDERER_HOST_SHOULD_IGNORE_NAVIGATION_RESOURCE_THROTTLE_ H_
6 #define CHROME_BROWSER_RENDERER_HOST_SHOULD_IGNORE_NAVIGATION_RESOURCE_THROTTLE_ H_
7 #pragma once
8
9 #include <string>
10
11 #include "base/memory/weak_ptr.h"
12 #include "content/public/browser/resource_throttle.h"
13
14 namespace net {
15 class URLRequest;
16 } // namespace net
17
18 class ShouldIgnoreNavigationResourceThrottle
joth 2012/05/11 15:34:13 class comment
mkosiba (inactive) 2012/05/15 14:20:23 Done.
19 : public content::ResourceThrottle,
20 public base::SupportsWeakPtr<ShouldIgnoreNavigationResourceThrottle> {
joth 2012/05/11 15:34:13 nit: as WeakPtr is only used as an internal impl d
mkosiba (inactive) 2012/05/15 14:20:23 Done.
21 public:
22 explicit ShouldIgnoreNavigationResourceThrottle(net::URLRequest* request);
23 virtual ~ShouldIgnoreNavigationResourceThrottle();
24
25 // content::ResourceThrottle implementation:
26 virtual void WillStartRequest(bool* defer) OVERRIDE;
27 virtual void WillRedirectRequest(const GURL& new_url, bool* defer) OVERRIDE;
28
29 private:
30 void ShouldDeferRequest(const GURL& url, bool* defer);
31 void OnResultObtained(bool should_ignore_navigation);
32
33 net::URLRequest* request_;
34
35 DISALLOW_COPY_AND_ASSIGN(ShouldIgnoreNavigationResourceThrottle);
36 };
37
38 #endif // CHROME_BROWSER_RENDERER_HOST_SHOULD_IGNORE_NAVIGATION_RESOURCE_THROTT LE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698