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

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

Issue 1869483002: kiosk: Defer app update until platform matches (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for comments from jenny Created 4 years, 8 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 | « chrome/browser/extensions/extension_system_impl.h ('k') | chrome/chrome_browser_chromeos.gypi » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extension_system_impl.h" 5 #include "chrome/browser/extensions/extension_system_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 #include "extensions/common/manifest_url_handlers.h" 57 #include "extensions/common/manifest_url_handlers.h"
58 58
59 #if defined(ENABLE_NOTIFICATIONS) 59 #if defined(ENABLE_NOTIFICATIONS)
60 #include "chrome/browser/notifications/notifier_state_tracker.h" 60 #include "chrome/browser/notifications/notifier_state_tracker.h"
61 #include "chrome/browser/notifications/notifier_state_tracker_factory.h" 61 #include "chrome/browser/notifications/notifier_state_tracker_factory.h"
62 #include "ui/message_center/notifier_settings.h" 62 #include "ui/message_center/notifier_settings.h"
63 #endif 63 #endif
64 64
65 #if defined(OS_CHROMEOS) 65 #if defined(OS_CHROMEOS)
66 #include "chrome/browser/app_mode/app_mode_utils.h" 66 #include "chrome/browser/app_mode/app_mode_utils.h"
67 #include "chrome/browser/chromeos/app_mode/kiosk_app_update_install_gate.h"
67 #include "chrome/browser/chromeos/extensions/device_local_account_management_pol icy_provider.h" 68 #include "chrome/browser/chromeos/extensions/device_local_account_management_pol icy_provider.h"
68 #include "chrome/browser/chromeos/policy/device_local_account.h" 69 #include "chrome/browser/chromeos/policy/device_local_account.h"
69 #include "chromeos/chromeos_switches.h" 70 #include "chromeos/chromeos_switches.h"
70 #include "chromeos/login/login_state.h" 71 #include "chromeos/login/login_state.h"
71 #include "components/user_manager/user.h" 72 #include "components/user_manager/user.h"
72 #include "components/user_manager/user_manager.h" 73 #include "components/user_manager/user_manager.h"
73 #endif 74 #endif
74 75
75 using content::BrowserThread; 76 using content::BrowserThread;
76 77
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 void ExtensionSystemImpl::Shared::InitInstallGates() { 148 void ExtensionSystemImpl::Shared::InitInstallGates() {
148 update_install_gate_.reset(new UpdateInstallGate(extension_service_.get())); 149 update_install_gate_.reset(new UpdateInstallGate(extension_service_.get()));
149 extension_service_->RegisterInstallGate( 150 extension_service_->RegisterInstallGate(
150 ExtensionPrefs::DELAY_REASON_WAIT_FOR_IDLE, update_install_gate_.get()); 151 ExtensionPrefs::DELAY_REASON_WAIT_FOR_IDLE, update_install_gate_.get());
151 extension_service_->RegisterInstallGate( 152 extension_service_->RegisterInstallGate(
152 ExtensionPrefs::DELAY_REASON_GC, 153 ExtensionPrefs::DELAY_REASON_GC,
153 ExtensionGarbageCollector::Get(profile_)); 154 ExtensionGarbageCollector::Get(profile_));
154 extension_service_->RegisterInstallGate( 155 extension_service_->RegisterInstallGate(
155 ExtensionPrefs::DELAY_REASON_WAIT_FOR_IMPORTS, 156 ExtensionPrefs::DELAY_REASON_WAIT_FOR_IMPORTS,
156 extension_service_->shared_module_service()); 157 extension_service_->shared_module_service());
158 #if defined(OS_CHROMEOS)
159 if (chrome::IsRunningInForcedAppMode()) {
160 kiosk_app_update_install_gate_.reset(
161 new chromeos::KioskAppUpdateInstallGate(profile_));
162 extension_service_->RegisterInstallGate(
163 ExtensionPrefs::DELAY_REASON_WAIT_FOR_OS_UPDATE,
164 kiosk_app_update_install_gate_.get());
165 }
166 #endif
157 } 167 }
158 168
159 void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) { 169 void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) {
160 TRACE_EVENT0("browser,startup", "ExtensionSystemImpl::Shared::Init"); 170 TRACE_EVENT0("browser,startup", "ExtensionSystemImpl::Shared::Init");
161 const base::CommandLine* command_line = 171 const base::CommandLine* command_line =
162 base::CommandLine::ForCurrentProcess(); 172 base::CommandLine::ForCurrentProcess();
163 173
164 navigation_observer_.reset(new NavigationObserver(profile_)); 174 navigation_observer_.reset(new NavigationObserver(profile_));
165 175
166 bool allow_noisy_errors = !command_line->HasSwitch(switches::kNoErrorDialogs); 176 bool allow_noisy_errors = !command_line->HasSwitch(switches::kNoErrorDialogs);
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( 466 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts(
457 const std::string& extension_id, 467 const std::string& extension_id,
458 const UnloadedExtensionInfo::Reason reason) { 468 const UnloadedExtensionInfo::Reason reason) {
459 BrowserThread::PostTask( 469 BrowserThread::PostTask(
460 BrowserThread::IO, 470 BrowserThread::IO,
461 FROM_HERE, 471 FROM_HERE,
462 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); 472 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason));
463 } 473 }
464 474
465 } // namespace extensions 475 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_system_impl.h ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698