OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/common/child_process_logging.h" | 5 #include "chrome/common/child_process_logging.h" |
6 | 6 |
7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
8 | 8 |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
11 #import "chrome/app/breakpad_mac.h" | 11 //#import "chrome/app/breakpad_mac.h" |
12 | 12 |
13 namespace child_process_logging { | 13 namespace child_process_logging { |
14 | 14 |
15 const int kMaxNumCrashURLChunks = 8; | 15 const int kMaxNumCrashURLChunks = 8; |
16 const int kMaxNumURLChunkValueLength = 255; | 16 const int kMaxNumURLChunkValueLength = 255; |
17 const char *kUrlChunkFormatStr = "url-chunk-%d"; | 17 const char *kUrlChunkFormatStr = "url-chunk-%d"; |
18 | 18 |
19 void SetActiveURLImpl(const GURL& url, | 19 void SetActiveURLImpl(const GURL& url, |
20 SetCrashKeyValueFuncPtr set_key_func, | 20 SetCrashKeyValueFuncPtr set_key_func, |
21 ClearCrashKeyValueFuncPtr clear_key_func) { | 21 ClearCrashKeyValueFuncPtr clear_key_func) { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 raw_url_length - start_ofs); | 53 raw_url_length - start_ofs); |
54 NSString *value = [raw_url substringWithRange:range]; | 54 NSString *value = [raw_url substringWithRange:range]; |
55 set_key_func(key, value); | 55 set_key_func(key, value); |
56 | 56 |
57 // Next chunk. | 57 // Next chunk. |
58 start_ofs += kMaxNumURLChunkValueLength; | 58 start_ofs += kMaxNumURLChunkValueLength; |
59 } | 59 } |
60 } | 60 } |
61 | 61 |
62 void SetActiveURL(const GURL& url) { | 62 void SetActiveURL(const GURL& url) { |
| 63 /* |
63 // If Breakpad isn't initialized then bail. | 64 // If Breakpad isn't initialized then bail. |
64 if (IsCrashReporterDisabled()) { | 65 if (IsCrashReporterDisabled()) { |
65 return; | 66 return; |
66 } | 67 } |
67 | 68 |
68 SetActiveURLImpl(url, SetCrashKeyValue, ClearCrashKeyValue); | 69 SetActiveURLImpl(url, SetCrashKeyValue, ClearCrashKeyValue); |
| 70 */ |
69 } | 71 } |
70 | 72 |
71 } // namespace child_process_logging | 73 } // namespace child_process_logging |
OLD | NEW |