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

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

Issue 2199973003: Android JNI gen: Don't emit code for empty RegisterNatives() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@jnireg1
Patch Set: Android JNI gen: Don't emit code for empty RegisterNatives() Created 4 years, 4 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/app/android/crash_handler.h ('k') | chromecast/base/android/dumpstate_writer.h » ('j') | 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/app/android/crash_handler.h" 5 #include "chromecast/app/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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 g_crash_handler->Initialize(); 52 g_crash_handler->Initialize();
53 } 53 }
54 54
55 // static 55 // static
56 bool CrashHandler::GetCrashDumpLocation(base::FilePath* crash_dir) { 56 bool CrashHandler::GetCrashDumpLocation(base::FilePath* crash_dir) {
57 DCHECK(g_crash_handler); 57 DCHECK(g_crash_handler);
58 return g_crash_handler->crash_reporter_client_->GetCrashDumpLocation( 58 return g_crash_handler->crash_reporter_client_->GetCrashDumpLocation(
59 crash_dir); 59 crash_dir);
60 } 60 }
61 61
62 // static
63 bool CrashHandler::RegisterCastCrashJni(JNIEnv* env) {
64 return RegisterNativesImpl(env);
65 }
66
67 CrashHandler::CrashHandler(const std::string& process_type, 62 CrashHandler::CrashHandler(const std::string& process_type,
68 const base::FilePath& log_file_path) 63 const base::FilePath& log_file_path)
69 : log_file_path_(log_file_path), 64 : log_file_path_(log_file_path),
70 process_type_(process_type), 65 process_type_(process_type),
71 crash_reporter_client_(new CastCrashReporterClientAndroid(process_type)) { 66 crash_reporter_client_(new CastCrashReporterClientAndroid(process_type)) {
72 if (!crash_reporter_client_->GetCrashDumpLocation(&crash_dump_path_)) { 67 if (!crash_reporter_client_->GetCrashDumpLocation(&crash_dump_path_)) {
73 LOG(ERROR) << "Could not get crash dump location"; 68 LOG(ERROR) << "Could not get crash dump location";
74 } 69 }
75 SetCrashReporterClient(crash_reporter_client_.get()); 70 SetCrashReporterClient(crash_reporter_client_.get());
76 } 71 }
(...skipping 20 matching lines...) Expand all
97 base::android::ScopedJavaLocalRef<jstring> crash_dump_path_java = 92 base::android::ScopedJavaLocalRef<jstring> crash_dump_path_java =
98 base::android::ConvertUTF8ToJavaString(env, crash_dump_path_.value()); 93 base::android::ConvertUTF8ToJavaString(env, crash_dump_path_.value());
99 Java_CastCrashHandler_initializeUploader( 94 Java_CastCrashHandler_initializeUploader(
100 env, 95 env,
101 base::android::GetApplicationContext(), 96 base::android::GetApplicationContext(),
102 crash_dump_path_java.obj(), 97 crash_dump_path_java.obj(),
103 UploadCrashToStaging()); 98 UploadCrashToStaging());
104 } 99 }
105 100
106 } // namespace chromecast 101 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/app/android/crash_handler.h ('k') | chromecast/base/android/dumpstate_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698