summaryrefslogtreecommitdiffstats
path: root/chrome/browser/media/webrtc_log_upload_list.cc
blob: 15c2963a8a01d45f17338ef098ceace93f6839b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/media/webrtc_log_upload_list.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* kWebRtcLogListFilename = "webrtc_log_uploads.log";

}

// static
WebRtcLogUploadList* WebRtcLogUploadList::Create(Delegate* delegate,
                                                 Profile* profile) {
  return new WebRtcLogUploadList(delegate, GetFilePathForProfile(profile));
}

// static
base::FilePath WebRtcLogUploadList::GetFilePathForProfile(Profile* profile) {
  base::FilePath log_dir_path = profile->GetPath();
  return log_dir_path.AppendASCII(kWebRtcLogListFilename);
}

WebRtcLogUploadList::WebRtcLogUploadList(Delegate* delegate,
                                         const base::FilePath& upload_log_path)
    : UploadList(delegate, upload_log_path) {}

WebRtcLogUploadList::~WebRtcLogUploadList() {}