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/string_fetcher.h

Issue 3026006: Fixed problems with initial locale change freezing Chrome OS on the device.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 5 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
Property Changes:
Added: svn:eol-style
+ LF
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_STRING_FETCHER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_STRING_FETCHER_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/scoped_ptr.h"
12 #include "chrome/common/net/url_fetcher.h"
13
14 // This class is used to fetch an URL and store result as a string.
15 class StringFetcher : public URLFetcher::Delegate {
16 public:
17 // Initiates URL fetch. Optional auth_token could be passed.
Nikita (slow) 2010/07/19 12:31:19 auth_token is not passed.
18 explicit StringFetcher(const std::string& url);
19 virtual ~StringFetcher() {}
20
21 const std::string& result() const { return result_; }
22 int response_code() const { return response_code_; }
23 bool succeeded() const { return response_code_ == 200; }
24
25 private:
26 // Overriden from URLFetcher::Delegate:
27 virtual void OnURLFetchComplete(const URLFetcher* source,
28 const GURL& url,
29 const URLRequestStatus& status,
30 int response_code,
31 const ResponseCookies& cookies,
32 const std::string& data);
33 // Timer notification handler.
34 void OnTimeoutElapsed();
35
36 // URLFetcher instance.
37 scoped_ptr<URLFetcher> url_fetcher_;
38 // Fetch result.
Nikita (slow) 2010/07/19 12:31:19 empty line between definitions.
39 std::string result_;
40 // Received HTTP response code.
41 int response_code_;
42
43 DISALLOW_COPY_AND_ASSIGN(StringFetcher);
44 };
45
46 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_STRING_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698