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

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

Issue 3407008: [Chrome OS] Infrastucture for doing offline/online login simultaneously (Closed)
Patch Set: re-upload (again) due to 500s Created 10 years, 3 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) 2010 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_MOCK_URL_FETCHERS_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_URL_FETCHERS_H_
7 #pragma once
8
9 #include "base/message_loop.h"
10 #include "chrome/browser/chrome_thread.h"
11 #include "chrome/common/net/url_fetcher.h"
12 #include "googleurl/src/gurl.h"
13 #include "net/url_request/url_request_status.h"
14
15 namespace chromeos {
16
17 // Simulates a URL fetch by posting a delayed task. This fetch expects to be
18 // canceled, and fails the test if it is not
19 class ExpectCanceledFetcher : public URLFetcher {
20 public:
21 ExpectCanceledFetcher(bool success,
22 const GURL& url,
23 const std::string& results,
24 URLFetcher::RequestType request_type,
25 URLFetcher::Delegate* d);
26 virtual ~ExpectCanceledFetcher();
27
28 void Start();
29
30 static void CompleteFetch();
31
32 private:
33 CancelableTask* task_;
34
35 DISALLOW_COPY_AND_ASSIGN(ExpectCanceledFetcher);
36 };
37
38 class GotCanceledFetcher : public URLFetcher {
39 public:
40 GotCanceledFetcher(bool success,
41 const GURL& url,
42 const std::string& results,
43 URLFetcher::RequestType request_type,
44 URLFetcher::Delegate* d);
45 virtual ~GotCanceledFetcher();
46
47 void Start();
48
49 private:
50 GURL url_;
51
52 DISALLOW_COPY_AND_ASSIGN(GotCanceledFetcher);
53 };
54
55 } // namespace chromeos
56
57 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_URL_FETCHERS_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/mock_auth_attempt_state_resolver.h ('k') | chrome/browser/chromeos/login/mock_url_fetchers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698