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

Side by Side Diff: chrome/browser/net/url_fetcher.h

Issue 552216: This CL makes the TranslationService class send the text to be translated to ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This file contains URLFetcher, a wrapper around URLRequest that handles 5 // This file contains URLFetcher, a wrapper around URLRequest that handles
6 // low-level details like thread safety, ref counting, and incremental buffer 6 // low-level details like thread safety, ref counting, and incremental buffer
7 // reading. This is useful for callers who simply want to get the data from a 7 // reading. This is useful for callers who simply want to get the data from a
8 // URL and don't care about all the nitty-gritty details. 8 // URL and don't care about all the nitty-gritty details.
9 9
10 #ifndef CHROME_BROWSER_NET_URL_FETCHER_H_ 10 #ifndef CHROME_BROWSER_NET_URL_FETCHER_H_
11 #define CHROME_BROWSER_NET_URL_FETCHER_H_ 11 #define CHROME_BROWSER_NET_URL_FETCHER_H_
12 12
13 #include <string>
14
13 #include "base/leak_tracker.h" 15 #include "base/leak_tracker.h"
14 #include "base/message_loop.h" 16 #include "base/message_loop.h"
15 #include "base/ref_counted.h" 17 #include "base/ref_counted.h"
16 18
17 class GURL; 19 class GURL;
18 typedef std::vector<std::string> ResponseCookies; 20 typedef std::vector<std::string> ResponseCookies;
19 class URLFetcher; 21 class URLFetcher;
20 class URLRequestContextGetter; 22 class URLRequestContextGetter;
21 class URLRequestStatus; 23 class URLRequestStatus;
22 24
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // settings. 143 // settings.
142 virtual void Start(); 144 virtual void Start();
143 145
144 // Return the URL that this fetcher is processing. 146 // Return the URL that this fetcher is processing.
145 const GURL& url() const; 147 const GURL& url() const;
146 148
147 protected: 149 protected:
148 // Returns the delegate. 150 // Returns the delegate.
149 Delegate* delegate() const; 151 Delegate* delegate() const;
150 152
153 // Used by tests.
154 const std::string& upload_data() const;
155
151 private: 156 private:
152 class Core; 157 class Core;
153 158
154 scoped_refptr<Core> core_; 159 scoped_refptr<Core> core_;
155 160
156 static Factory* factory_; 161 static Factory* factory_;
157 162
158 base::LeakTracker<URLFetcher> leak_tracker_; 163 base::LeakTracker<URLFetcher> leak_tracker_;
159 164
160 static bool g_interception_enabled; 165 static bool g_interception_enabled;
161 166
162 DISALLOW_EVIL_CONSTRUCTORS(URLFetcher); 167 DISALLOW_EVIL_CONSTRUCTORS(URLFetcher);
163 }; 168 };
164 169
165 #endif // CHROME_BROWSER_NET_URL_FETCHER_H_ 170 #endif // CHROME_BROWSER_NET_URL_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698