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

Side by Side Diff: chrome/browser/local_discovery/privet_url_fetcher.h

Issue 1436373002: Fixed OSX crash in net::URLFetcherCore::URLFetcherCore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@context5
Patch Set: Created 5 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_URL_FETCHER_H_ 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_URL_FETCHER_H_
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_URL_FETCHER_H_ 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_URL_FETCHER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 bool OnURLFetchCompleteDoNotParseData(const net::URLFetcher* source); 111 bool OnURLFetchCompleteDoNotParseData(const net::URLFetcher* source);
112 112
113 std::string GetHostString(); // Get string representing the host. 113 std::string GetHostString(); // Get string representing the host.
114 std::string GetPrivetAccessToken(); 114 std::string GetPrivetAccessToken();
115 void Try(); 115 void Try();
116 void ScheduleRetry(int timeout_seconds); 116 void ScheduleRetry(int timeout_seconds);
117 bool PrivetErrorTransient(const std::string& error); 117 bool PrivetErrorTransient(const std::string& error);
118 void RequestTokenRefresh(); 118 void RequestTokenRefresh();
119 void RefreshToken(const std::string& token); 119 void RefreshToken(const std::string& token);
120 120
121 GURL url_; 121 const GURL url_;
122 net::URLFetcher::RequestType request_type_; 122 net::URLFetcher::RequestType request_type_;
123 scoped_refptr<net::URLRequestContextGetter> context_getter_; 123 scoped_refptr<net::URLRequestContextGetter> context_getter_;
124 Delegate* delegate_; 124 Delegate* delegate_;
125 125
126 int max_retries_; 126 int max_retries_;
127 bool do_not_retry_on_transient_error_; 127 bool do_not_retry_on_transient_error_;
128 bool send_empty_privet_token_; 128 bool send_empty_privet_token_;
129 bool has_byte_range_; 129 bool has_byte_range_;
130 bool make_response_file_; 130 bool make_response_file_;
131 bool v3_mode_; 131 bool v3_mode_;
132 132
133 int byte_range_start_; 133 int byte_range_start_;
134 int byte_range_end_; 134 int byte_range_end_;
135 135
136 int tries_; 136 int tries_;
137 std::string upload_data_; 137 std::string upload_data_;
138 std::string upload_content_type_; 138 std::string upload_content_type_;
139 base::FilePath upload_file_path_; 139 base::FilePath upload_file_path_;
140 scoped_ptr<net::URLFetcher> url_fetcher_; 140 scoped_ptr<net::URLFetcher> url_fetcher_;
141 141
142 base::WeakPtrFactory<PrivetURLFetcher> weak_factory_; 142 base::WeakPtrFactory<PrivetURLFetcher> weak_factory_;
143 DISALLOW_COPY_AND_ASSIGN(PrivetURLFetcher); 143 DISALLOW_COPY_AND_ASSIGN(PrivetURLFetcher);
144 }; 144 };
145 145
146 } // namespace local_discovery 146 } // namespace local_discovery
147 147
148 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_URL_FETCHER_H_ 148 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_URL_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698