Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: chrome/browser/extensions/chrome_extensions_browser_client.cc

Issue 2077723002: [Extensions] Short-circuit activity logging if not enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add Test Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/chrome_extensions_browser_client.h" 5 #include "chrome/browser/extensions/chrome_extensions_browser_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 241 }
242 242
243 bool ChromeExtensionsBrowserClient::IsLoggedInAsPublicAccount() { 243 bool ChromeExtensionsBrowserClient::IsLoggedInAsPublicAccount() {
244 #if defined(OS_CHROMEOS) 244 #if defined(OS_CHROMEOS)
245 return user_manager::UserManager::Get()->IsLoggedInAsPublicAccount(); 245 return user_manager::UserManager::Get()->IsLoggedInAsPublicAccount();
246 #else 246 #else
247 return false; 247 return false;
248 #endif 248 #endif
249 } 249 }
250 250
251 ApiActivityMonitor* ChromeExtensionsBrowserClient::GetApiActivityMonitor(
252 content::BrowserContext* context) {
253 // The ActivityLog monitors and records function calls and events.
254 return ActivityLog::GetInstance(context);
255 }
256
257 ExtensionSystemProvider* 251 ExtensionSystemProvider*
258 ChromeExtensionsBrowserClient::GetExtensionSystemFactory() { 252 ChromeExtensionsBrowserClient::GetExtensionSystemFactory() {
259 return ExtensionSystemFactory::GetInstance(); 253 return ExtensionSystemFactory::GetInstance();
260 } 254 }
261 255
262 void ChromeExtensionsBrowserClient::RegisterExtensionFunctions( 256 void ChromeExtensionsBrowserClient::RegisterExtensionFunctions(
263 ExtensionFunctionRegistry* registry) const { 257 ExtensionFunctionRegistry* registry) const {
264 // Preferences. 258 // Preferences.
265 registry->RegisterFunction<GetPreferenceFunction>(); 259 registry->RegisterFunction<GetPreferenceFunction>();
266 registry->RegisterFunction<SetPreferenceFunction>(); 260 registry->RegisterFunction<SetPreferenceFunction>();
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 405
412 std::unique_ptr<content::BluetoothChooser> 406 std::unique_ptr<content::BluetoothChooser>
413 ChromeExtensionsBrowserClient::CreateBluetoothChooser( 407 ChromeExtensionsBrowserClient::CreateBluetoothChooser(
414 content::RenderFrameHost* frame, 408 content::RenderFrameHost* frame,
415 const content::BluetoothChooser::EventHandler& event_handler) { 409 const content::BluetoothChooser::EventHandler& event_handler) {
416 return base::WrapUnique( 410 return base::WrapUnique(
417 new ChromeExtensionBluetoothChooser(frame, event_handler)); 411 new ChromeExtensionBluetoothChooser(frame, event_handler));
418 } 412 }
419 413
420 } // namespace extensions 414 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698