summaryrefslogtreecommitdiff
path: root/chromium/ui/base/clipboard/clipboard_dlp_controller.cc
blob: 5ab980182c9d703845a10a2d0874a27aea5409bd (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
// Copyright 2020 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 "ui/base/clipboard/clipboard_dlp_controller.h"

namespace ui {

// static
ClipboardDlpController* ClipboardDlpController::Get() {
  return g_clipboard_dlp_controller_;
}

// static
void ClipboardDlpController::DeleteInstance() {
  if (!g_clipboard_dlp_controller_)
    return;

  delete g_clipboard_dlp_controller_;
}

ClipboardDlpController::ClipboardDlpController() {
  g_clipboard_dlp_controller_ = this;
}

ClipboardDlpController::~ClipboardDlpController() {
  g_clipboard_dlp_controller_ = nullptr;
}

ClipboardDlpController* ClipboardDlpController::g_clipboard_dlp_controller_ =
    nullptr;

}  // namespace ui