summaryrefslogtreecommitdiffstats
path: root/chrome/common/child_process_logging_mac.mm
diff options
context:
space:
mode:
authornsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-08 20:16:38 +0000
committernsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-08 20:16:38 +0000
commitce185864d3ef3d2a3fd40ae93300a5858f961c94 (patch)
treec8a6e9f9fc755f872cdc1f384148296a81bfc501 /chrome/common/child_process_logging_mac.mm
parent09f83fa89c9ab23b5f9623b06f1322850d21a15a (diff)
downloadchromium_src-ce185864d3ef3d2a3fd40ae93300a5858f961c94.zip
chromium_src-ce185864d3ef3d2a3fd40ae93300a5858f961c94.tar.gz
chromium_src-ce185864d3ef3d2a3fd40ae93300a5858f961c94.tar.bz2
Revert change 20173 because it breaks the ui_tests, plugin_tests
and most likely some page cyclers. Review URL: http://codereview.chromium.org/155236 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20180 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/child_process_logging_mac.mm')
-rw-r--r--chrome/common/child_process_logging_mac.mm71
1 files changed, 0 insertions, 71 deletions
diff --git a/chrome/common/child_process_logging_mac.mm b/chrome/common/child_process_logging_mac.mm
deleted file mode 100644
index a05b79d..0000000
--- a/chrome/common/child_process_logging_mac.mm
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/child_process_logging.h"
-
-#import <Foundation/Foundation.h>
-
-#include "base/string_util.h"
-#include "googleurl/src/gurl.h"
-#import "chrome/app/breakpad_mac.h"
-
-namespace child_process_logging {
-
-const int kMaxNumCrashURLChunks = 8;
-const int kMaxNumURLChunkValueLength = 255;
-const char *kUrlChunkFormatStr = "url-chunk-%d";
-
-void SetActiveURLImpl(const GURL& url,
- SetCrashKeyValueFuncPtr set_key_func,
- ClearCrashKeyValueFuncPtr clear_key_func) {
-
- NSString *kUrlChunkFormatStr_utf8 = [NSString
- stringWithUTF8String:kUrlChunkFormatStr];
-
- // First remove any old url chunks we might have lying around.
- for (int i = 0; i < kMaxNumCrashURLChunks; i++) {
- // On Windows the url-chunk items are 1-based, so match that.
- NSString *key = [NSString stringWithFormat:kUrlChunkFormatStr_utf8, i+1];
- clear_key_func(key);
- }
-
- const std::string& raw_url_utf8 = url.possibly_invalid_spec();
- NSString *raw_url = [NSString stringWithUTF8String:raw_url_utf8.c_str()];
- size_t raw_url_length = [raw_url length];
-
- // Bail on zero-length URLs.
- if (raw_url_length == 0) {
- return;
- }
-
- // Parcel the URL up into up to 8, 255 byte segments.
- size_t start_ofs = 0;
- for (int i = 0;
- i < kMaxNumCrashURLChunks && start_ofs < raw_url_length;
- ++i) {
-
- // On Windows the url-chunk items are 1-based, so match that.
- NSString *key = [NSString stringWithFormat:kUrlChunkFormatStr_utf8, i+1];
- NSRange range;
- range.location = start_ofs;
- range.length = std::min((size_t)kMaxNumURLChunkValueLength,
- raw_url_length - start_ofs);
- NSString *value = [raw_url substringWithRange:range];
- set_key_func(key, value);
-
- // Next chunk.
- start_ofs += kMaxNumURLChunkValueLength;
- }
-}
-
-void SetActiveURL(const GURL& url) {
- // If Breakpad isn't initialized then bail.
- if (IsCrashReporterDisabled()) {
- return;
- }
-
- SetActiveURLImpl(url, SetCrashKeyValue, ClearCrashKeyValue);
-}
-
-} // namespace child_process_logging