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

Side by Side Diff: components/translate/core/browser/translate_url_fetcher.h

Issue 378253002: Fix translate namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing android build errors Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_URL_FETCHER_H_ 5 #ifndef COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_URL_FETCHER_H_
6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_URL_FETCHER_H_ 6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_URL_FETCHER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "net/url_request/url_fetcher_delegate.h" 10 #include "net/url_request/url_fetcher_delegate.h"
11 #include "url/gurl.h" 11 #include "url/gurl.h"
12 12
13 namespace translate {
14
13 // Downloads raw Translate data such as the Translate script and the language 15 // Downloads raw Translate data such as the Translate script and the language
14 // list. 16 // list.
15 class TranslateURLFetcher : public net::URLFetcherDelegate { 17 class TranslateURLFetcher : public net::URLFetcherDelegate {
16 public: 18 public:
17 // Callback type for Request(). 19 // Callback type for Request().
18 typedef base::Callback<void(int, bool, const std::string&)> Callback; 20 typedef base::Callback<void(int, bool, const std::string&)> Callback;
19 21
20 // Represents internal state if the fetch is completed successfully. 22 // Represents internal state if the fetch is completed successfully.
21 enum State { 23 enum State {
22 IDLE, // No fetch request was issued. 24 IDLE, // No fetch request was issued.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 78
77 // Max number how many times to retry on the server error 79 // Max number how many times to retry on the server error
78 int max_retry_on_5xx_; 80 int max_retry_on_5xx_;
79 81
80 // An extra HTTP request header 82 // An extra HTTP request header
81 std::string extra_request_header_; 83 std::string extra_request_header_;
82 84
83 DISALLOW_COPY_AND_ASSIGN(TranslateURLFetcher); 85 DISALLOW_COPY_AND_ASSIGN(TranslateURLFetcher);
84 }; 86 };
85 87
88 } // namespace translate
89
86 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_URL_FETCHER_H_ 90 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_URL_FETCHER_H_
OLDNEW
« no previous file with comments | « components/translate/core/browser/translate_ui_delegate.cc ('k') | components/translate/core/browser/translate_url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698