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

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

Issue 2901173002: Move RedirectChromeLogging to src/chromeos. (Closed)
Patch Set: Rebase Created 3 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
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 DetermineLoggingDestination(
36 const base::CommandLine& command_line);
37
35 #if defined(OS_CHROMEOS) 38 #if defined(OS_CHROMEOS)
39 // Point the logging symlink to the system log or the user session log.
40 base::FilePath SetUpSymlinkIfNeeded(const base::FilePath& symlink_path,
41 bool new_log);
42
43 // Remove the logging symlink.
44 void RemoveSymlinkAndLog(const base::FilePath& link_path,
45 const base::FilePath& target_path);
46
36 // Get the log file directory path. 47 // Get the log file directory path.
37 base::FilePath GetSessionLogDir(const base::CommandLine& command_line); 48 base::FilePath GetSessionLogDir(const base::CommandLine& command_line);
38 49
39 // Get the log file location. 50 // Get the log file location.
40 base::FilePath GetSessionLogFile(const base::CommandLine& command_line); 51 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 52 #endif
45 53
46 // Call when done using logging for Chrome. 54 // Call when done using logging for Chrome.
47 void CleanupChromeLogging(); 55 void CleanupChromeLogging();
48 56
49 // Returns the fully-qualified name of the log file. 57 // Returns the fully-qualified name of the log file.
50 base::FilePath GetLogFileName(); 58 base::FilePath GetLogFileName();
51 59
52 // Returns true when error/assertion dialogs are not to be shown, false 60 // Returns true when error/assertion dialogs are not to be shown, false
53 // otherwise. 61 // otherwise.
54 bool DialogsAreSuppressed(); 62 bool DialogsAreSuppressed();
55 63
56 // Inserts timestamp before file extension in the format 64 // Inserts timestamp before file extension in the format
57 // "_yymmdd-hhmmss". 65 // "_yymmdd-hhmmss".
58 base::FilePath GenerateTimestampedName(const base::FilePath& base_path, 66 base::FilePath GenerateTimestampedName(const base::FilePath& base_path,
59 base::Time timestamp); 67 base::Time timestamp);
60 } // namespace logging 68 } // namespace logging
61 69
62 #endif // CHROME_COMMON_LOGGING_CHROME_H_ 70 #endif // CHROME_COMMON_LOGGING_CHROME_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/session/user_session_manager.cc ('k') | chrome/common/logging_chrome.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698