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

Unified Diff: chrome/common/logging_chrome.cc

Issue 1012683003: Remove some dead code, fix some includes and whitespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/logging_chrome.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/logging_chrome.cc
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index 04ad0e3e9eb306c3d8196fec825c93352d55df5d..7d265871ed6e69b2adc35799e266ee33f5786034 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -26,10 +26,11 @@
#include <windows.h>
#endif
-#include <fstream>
-
#include "chrome/common/logging_chrome.h"
+#include <fstream> // NOLINT
+#include <string> // NOLINT
+
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/debug/debugger.h"
@@ -37,14 +38,12 @@
#include "base/environment.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
-#include "base/logging.h"
#include "base/path_service.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_restrictions.h"
-#include "base/time/time.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
@@ -392,35 +391,6 @@ base::FilePath GetLogFileName() {
bool DialogsAreSuppressed() {
return dialogs_are_suppressed_;
}
-
-size_t GetFatalAssertions(AssertionList* assertions) {
- // In this function, we don't assume that assertions is non-null, so
- // that if you just want an assertion count, you can pass in NULL.
- if (assertions)
- assertions->clear();
- size_t assertion_count = 0;
-
- std::ifstream log_file;
- log_file.open(GetLogFileName().value().c_str());
- if (!log_file.is_open())
- return 0;
-
- std::string utf8_line;
- std::wstring wide_line;
- while (!log_file.eof()) {
- getline(log_file, utf8_line);
- if (utf8_line.find(":FATAL:") != std::string::npos) {
- wide_line = base::UTF8ToWide(utf8_line);
- if (assertions)
- assertions->push_back(wide_line);
- ++assertion_count;
- }
- }
- log_file.close();
-
- return assertion_count;
-}
-
base::FilePath GenerateTimestampedName(const base::FilePath& base_path,
base::Time timestamp) {
base::Time::Exploded time_deets;
« no previous file with comments | « chrome/common/logging_chrome.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698