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

Side by Side Diff: chrome/browser/chromeos/drive/test_servers/http_response.h

Issue 11088073: HTTP server for testing Google Drive. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed for clang. Created 8 years, 1 month 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) 2012 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_DRIVE_TEST_SERVERS_HTTP_RESPONSE_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_TEST_SERVERS_HTTP_RESPONSE_H_
7
8 #include <string>
9 #include <map>
10 #include "base/basictypes.h"
11
12 namespace drive {
13 namespace test_servers {
14
15 enum ResponseCode {
16 SUCCESS = 200,
17 MOVED = 301,
18 NOT_FOUND = 404,
19 ACCESS_DENIED = 500,
20 };
21
22 // Wraps the HTTP response. Since it can be big, it may be better to use
satorux1 2012/11/12 06:07:00 Wraps -> Represents ?
mtomasz 2012/11/12 12:17:44 Done.
23 // scoped_ptr to pass it instead of copying.
24 class HttpResponse {
satorux1 2012/11/12 06:07:00 class -> struct
mtomasz 2012/11/12 12:17:44 Done.
25 public:
26 HttpResponse();
27 virtual ~HttpResponse();
28
29 ResponseCode code;
30 std::string content;
31 std::string content_type;
32 std::map<std::string, std::string> custom_headers;
33
34 // Generates and returns a http response string.
35 virtual std::string ToResponseString() const;
satorux1 2012/11/12 06:07:00 why virtual?
mtomasz 2012/11/12 12:17:44 Done.
36 };
37
38 } // namespace test_servers
39 } // namespace drive
40
41 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_TEST_SERVERS_HTTP_RESPONSE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698