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

Side by Side Diff: chrome/browser/prerender/prerender_resource_throttle.h

Issue 425653002: content: ResourceType cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PRERENDER_PRERENDER_RESOURCE_THROTTLE_H_ 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_RESOURCE_THROTTLE_H_
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_RESOURCE_THROTTLE_H_ 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_RESOURCE_THROTTLE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 static void OverridePrerenderContentsForTesting(PrerenderContents* contents); 42 static void OverridePrerenderContentsForTesting(PrerenderContents* contents);
43 43
44 private: 44 private:
45 // Helper method to cancel the request. May only be called if currently 45 // Helper method to cancel the request. May only be called if currently
46 // throttling the resource. 46 // throttling the resource.
47 void Cancel(); 47 void Cancel();
48 48
49 static void WillStartRequestOnUI( 49 static void WillStartRequestOnUI(
50 const base::WeakPtr<PrerenderResourceThrottle>& throttle, 50 const base::WeakPtr<PrerenderResourceThrottle>& throttle,
51 const std::string& method, 51 const std::string& method,
52 content::ResourceType::Type resource_type, 52 content::ResourceType resource_type,
53 int render_process_id, 53 int render_process_id,
54 int render_frame_id, 54 int render_frame_id,
55 const GURL& url); 55 const GURL& url);
56 56
57 static void WillRedirectRequestOnUI( 57 static void WillRedirectRequestOnUI(
58 const base::WeakPtr<PrerenderResourceThrottle>& throttle, 58 const base::WeakPtr<PrerenderResourceThrottle>& throttle,
59 const std::string& follow_only_when_prerender_shown_header, 59 const std::string& follow_only_when_prerender_shown_header,
60 content::ResourceType::Type resource_type, 60 content::ResourceType resource_type,
61 bool async, 61 bool async,
62 int render_process_id, 62 int render_process_id,
63 int render_frame_id, 63 int render_frame_id,
64 const GURL& new_url); 64 const GURL& new_url);
65 65
66 // Helper to return the PrerenderContents given a render frame id. May return 66 // Helper to return the PrerenderContents given a render frame id. May return
67 // NULL if it's gone. 67 // NULL if it's gone.
68 static PrerenderContents* PrerenderContentsFromRenderFrame( 68 static PrerenderContents* PrerenderContentsFromRenderFrame(
69 int render_process_id, int render_frame_id); 69 int render_process_id, int render_frame_id);
70 70
71 net::URLRequest* request_; 71 net::URLRequest* request_;
72 72
73 DISALLOW_COPY_AND_ASSIGN(PrerenderResourceThrottle); 73 DISALLOW_COPY_AND_ASSIGN(PrerenderResourceThrottle);
74 }; 74 };
75 75
76 } // namespace prerender 76 } // namespace prerender
77 77
78 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_RESOURCE_THROTTLE_H_ 78 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_RESOURCE_THROTTLE_H_
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_pending_swap_throttle.cc ('k') | chrome/browser/prerender/prerender_resource_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698