blob: e2ba427acde33b6ebae3c2c58bc7a74b02a703fd (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
// 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/extensions/chrome_extensions_browser_client.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
namespace extensions {
namespace {
static base::LazyInstance<ChromeExtensionsBrowserClient> g_client =
LAZY_INSTANCE_INITIALIZER;
} // namespace
ChromeExtensionsBrowserClient::ChromeExtensionsBrowserClient() {}
ChromeExtensionsBrowserClient::~ChromeExtensionsBrowserClient() {}
bool ChromeExtensionsBrowserClient::IsShuttingDown() {
return g_browser_process->IsShuttingDown();
}
bool ChromeExtensionsBrowserClient::IsSameContext(
content::BrowserContext* first,
content::BrowserContext* second) {
return static_cast<Profile*>(first)->IsSameProfile(
static_cast<Profile*>(second));
}
bool ChromeExtensionsBrowserClient::HasOffTheRecordContext(
content::BrowserContext* context) {
return static_cast<Profile*>(context)->HasOffTheRecordProfile();
}
content::BrowserContext* ChromeExtensionsBrowserClient::GetOffTheRecordContext(
content::BrowserContext* context) {
return static_cast<Profile*>(context)->GetOffTheRecordProfile();
}
// static
ChromeExtensionsBrowserClient* ChromeExtensionsBrowserClient::GetInstance() {
return g_client.Pointer();
}
} // namespace extensions
|