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

Side by Side Diff: ios/chrome/browser/crash_report/crash_report_multi_parameter.mm

Issue 2503883002: [ObjC ARC] Converts ios/chrome/browser/crash_report to ARC (Closed)
Patch Set: Created 4 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 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 #import "ios/chrome/browser/crash_report/crash_report_multi_parameter.h" 5 #import "ios/chrome/browser/crash_report/crash_report_multi_parameter.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #import "base/mac/scoped_nsobject.h" 11 #import "base/mac/scoped_nsobject.h"
12 #include "base/strings/sys_string_conversions.h" 12 #include "base/strings/sys_string_conversions.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #import "ios/chrome/browser/crash_report/breakpad_helper.h" 14 #import "ios/chrome/browser/crash_report/breakpad_helper.h"
15 15
16 #if !defined(__has_feature) || !__has_feature(objc_arc)
17 #error "This file requires ARC support."
18 #endif
19
16 namespace { 20 namespace {
17 // Maximum size of a breakpad parameter. The length of the dictionary serialized 21 // Maximum size of a breakpad parameter. The length of the dictionary serialized
18 // into JSON cannot exceed this length. See declaration in (BreakPad.h) for 22 // into JSON cannot exceed this length. See declaration in (BreakPad.h) for
19 // details. 23 // details.
20 const int kMaximumBreakpadValueSize = 255; 24 const int kMaximumBreakpadValueSize = 255;
21 } 25 }
22 26
23 @implementation CrashReportMultiParameter { 27 @implementation CrashReportMultiParameter {
24 base::scoped_nsobject<NSString> crashReportKey_; 28 base::scoped_nsobject<NSString> crashReportKey_;
25 std::unique_ptr<base::DictionaryValue> dictionary_; 29 std::unique_ptr<base::DictionaryValue> dictionary_;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 return; 85 return;
82 } 86 }
83 breakpad_helper::AddReportParameter( 87 breakpad_helper::AddReportParameter(
84 crashReportKey_, 88 crashReportKey_,
85 [NSString stringWithCString:stateAsJson.c_str() 89 [NSString stringWithCString:stateAsJson.c_str()
86 encoding:[NSString defaultCStringEncoding]], 90 encoding:[NSString defaultCStringEncoding]],
87 true); 91 true);
88 } 92 }
89 93
90 @end 94 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698