Commit 04509e6d authored by Elad Alon's avatar Elad Alon Committed by Commit Bot

Rename LogList to TextLogList where appropriate

Help distinguish WebRTC event logs from textual logs.

Bug: 775415
Change-Id: I17b14cfc25ab0c70eecd905cd28bad77304c3b3f
Reviewed-on: https://chromium-review.googlesource.com/1174352Reviewed-by: default avatarHenrik Grunell <grunell@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Elad Alon <eladalon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583036}
parent 9a3f55b0
......@@ -91,7 +91,7 @@
#include "components/sessions/core/tab_restore_service.h"
#include "components/web_cache/browser/web_cache_manager.h"
#include "components/webrtc_logging/browser/log_cleanup.h"
#include "components/webrtc_logging/browser/log_list.h"
#include "components/webrtc_logging/browser/text_log_list.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/browsing_data_filter_builder.h"
#include "content/public/browser/plugin_data_remover.h"
......@@ -548,8 +548,8 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
FROM_HERE, {base::TaskPriority::USER_VISIBLE, base::MayBlock()},
base::BindOnce(
&webrtc_logging::DeleteOldAndRecentWebRtcLogFiles,
webrtc_logging::LogList::GetWebRtcLogDirectoryForBrowserContextPath(
profile_->GetPath()),
webrtc_logging::TextLogList::
GetWebRtcLogDirectoryForBrowserContextPath(profile_->GetPath()),
delete_begin_),
CreatePendingTaskCompletionClosure());
......
......@@ -8,7 +8,7 @@
#include "build/build_config.h"
#include "chrome/browser/apps/platform_apps/app_browsertest_util.h"
#include "chrome/common/chrome_switches.h"
#include "components/webrtc_logging/browser/log_list.h"
#include "components/webrtc_logging/browser/text_log_list.h"
class WebrtcLoggingPrivateApiBrowserTest
: public extensions::PlatformAppBrowserTest {
......@@ -17,8 +17,8 @@ class WebrtcLoggingPrivateApiBrowserTest
~WebrtcLoggingPrivateApiBrowserTest() override = default;
base::FilePath webrtc_logs_path() {
return webrtc_logging::LogList::GetWebRtcLogDirectoryForBrowserContextPath(
profile()->GetPath());
return webrtc_logging::TextLogList::
GetWebRtcLogDirectoryForBrowserContextPath(profile()->GetPath());
}
private:
......
......@@ -13,7 +13,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/task/post_task.h"
#include "base/time/time.h"
#include "components/webrtc_logging/browser/log_list.h"
#include "components/webrtc_logging/browser/text_log_list.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host.h"
......@@ -42,7 +42,7 @@ base::FilePath GetAudioDebugRecordingsPrefixPath(
base::FilePath GetLogDirectoryAndEnsureExists(
content::BrowserContext* browser_context) {
base::FilePath log_dir_path =
webrtc_logging::LogList::GetWebRtcLogDirectoryForBrowserContextPath(
webrtc_logging::TextLogList::GetWebRtcLogDirectoryForBrowserContextPath(
browser_context->GetPath());
base::File::Error error;
if (!base::CreateDirectoryAndGetError(log_dir_path, &error)) {
......
......@@ -21,7 +21,7 @@
#include "chrome/browser/net/system_network_context_manager.h"
#include "components/version_info/version_info.h"
#include "components/webrtc_logging/browser/log_cleanup.h"
#include "components/webrtc_logging/browser/log_list.h"
#include "components/webrtc_logging/browser/text_log_list.h"
#include "components/webrtc_logging/common/partial_circular_buffer.h"
#include "content/public/browser/browser_thread.h"
#include "net/base/load_flags.h"
......@@ -132,7 +132,7 @@ void WebRtcLogUploader::LoggingStoppedDoUpload(
WriteCompressedLogToFile(compressed_log, log_file_path);
base::FilePath log_list_path =
webrtc_logging::LogList::GetWebRtcLogListFileForDirectory(
webrtc_logging::TextLogList::GetWebRtcLogListFileForDirectory(
upload_done_data.log_path);
AddLocallyStoredLogInfoToUploadListFile(log_list_path, local_log_id);
}
......@@ -238,7 +238,7 @@ void WebRtcLogUploader::LoggingStoppedDoStore(
webrtc_logging::DeleteOldWebRtcLogFiles(log_paths.log_path);
base::FilePath log_list_path =
webrtc_logging::LogList::GetWebRtcLogListFileForDirectory(
webrtc_logging::TextLogList::GetWebRtcLogListFileForDirectory(
log_paths.log_path);
// Store the native log with a ".gz" extension.
......@@ -315,7 +315,7 @@ void WebRtcLogUploader::OnSimpleLoaderComplete(
if (!upload_done_data.log_path.empty()) {
// TODO(jiayl): Add the RTP dump records to chrome://webrtc-logs.
base::FilePath log_list_path =
webrtc_logging::LogList::GetWebRtcLogListFileForDirectory(
webrtc_logging::TextLogList::GetWebRtcLogListFileForDirectory(
upload_done_data.log_path);
background_task_runner_->PostTask(
FROM_HERE,
......
......@@ -13,7 +13,7 @@
#include "chrome/browser/profiles/profile_attributes_storage.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "components/webrtc_logging/browser/log_cleanup.h"
#include "components/webrtc_logging/browser/log_list.h"
#include "components/webrtc_logging/browser/text_log_list.h"
#include "content/public/browser/browser_thread.h"
// static
......@@ -28,7 +28,7 @@ void WebRtcLogUtil::DeleteOldWebRtcLogFilesForAllProfiles() {
FROM_HERE, {base::MayBlock(), base::TaskPriority::BEST_EFFORT},
base::BindOnce(
&webrtc_logging::DeleteOldWebRtcLogFiles,
webrtc_logging::LogList::GetWebRtcLogDirectoryForBrowserContextPath(
entry->GetPath())));
webrtc_logging::TextLogList::
GetWebRtcLogDirectoryForBrowserContextPath(entry->GetPath())));
}
}
......@@ -18,7 +18,7 @@
#include "chrome/browser/media/webrtc/webrtc_log_uploader.h"
#include "chrome/browser/media/webrtc/webrtc_rtp_dump_handler.h"
#include "chrome/common/media/webrtc_logging_messages.h"
#include "components/webrtc_logging/browser/log_list.h"
#include "components/webrtc_logging/browser/text_log_list.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/content_browser_client.h"
......@@ -417,7 +417,7 @@ base::FilePath WebRtcLoggingHandlerHost::GetLogDirectoryAndEnsureExists() {
// profile has been deleted and removed from disk. If that happens it will be
// cleaned up (at a higher level) the next browser restart.
base::FilePath log_dir_path =
webrtc_logging::LogList::GetWebRtcLogDirectoryForBrowserContextPath(
webrtc_logging::TextLogList::GetWebRtcLogDirectoryForBrowserContextPath(
browser_context_directory_path_);
base::File::Error error;
if (!base::CreateDirectoryAndGetError(log_dir_path, &error)) {
......
......@@ -27,7 +27,7 @@
#include "components/prefs/pref_service.h"
#include "components/upload_list/upload_list.h"
#include "components/version_info/version_info.h"
#include "components/webrtc_logging/browser/log_list.h"
#include "components/webrtc_logging/browser/text_log_list.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_data_source.h"
......@@ -106,10 +106,10 @@ class WebRtcLogsDOMHandler final : public WebUIMessageHandler {
WebRtcLogsDOMHandler::WebRtcLogsDOMHandler(Profile* profile)
: log_dir_(
webrtc_logging::LogList::GetWebRtcLogDirectoryForBrowserContextPath(
profile->GetPath())),
webrtc_logging::TextLogList::
GetWebRtcLogDirectoryForBrowserContextPath(profile->GetPath())),
weak_ptr_factory_(this) {
upload_list_ = webrtc_logging::LogList::CreateWebRtcLogList(profile);
upload_list_ = webrtc_logging::TextLogList::CreateWebRtcLogList(profile);
}
WebRtcLogsDOMHandler::~WebRtcLogsDOMHandler() {
......
......@@ -6,8 +6,8 @@ source_set("browser") {
sources = [
"log_cleanup.cc",
"log_cleanup.h",
"log_list.cc",
"log_list.h",
"text_log_list.cc",
"text_log_list.h",
]
deps = [
......
......@@ -14,7 +14,7 @@
#include "base/logging.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"
#include "components/webrtc_logging/browser/log_list.h"
#include "components/webrtc_logging/browser/text_log_list.h"
namespace webrtc_logging {
......@@ -63,7 +63,7 @@ void DeleteOldAndRecentWebRtcLogFiles(const base::FilePath& log_dir,
base::TimeDelta::FromDays(kDaysToKeepLogs);
base::FilePath log_list_path =
LogList::GetWebRtcLogListFileForDirectory(log_dir);
TextLogList::GetWebRtcLogListFileForDirectory(log_dir);
std::string log_list;
const bool update_log_list = base::PathExists(log_list_path);
if (update_log_list) {
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/webrtc_logging/browser/log_list.h"
#include "components/webrtc_logging/browser/text_log_list.h"
#include "base/files/file.h"
#include "base/files/file_util.h"
......@@ -20,7 +20,7 @@ const char kWebRtcLogListFilename[] = "Log List";
} // namespace
// static
UploadList* LogList::CreateWebRtcLogList(
UploadList* TextLogList::CreateWebRtcLogList(
content::BrowserContext* browser_context) {
base::FilePath log_list_path = GetWebRtcLogListFileForDirectory(
GetWebRtcLogDirectoryForBrowserContextPath(browser_context->GetPath()));
......@@ -28,14 +28,14 @@ UploadList* LogList::CreateWebRtcLogList(
}
// static
base::FilePath LogList::GetWebRtcLogDirectoryForBrowserContextPath(
base::FilePath TextLogList::GetWebRtcLogDirectoryForBrowserContextPath(
const base::FilePath& browser_context_path) {
DCHECK(!browser_context_path.empty());
return browser_context_path.AppendASCII(kWebRtcLogDirectory);
}
// static
base::FilePath LogList::GetWebRtcLogListFileForDirectory(
base::FilePath TextLogList::GetWebRtcLogListFileForDirectory(
const base::FilePath& dir) {
DCHECK(!dir.empty());
return dir.AppendASCII(kWebRtcLogListFilename);
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_WEBRTC_LOGGING_BROWSER_LOG_LIST_H_
#define COMPONENTS_WEBRTC_LOGGING_BROWSER_LOG_LIST_H_
#ifndef COMPONENTS_WEBRTC_LOGGING_BROWSER_TEXT_LOG_LIST_H_
#define COMPONENTS_WEBRTC_LOGGING_BROWSER_TEXT_LOG_LIST_H_
#include "base/files/file_path.h"
......@@ -15,7 +15,7 @@ class BrowserContext;
namespace webrtc_logging {
class LogList {
class TextLogList {
public:
// Creates the upload list for a browser context. The upload list loads and
// parses a text file list of WebRTC logs stored locally and/or uploaded.
......@@ -35,4 +35,4 @@ class LogList {
} // namespace webrtc_logging
#endif // COMPONENTS_WEBRTC_LOGGING_BROWSER_LOG_LIST_H_
#endif // COMPONENTS_WEBRTC_LOGGING_BROWSER_TEXT_LOG_LIST_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment