| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/common/app_group/app_group_metrics_client.h" | 5 #include "ios/chrome/common/app_group/app_group_metrics_client.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
| 9 #include "ios/chrome/common/app_group/app_group_constants.h" | 9 #include "ios/chrome/common/app_group/app_group_constants.h" |
| 10 #include "ios/chrome/common/app_group/app_group_metrics.h" | 10 #include "ios/chrome/common/app_group/app_group_metrics.h" |
| 11 | 11 |
| 12 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 13 #error "This file requires ARC support." |
| 14 #endif |
| 15 |
| 12 namespace { | 16 namespace { |
| 13 | 17 |
| 14 // Number of log files to keep in the |kPendingLogFileDirectory|. Any older file | 18 // Number of log files to keep in the |kPendingLogFileDirectory|. Any older file |
| 15 // may be deleted. | 19 // may be deleted. |
| 16 const int kMaxFileNumber = 100; | 20 const int kMaxFileNumber = 100; |
| 17 | 21 |
| 18 } // namespace | 22 } // namespace |
| 19 | 23 |
| 20 namespace app_group { | 24 namespace app_group { |
| 21 namespace client_app { | 25 namespace client_app { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 NSString* path = | 98 NSString* path = |
| 95 [[sorted_files objectAtIndex:file_index] objectForKey:@"path"]; | 99 [[sorted_files objectAtIndex:file_index] objectForKey:@"path"]; |
| 96 NSURL* file_url = | 100 NSURL* file_url = |
| 97 [log_dir_url URLByAppendingPathComponent:path isDirectory:NO]; | 101 [log_dir_url URLByAppendingPathComponent:path isDirectory:NO]; |
| 98 [file_manager removeItemAtURL:file_url error:nil]; | 102 [file_manager removeItemAtURL:file_url error:nil]; |
| 99 } | 103 } |
| 100 } | 104 } |
| 101 | 105 |
| 102 } // namespace client_app | 106 } // namespace client_app |
| 103 } // namespace app_group | 107 } // namespace app_group |
| OLD | NEW |