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

Side by Side Diff: chromecast/crash/android/crash_handler.cc

Issue 1058013006: Chromecast: make CAST_IS_DEBUG_BUILD to macro CAST_IS_DEBUG_BUILD(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media-drm-delegate
Patch Set: updates version.h.in Created 5 years, 8 months 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
« no previous file with comments | « chromecast/crash/android/cast_crash_reporter_client_android.cc ('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 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 #include "chromecast/crash/android/crash_handler.h" 5 #include "chromecast/crash/android/crash_handler.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 23 matching lines...) Expand all
34 DCHECK(g_crash_handler); 34 DCHECK(g_crash_handler);
35 g_crash_handler->UploadCrashDumps(); 35 g_crash_handler->UploadCrashDumps();
36 36
37 // Let the exception continue to propagate up to the system. 37 // Let the exception continue to propagate up to the system.
38 return false; 38 return false;
39 } 39 }
40 40
41 // Debug builds: always to crash-staging 41 // Debug builds: always to crash-staging
42 // Release builds: only to crash-staging for local/invalid build numbers 42 // Release builds: only to crash-staging for local/invalid build numbers
43 bool UploadCrashToStaging() { 43 bool UploadCrashToStaging() {
44 #if CAST_IS_DEBUG_BUILD 44 #if CAST_IS_DEBUG_BUILD()
45 return true; 45 return true;
46 #else 46 #else
47 int build_number; 47 int build_number;
48 if (base::StringToInt(CAST_BUILD_INCREMENTAL, &build_number)) 48 if (base::StringToInt(CAST_BUILD_INCREMENTAL, &build_number))
49 return build_number == 0; 49 return build_number == 0;
50 return true; 50 return true;
51 #endif 51 #endif
52 } 52 }
53 53
54 } // namespace 54 } // namespace
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 base::android::ConvertUTF8ToJavaString(env, log_file_path_.value()); 137 base::android::ConvertUTF8ToJavaString(env, log_file_path_.value());
138 Java_CastCrashHandler_uploadCrashDumps(env, log_file_path_java.obj()); 138 Java_CastCrashHandler_uploadCrashDumps(env, log_file_path_java.obj());
139 } else { 139 } else {
140 VLOG(1) << "Removing crash dumps instead of uploading"; 140 VLOG(1) << "Removing crash dumps instead of uploading";
141 JNIEnv* env = base::android::AttachCurrentThread(); 141 JNIEnv* env = base::android::AttachCurrentThread();
142 Java_CastCrashHandler_removeCrashDumps(env); 142 Java_CastCrashHandler_removeCrashDumps(env);
143 } 143 }
144 } 144 }
145 145
146 } // namespace chromecast 146 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/crash/android/cast_crash_reporter_client_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698