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

Side by Side Diff: chrome/common/logging_chrome.h

Issue 2901173002: Move RedirectChromeLogging to src/chromeos. (Closed)
Patch Set: Created 3 years, 7 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_COMMON_LOGGING_CHROME_H_ 5 #ifndef CHROME_COMMON_LOGGING_CHROME_H_
6 #define CHROME_COMMON_LOGGING_CHROME_H_ 6 #define CHROME_COMMON_LOGGING_CHROME_H_
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 14 matching lines...) Expand all
25 // they will delete each others' logs. 25 // they will delete each others' logs.
26 // 26 //
27 // XXX 27 // XXX
28 // Setting suppress_error_dialogs to true disables any dialogs that would 28 // Setting suppress_error_dialogs to true disables any dialogs that would
29 // normally appear for assertions and crashes, and makes any catchable 29 // normally appear for assertions and crashes, and makes any catchable
30 // errors (namely assertions) available via GetSilencedErrorCount() 30 // errors (namely assertions) available via GetSilencedErrorCount()
31 // and GetSilencedError(). 31 // and GetSilencedError().
32 void InitChromeLogging(const base::CommandLine& command_line, 32 void InitChromeLogging(const base::CommandLine& command_line,
33 OldFileDeletionState delete_old_log_file); 33 OldFileDeletionState delete_old_log_file);
34 34
35 LoggingDestination DetermineLogMode(const base::CommandLine& command_line);
sky 2017/05/25 02:23:56 Given the return value, how about DetermineLogging
achuithb 2017/05/25 10:06:06 Done.
36
35 #if defined(OS_CHROMEOS) 37 #if defined(OS_CHROMEOS)
xiyuan 2017/05/24 15:15:33 Move everything in this section to the new chrome/
achuithb 2017/05/24 21:07:55 These are all used by the platform-independent Ini
xiyuan 2017/05/24 21:16:19 Okay. :(
38 // Point the logging symlink to the system log or the user session log.
39 base::FilePath SetUpSymlinkIfNeeded(const base::FilePath& symlink_path,
40 bool new_log);
41
42 // Remove the logging symlink.
43 void RemoveSymlinkAndLog(const base::FilePath& link_path,
44 const base::FilePath& target_path);
45
36 // Get the log file directory path. 46 // Get the log file directory path.
37 base::FilePath GetSessionLogDir(const base::CommandLine& command_line); 47 base::FilePath GetSessionLogDir(const base::CommandLine& command_line);
38 48
39 // Get the log file location. 49 // Get the log file location.
40 base::FilePath GetSessionLogFile(const base::CommandLine& command_line); 50 base::FilePath GetSessionLogFile(const base::CommandLine& command_line);
41
42 // Redirects chrome logging to the appropriate session log dir.
43 void RedirectChromeLogging(const base::CommandLine& command_line);
44 #endif 51 #endif
45 52
46 // Call when done using logging for Chrome. 53 // Call when done using logging for Chrome.
47 void CleanupChromeLogging(); 54 void CleanupChromeLogging();
48 55
49 // Returns the fully-qualified name of the log file. 56 // Returns the fully-qualified name of the log file.
50 base::FilePath GetLogFileName(); 57 base::FilePath GetLogFileName();
51 58
52 // Returns true when error/assertion dialogs are not to be shown, false 59 // Returns true when error/assertion dialogs are not to be shown, false
53 // otherwise. 60 // otherwise.
54 bool DialogsAreSuppressed(); 61 bool DialogsAreSuppressed();
55 62
56 // Inserts timestamp before file extension in the format 63 // Inserts timestamp before file extension in the format
57 // "_yymmdd-hhmmss". 64 // "_yymmdd-hhmmss".
58 base::FilePath GenerateTimestampedName(const base::FilePath& base_path, 65 base::FilePath GenerateTimestampedName(const base::FilePath& base_path,
59 base::Time timestamp); 66 base::Time timestamp);
60 } // namespace logging 67 } // namespace logging
61 68
62 #endif // CHROME_COMMON_LOGGING_CHROME_H_ 69 #endif // CHROME_COMMON_LOGGING_CHROME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698