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