This source file includes following definitions.
- CreateWebRtcLogList
- GetWebRtcLogDirectoryForProfile
- GetWebRtcLogListFileForDirectory
#include "chrome/browser/media/webrtc_log_list.h"
#include "base/file_util.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/path_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_paths.h"
namespace {
const char kWebRtcLogDirectory[] = "WebRTC Logs";
const char kWebRtcLogListFilename[] = "Log List";
}
UploadList* WebRtcLogList::CreateWebRtcLogList(UploadList::Delegate* delegate,
Profile* profile) {
base::FilePath log_list_path = GetWebRtcLogListFileForDirectory(
GetWebRtcLogDirectoryForProfile(profile->GetPath()));
return new UploadList(delegate, log_list_path);
}
base::FilePath WebRtcLogList::GetWebRtcLogDirectoryForProfile(
const base::FilePath& profile_path) {
DCHECK(!profile_path.empty());
return profile_path.AppendASCII(kWebRtcLogDirectory);
}
base::FilePath WebRtcLogList::GetWebRtcLogListFileForDirectory(
const base::FilePath& dir) {
DCHECK(!dir.empty());
return dir.AppendASCII(kWebRtcLogListFilename);
}