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

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

Issue 2854293003: Fix losing of scoped feature channel in tests when it's equal to stable (Closed)
Patch Set: Take account of override count Created 3 years, 7 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
« no previous file with comments | « no previous file | extensions/common/features/feature_channel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 #include "components/user_manager/user_manager.h" 67 #include "components/user_manager/user_manager.h"
68 #else 68 #else
69 #include "extensions/browser/updater/null_extension_cache.h" 69 #include "extensions/browser/updater/null_extension_cache.h"
70 #endif 70 #endif
71 71
72 namespace extensions { 72 namespace extensions {
73 73
74 ChromeExtensionsBrowserClient::ChromeExtensionsBrowserClient() { 74 ChromeExtensionsBrowserClient::ChromeExtensionsBrowserClient() {
75 process_manager_delegate_.reset(new ChromeProcessManagerDelegate); 75 process_manager_delegate_.reset(new ChromeProcessManagerDelegate);
76 api_client_.reset(new ChromeExtensionsAPIClient); 76 api_client_.reset(new ChromeExtensionsAPIClient);
77 // Only set if it hasn't already been set (e.g. by a test). 77 SetCurrentChannel(chrome::GetChannel());
78 if (GetCurrentChannel() == GetDefaultChannel())
79 SetCurrentChannel(chrome::GetChannel());
80 resource_manager_.reset(new ChromeComponentExtensionResourceManager()); 78 resource_manager_.reset(new ChromeComponentExtensionResourceManager());
81 } 79 }
82 80
83 ChromeExtensionsBrowserClient::~ChromeExtensionsBrowserClient() {} 81 ChromeExtensionsBrowserClient::~ChromeExtensionsBrowserClient() {}
84 82
85 bool ChromeExtensionsBrowserClient::IsShuttingDown() { 83 bool ChromeExtensionsBrowserClient::IsShuttingDown() {
86 return g_browser_process->IsShuttingDown(); 84 return g_browser_process->IsShuttingDown();
87 } 85 }
88 86
89 bool ChromeExtensionsBrowserClient::AreExtensionsDisabled( 87 bool ChromeExtensionsBrowserClient::AreExtensionsDisabled(
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 return navigation_data->GetExtensionNavigationUIData(); 433 return navigation_data->GetExtensionNavigationUIData();
436 } 434 }
437 435
438 KioskDelegate* ChromeExtensionsBrowserClient::GetKioskDelegate() { 436 KioskDelegate* ChromeExtensionsBrowserClient::GetKioskDelegate() {
439 if (!kiosk_delegate_) 437 if (!kiosk_delegate_)
440 kiosk_delegate_.reset(new ChromeKioskDelegate()); 438 kiosk_delegate_.reset(new ChromeKioskDelegate());
441 return kiosk_delegate_.get(); 439 return kiosk_delegate_.get();
442 } 440 }
443 441
444 } // namespace extensions 442 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | extensions/common/features/feature_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698