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

Side by Side Diff: net/filter/sdch_filter.cc

Issue 1893083002: Change scoped_ptr to std::unique_ptr in //net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-net-all: iwyu Created 4 years, 8 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
« no previous file with comments | « net/filter/sdch_filter.h ('k') | net/filter/sdch_filter_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "net/filter/sdch_filter.h" 5 #include "net/filter/sdch_filter.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 #include <limits.h> 8 #include <limits.h>
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 case RESPONSE_ENCODING_LIE: 82 case RESPONSE_ENCODING_LIE:
83 cause_string = "ENCODING_LIE"; 83 cause_string = "ENCODING_LIE";
84 break; 84 break;
85 case RESPONSE_MAX: 85 case RESPONSE_MAX:
86 cause_string = "<Error: max enum value>"; 86 cause_string = "<Error: max enum value>";
87 break; 87 break;
88 } 88 }
89 return cause_string; 89 return cause_string;
90 } 90 }
91 91
92 scoped_ptr<base::Value> NetLogSdchResponseCorruptionDetectionCallback( 92 std::unique_ptr<base::Value> NetLogSdchResponseCorruptionDetectionCallback(
93 ResponseCorruptionDetectionCause cause, 93 ResponseCorruptionDetectionCause cause,
94 bool cached, 94 bool cached,
95 NetLogCaptureMode capture_mode) { 95 NetLogCaptureMode capture_mode) {
96 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 96 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
97 dict->SetString("cause", ResponseCorruptionDetectionCauseToString(cause)); 97 dict->SetString("cause", ResponseCorruptionDetectionCauseToString(cause));
98 dict->SetBoolean("cached", cached); 98 dict->SetBoolean("cached", cached);
99 return std::move(dict); 99 return std::move(dict);
100 } 100 }
101 101
102 } // namespace 102 } // namespace
103 103
104 SdchFilter::SdchFilter(FilterType type, const FilterContext& filter_context) 104 SdchFilter::SdchFilter(FilterType type, const FilterContext& filter_context)
105 : Filter(type), 105 : Filter(type),
106 filter_context_(filter_context), 106 filter_context_(filter_context),
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 } 559 }
560 560
561 void SdchFilter::LogSdchProblem(SdchProblemCode problem) { 561 void SdchFilter::LogSdchProblem(SdchProblemCode problem) {
562 SdchManager::SdchErrorRecovery(problem); 562 SdchManager::SdchErrorRecovery(problem);
563 filter_context_.GetNetLog().AddEvent( 563 filter_context_.GetNetLog().AddEvent(
564 NetLog::TYPE_SDCH_DECODING_ERROR, 564 NetLog::TYPE_SDCH_DECODING_ERROR,
565 base::Bind(&NetLogSdchResourceProblemCallback, problem)); 565 base::Bind(&NetLogSdchResourceProblemCallback, problem));
566 } 566 }
567 567
568 } // namespace net 568 } // namespace net
OLDNEW
« no previous file with comments | « net/filter/sdch_filter.h ('k') | net/filter/sdch_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698