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

Side by Side Diff: content/browser/download/download_net_log_parameters.cc

Issue 11238044: Refactor BaseFile methods to return a DownloadInterruptReason instead of a net::Error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove SHFILE_TO_REASON macro 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 #include "content/browser/download/download_net_log_parameters.h" 5 #include "content/browser/download/download_net_log_parameters.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 net::Error net_error, 176 net::Error net_error,
177 net::NetLog::LogLevel /* log_level */) { 177 net::NetLog::LogLevel /* log_level */) {
178 DictionaryValue* dict = new DictionaryValue(); 178 DictionaryValue* dict = new DictionaryValue();
179 179
180 dict->SetString("operation", operation); 180 dict->SetString("operation", operation);
181 dict->SetInteger("net_error", net_error); 181 dict->SetInteger("net_error", net_error);
182 182
183 return dict; 183 return dict;
184 } 184 }
185 185
186 base::Value* FileInterruptedCallback(const char* operation,
187 int os_error,
188 content::DownloadInterruptReason reason,
189 net::NetLog::LogLevel /* log_level */) {
190 DictionaryValue* dict = new DictionaryValue();
191
192 dict->SetString("operation", operation);
193 if (os_error != 0)
194 dict->SetInteger("os_error", os_error);
195 dict->SetString("interrupt_reason", InterruptReasonDebugString(reason));
196
197 return dict;
198 }
199
200
186 } // namespace download_net_logs 201 } // namespace download_net_logs
OLDNEW
« no previous file with comments | « content/browser/download/download_net_log_parameters.h ('k') | content/browser/download/save_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698