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

Side by Side Diff: chrome/browser/chromeos/login/merge_session_throttle.h

Issue 12256046: Added interstitial page for merge session. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
(Empty)
1 // Copyright (c) 2013 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_CHROMEOS_LOGIN_MERGE_SESSION_THROTTLE_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MERGE_SESSION_THROTTLE_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h"
10 #include "chrome/browser/chromeos/login/merge_session_load_page.h"
11 #include "content/public/browser/resource_throttle.h"
12 #include "net/base/completion_callback.h"
13
14 namespace net {
15 class URLRequest;
16 }
17
18 // Used to show an interstitial page while merge session process (cookie
19 // reconstruction from OAuth2 refresh token in ChromeOS login) is still in
20 // progress while we are attempting to load a google property.
21 class MergeSessionThrottle
22 : public content::ResourceThrottle,
23 public base::SupportsWeakPtr<MergeSessionThrottle> {
24 public:
25 MergeSessionThrottle(int render_process_id,
26 int render_view_id,
27 net::URLRequest* request);
28 virtual ~MergeSessionThrottle();
29
30 // content::ResourceThrottle implementation:
31 virtual void WillStartRequest(bool* defer) OVERRIDE;
32
33 private:
34 // MergeSessionLoadPage callback.
35 void OnBlockingPageComplete();
36
37 // Erase the state associated with a deferred load request.
38 void ClearRequestInfo();
39 bool IsRemote(const GURL& url) const;
40
41 // True if we should show the merge session in progress page.
42 bool ShouldShowMergeSessionPage(const GURL& url) const;
43
44 int render_process_id_;
45 int render_view_id_;
46 net::URLRequest* request_;
47
48 DISALLOW_COPY_AND_ASSIGN(MergeSessionThrottle);
49 };
50
51 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MERGE_SESSION_THROTTLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698