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

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

Issue 9639001: Move download interrupt reasons to content\public (the enum that's used by chrome). The rest keep i… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: nits Created 8 years, 9 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) 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/logging.h" 8 #include "base/logging.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "content/browser/download/interrupt_reasons.h" 11 #include "content/public/browser/download_interrupt_reasons.h"
12 #include "net/base/net_errors.h" 12 #include "net/base/net_errors.h"
13 13
14 namespace download_net_logs { 14 namespace download_net_logs {
15 15
16 namespace { 16 namespace {
17 17
18 static const char* download_type_names[] = { 18 static const char* download_type_names[] = {
19 "NEW_DOWNLOAD", 19 "NEW_DOWNLOAD",
20 "HISTORY_IMPORT", 20 "HISTORY_IMPORT",
21 "SAVE_PAGE_AS" 21 "SAVE_PAGE_AS"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 Value* ItemRenamedParameters::ToValue() const { 128 Value* ItemRenamedParameters::ToValue() const {
129 DictionaryValue* dict = new DictionaryValue(); 129 DictionaryValue* dict = new DictionaryValue();
130 130
131 dict->SetString("old_filename", old_filename_); 131 dict->SetString("old_filename", old_filename_);
132 dict->SetString("new_filename", new_filename_); 132 dict->SetString("new_filename", new_filename_);
133 133
134 return dict; 134 return dict;
135 } 135 }
136 136
137 ItemInterruptedParameters::ItemInterruptedParameters( 137 ItemInterruptedParameters::ItemInterruptedParameters(
138 InterruptReason reason, 138 content::DownloadInterruptReason reason,
139 int64 bytes_so_far, 139 int64 bytes_so_far,
140 const std::string& hash_state) 140 const std::string& hash_state)
141 : reason_(reason), 141 : reason_(reason),
142 bytes_so_far_(bytes_so_far), 142 bytes_so_far_(bytes_so_far),
143 hash_state_(hash_state) { 143 hash_state_(hash_state) {
144 } 144 }
145 145
146 Value* ItemInterruptedParameters::ToValue() const { 146 Value* ItemInterruptedParameters::ToValue() const {
147 DictionaryValue* dict = new DictionaryValue(); 147 DictionaryValue* dict = new DictionaryValue();
148 148
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 Value* FileErrorParameters::ToValue() const { 224 Value* FileErrorParameters::ToValue() const {
225 DictionaryValue* dict = new DictionaryValue(); 225 DictionaryValue* dict = new DictionaryValue();
226 226
227 dict->SetString("operation", operation_); 227 dict->SetString("operation", operation_);
228 dict->SetInteger("net_error", net_error_); 228 dict->SetInteger("net_error", net_error_);
229 229
230 return dict; 230 return dict;
231 } 231 }
232 232
233 } // namespace download_net_logs 233 } // namespace download_net_logs
OLDNEW
« no previous file with comments | « content/browser/download/download_net_log_parameters.h ('k') | content/browser/download/download_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698