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

Side by Side Diff: chrome/browser/chromeos/memory/oom_memory_details.h

Issue 1188823002: [MemoryPressure] Move chrome/browser/chromeos/* to chrome/browser/memory/*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed sky@ comments. Created 5 years, 6 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_MEMORY_OOM_MEMORY_DETAILS_H_
6 #define CHROME_BROWSER_CHROMEOS_MEMORY_OOM_MEMORY_DETAILS_H_
7
8 #include <string>
9
10 #include "base/callback.h"
11 #include "base/macros.h"
12 #include "base/time/time.h"
13 #include "chrome/browser/memory_details.h"
14
15 namespace chromeos {
16
17 ////////////////////////////////////////////////////////////////////////////////
18 // OomMemoryDetails logs details about all Chrome processes during an out-of-
19 // memory event in an attempt to identify the culprit.
20 class OomMemoryDetails : public MemoryDetails {
21 public:
22 // Logs the memory details asynchronously and then run |callback|.
23 // The |title| is printed at the beginning of the message.
24 static void Log(const std::string& title, const base::Closure& callback);
25
26 private:
27 OomMemoryDetails(const std::string& title, const base::Closure& callback);
28 ~OomMemoryDetails() override;
29
30 // MemoryDetails overrides:
31 void OnDetailsAvailable() override;
32
33 std::string title_;
34 base::TimeTicks start_time_;
35 base::Closure callback_;
36
37 DISALLOW_COPY_AND_ASSIGN(OomMemoryDetails);
38 };
39
40 } // namespace chromeos
41
42 #endif // CHROME_BROWSER_CHROMEOS_MEMORY_OOM_MEMORY_DETAILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/memory/low_memory_observer.cc ('k') | chrome/browser/chromeos/memory/oom_memory_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698