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

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 <string>
oshima 2013/02/16 00:05:23 nit: this isn't necessary?
zel 2013/02/16 00:56:28 Done.
9
10 #include "base/memory/ref_counted.h"
11 #include "base/memory/weak_ptr.h"
12 #include "chrome/browser/chromeos/login/merge_session_load_page.h"
13 #include "content/public/browser/resource_throttle.h"
14 #include "net/base/completion_callback.h"
15
16 namespace net {
17 class URLRequest;
18 }
19
20 // Used to show an interstitial page while merge session process (cookie
21 // reconstruction from OAuth2 refresh token in ChromeOS login) is still in
22 // progress while we are attempting to load a google property.
23 class MergeSessionThrottle
24 : public content::ResourceThrottle,
25 public base::SupportsWeakPtr<MergeSessionThrottle> {
26 public:
27 MergeSessionThrottle(int render_process_id,
28 int render_view_id,
29 net::URLRequest* request);
30 virtual ~MergeSessionThrottle();
31
32 // content::ResourceThrottle implementation:
33 virtual void WillStartRequest(bool* defer) OVERRIDE;
34
35 private:
36 // MergeSessionLoadPage callback.
37 void OnBlockingPageComplete();
38
39 // Erase the state associated with a deferred load request.
40 void ClearRequestInfo();
41 bool IsRemote(const GURL& url) const;
42
43 // True if we should show the merge session in progress page.
44 bool ShouldShowMergeSessionPage(const GURL& url) const;
45
46 int render_process_id_;
47 int render_view_id_;
48 net::URLRequest* request_;
49
50 DISALLOW_COPY_AND_ASSIGN(MergeSessionThrottle);
51 };
52
53 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MERGE_SESSION_THROTTLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698