Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(19)

Side by Side Diff: client/ios/BreakpadController.mm

Issue 904002: Add -[BreakpadController resetConfiguration] for iOS. (Closed) Base URL: https://chromium.googlesource.com/external/google-breakpad/src.git@master
Patch Set: Created 11 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « client/ios/BreakpadController.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, Google Inc. 1 // Copyright (c) 2012, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 [NSObject cancelPreviousPerformRequestsWithTarget:self 173 [NSObject cancelPreviousPerformRequestsWithTarget:self
174 selector:@selector(sendStoredCrashReports) 174 selector:@selector(sendStoredCrashReports)
175 object:nil]; 175 object:nil];
176 } 176 }
177 }); 177 });
178 } 178 }
179 179
180 - (void)updateConfiguration:(NSDictionary*)configuration { 180 - (void)updateConfiguration:(NSDictionary*)configuration {
181 NSAssert(!started_, 181 NSAssert(!started_,
182 @"The controller must not be started when updateConfiguration is called"); 182 @"The controller must not be started when updateConfiguration is called");
183 [configuration_ addEntriesFromDictionary:configuration]; 183 [configuration_ addEntriesFromDictionary:configuration];
blundell 2013/12/12 14:27:22 I didn't find any documentation about the behavior
184 NSString* uploadInterval = 184 NSString* uploadInterval =
185 [configuration_ valueForKey:@BREAKPAD_REPORT_INTERVAL]; 185 [configuration_ valueForKey:@BREAKPAD_REPORT_INTERVAL];
186 if (uploadInterval) 186 if (uploadInterval)
187 [self setUploadInterval:[uploadInterval intValue]]; 187 [self setUploadInterval:[uploadInterval intValue]];
188 } 188 }
189 189
190 - (void)resetConfiguration {
191 NSAssert(!started_,
192 @"The controller must not be started when resetConfiguration is called");
193 [configuration_ autorelease];
194 configuration_ = [[[NSBundle mainBundle] infoDictionary] mutableCopy];
195 [self updateConfiguration:nil];
blundell 2013/12/12 14:27:22 If your goal is to have the state of the configura
kiyun 2013/12/12 14:33:40 I see. The difference is when the bundle sets the
blundell 2013/12/12 14:37:32 Yep. Note that a value of 0 prevents uploads, so a
196 }
197
190 - (void)setUploadingURL:(NSString*)url { 198 - (void)setUploadingURL:(NSString*)url {
191 NSAssert(!started_, 199 NSAssert(!started_,
192 @"The controller must not be started when setUploadingURL is called"); 200 @"The controller must not be started when setUploadingURL is called");
193 [configuration_ setValue:url forKey:@BREAKPAD_URL]; 201 [configuration_ setValue:url forKey:@BREAKPAD_URL];
194 } 202 }
195 203
196 - (void)setUploadInterval:(int)intervalInSeconds { 204 - (void)setUploadInterval:(int)intervalInSeconds {
197 NSAssert(!started_, 205 NSAssert(!started_,
198 @"The controller must not be started when setUploadInterval is called"); 206 @"The controller must not be started when setUploadInterval is called");
199 [configuration_ removeObjectForKey:@BREAKPAD_REPORT_INTERVAL]; 207 [configuration_ removeObjectForKey:@BREAKPAD_REPORT_INTERVAL];
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 301
294 // A report must be sent later. 302 // A report must be sent later.
295 if (timeToWait > 0) 303 if (timeToWait > 0)
296 [self performSelector:@selector(sendStoredCrashReports) 304 [self performSelector:@selector(sendStoredCrashReports)
297 withObject:nil 305 withObject:nil
298 afterDelay:timeToWait]; 306 afterDelay:timeToWait];
299 }); 307 });
300 } 308 }
301 309
302 @end 310 @end
OLDNEW
« no previous file with comments | « client/ios/BreakpadController.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1004:630ec63f810e-tainted