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/chromeos/app_mode/startup_app_launcher.cc

Issue 897083003: Call InstallTracker::RemoveObserver when StartupAppLauncher is destroyed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | no next file » | 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/chromeos/app_mode/startup_app_launcher.h" 5 #include "chrome/browser/chromeos/app_mode/startup_app_launcher.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/json/json_file_value_serializer.h" 9 #include "base/json/json_file_value_serializer.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 KioskAppManager::Get()->AddObserver(this); 83 KioskAppManager::Get()->AddObserver(this);
84 } 84 }
85 85
86 StartupAppLauncher::~StartupAppLauncher() { 86 StartupAppLauncher::~StartupAppLauncher() {
87 KioskAppManager::Get()->RemoveObserver(this); 87 KioskAppManager::Get()->RemoveObserver(this);
88 88
89 // StartupAppLauncher can be deleted at anytime during the launch process 89 // StartupAppLauncher can be deleted at anytime during the launch process
90 // through a user bailout shortcut. 90 // through a user bailout shortcut.
91 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_) 91 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)
92 ->RemoveObserver(this); 92 ->RemoveObserver(this);
93 extensions::InstallTrackerFactory::GetForBrowserContext(profile_)
94 ->RemoveObserver(this);
93 } 95 }
94 96
95 void StartupAppLauncher::Initialize() { 97 void StartupAppLauncher::Initialize() {
96 StartLoadingOAuthFile(); 98 StartLoadingOAuthFile();
97 } 99 }
98 100
99 void StartupAppLauncher::ContinueWithNetworkReady() { 101 void StartupAppLauncher::ContinueWithNetworkReady() {
100 if (!network_ready_handled_) { 102 if (!network_ready_handled_) {
101 network_ready_handled_ = true; 103 network_ready_handled_ = true;
102 // The network might not be ready when KioskAppManager tries to update 104 // The network might not be ready when KioskAppManager tries to update
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 UpdateAppData(); 397 UpdateAppData();
396 delegate_->OnReadyToLaunch(); 398 delegate_->OnReadyToLaunch();
397 } 399 }
398 400
399 void StartupAppLauncher::UpdateAppData() { 401 void StartupAppLauncher::UpdateAppData() {
400 KioskAppManager::Get()->ClearAppData(app_id_); 402 KioskAppManager::Get()->ClearAppData(app_id_);
401 KioskAppManager::Get()->UpdateAppDataFromProfile(app_id_, profile_, NULL); 403 KioskAppManager::Get()->UpdateAppDataFromProfile(app_id_, profile_, NULL);
402 } 404 }
403 405
404 } // namespace chromeos 406 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698