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

Side by Side Diff: components/breakpad/browser/crash_dump_manager_android.h

Issue 184003002: Remove CreatePlatformFile from content shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef COMPONENTS_BREAKPAD_BROWSER_CRASH_DUMP_MANAGER_ANDROID_H_ 5 #ifndef COMPONENTS_BREAKPAD_BROWSER_CRASH_DUMP_MANAGER_ANDROID_H_
6 #define COMPONENTS_BREAKPAD_BROWSER_CRASH_DUMP_MANAGER_ANDROID_H_ 6 #define COMPONENTS_BREAKPAD_BROWSER_CRASH_DUMP_MANAGER_ANDROID_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/files/file.h"
10 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
11 #include "base/platform_file.h"
12 #include "base/process/process.h" 12 #include "base/process/process.h"
13 #include "base/synchronization/lock.h" 13 #include "base/synchronization/lock.h"
14 #include "content/public/browser/browser_child_process_observer.h" 14 #include "content/public/browser/browser_child_process_observer.h"
15 #include "content/public/browser/notification_observer.h" 15 #include "content/public/browser/notification_observer.h"
16 #include "content/public/browser/notification_registrar.h" 16 #include "content/public/browser/notification_registrar.h"
17 17
18 namespace content { 18 namespace content {
19 class RenderProcessHost; 19 class RenderProcessHost;
20 } 20 }
21 21
(...skipping 12 matching lines...) Expand all
34 public content::NotificationObserver { 34 public content::NotificationObserver {
35 public: 35 public:
36 // The embedder should create a single instance of the CrashDumpManager. 36 // The embedder should create a single instance of the CrashDumpManager.
37 static CrashDumpManager* GetInstance(); 37 static CrashDumpManager* GetInstance();
38 38
39 // Should be created on the UI thread. 39 // Should be created on the UI thread.
40 explicit CrashDumpManager(const base::FilePath& crash_dump_dir); 40 explicit CrashDumpManager(const base::FilePath& crash_dump_dir);
41 41
42 virtual ~CrashDumpManager(); 42 virtual ~CrashDumpManager();
43 43
44 // Returns a file descriptor that should be used to generate a minidump for 44 // Returns a file that should be used to generate a minidump for the process
45 // the process |child_process_id|. 45 // |child_process_id|.
46 int CreateMinidumpFile(int child_process_id); 46 base::File CreateMinidumpFile(int child_process_id);
47 47
48 private: 48 private:
49 typedef std::map<int, base::FilePath> ChildProcessIDToMinidumpPath; 49 typedef std::map<int, base::FilePath> ChildProcessIDToMinidumpPath;
50 50
51 static void ProcessMinidump(const base::FilePath& minidump_path, 51 static void ProcessMinidump(const base::FilePath& minidump_path,
52 base::ProcessHandle pid); 52 base::ProcessHandle pid);
53 53
54 // content::BrowserChildProcessObserver implementation: 54 // content::BrowserChildProcessObserver implementation:
55 virtual void BrowserChildProcessHostDisconnected( 55 virtual void BrowserChildProcessHostDisconnected(
56 const content::ChildProcessData& data) OVERRIDE; 56 const content::ChildProcessData& data) OVERRIDE;
(...skipping 18 matching lines...) Expand all
75 base::FilePath crash_dump_dir_; 75 base::FilePath crash_dump_dir_;
76 76
77 static CrashDumpManager* instance_; 77 static CrashDumpManager* instance_;
78 78
79 DISALLOW_COPY_AND_ASSIGN(CrashDumpManager); 79 DISALLOW_COPY_AND_ASSIGN(CrashDumpManager);
80 }; 80 };
81 81
82 } // namespace breakpad 82 } // namespace breakpad
83 83
84 #endif // COMPONENTS_BREAKPAD_BROWSER_CRASH_DUMP_MANAGER_ANDROID_H_ 84 #endif // COMPONENTS_BREAKPAD_BROWSER_CRASH_DUMP_MANAGER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698