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

Side by Side Diff: chrome/browser/chromeos/app_mode/kiosk_external_updater.h

Issue 540673003: Add more browser tests for Kiosk update from usb stick. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove TestObsesrver. Created 6 years, 3 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 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 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_EXTERNAL_UPDATER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_EXTERNAL_UPDATER_H_
6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_EXTERNAL_UPDATER_H_ 6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_EXTERNAL_UPDATER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/observer_list.h"
13 #include "base/sequenced_task_runner.h" 14 #include "base/sequenced_task_runner.h"
14 #include "chrome/browser/chromeos/app_mode/kiosk_external_update_validator.h" 15 #include "chrome/browser/chromeos/app_mode/kiosk_external_update_validator.h"
15 #include "chromeos/disks/disk_mount_manager.h" 16 #include "chromeos/disks/disk_mount_manager.h"
16 17
17 namespace chromeos { 18 namespace chromeos {
18 19
19 class KioskExternalUpdateNotification; 20 class KioskExternalUpdateNotification;
20 21
21 // Observes the disk mount/unmount events, scans the usb stick for external 22 // Observes the disk mount/unmount events, scans the usb stick for external
22 // kiosk app updates, validates the external crx, and updates the cache. 23 // kiosk app updates, validates the external crx, and updates the cache.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // Returns true if |external_update_| is interrupted before the updating 83 // Returns true if |external_update_| is interrupted before the updating
83 // completes. 84 // completes.
84 bool CheckExternalUpdateInterrupted(); 85 bool CheckExternalUpdateInterrupted();
85 86
86 // Validates the external updates. 87 // Validates the external updates.
87 void ValidateExternalUpdates(); 88 void ValidateExternalUpdates();
88 89
89 // Returns true if there are any external updates pending. 90 // Returns true if there are any external updates pending.
90 bool IsExternalUpdatePending(); 91 bool IsExternalUpdatePending();
91 92
93 // Returns true if all external updates specified in the manifest are
94 // completed successfully.
95 bool IsAllExternalUpdatesSucceeded();
96
92 // Returns true if the app with |app_id| should be updated to 97 // Returns true if the app with |app_id| should be updated to
93 // |external_extension|. 98 // |external_extension|.
94 bool ShouldDoExternalUpdate(const std::string& app_id, 99 bool ShouldDoExternalUpdate(const std::string& app_id,
95 const std::string& version, 100 const std::string& version,
96 const std::string& min_browser_version); 101 const std::string& min_browser_version);
97 102
98 // Installs the validated extension into cache. 103 // Installs the validated extension into cache.
99 // |*crx_copied| indicates whether the |crx_file| is copied successfully. 104 // |*crx_copied| indicates whether the |crx_file| is copied successfully.
100 void PutValidatedExtension(bool* crx_copied, 105 void PutValidatedExtension(bool* crx_copied,
101 const std::string& app_id, 106 const std::string& app_id,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 scoped_ptr<KioskExternalUpdateNotification> notification_; 145 scoped_ptr<KioskExternalUpdateNotification> notification_;
141 146
142 base::WeakPtrFactory<KioskExternalUpdater> weak_factory_; 147 base::WeakPtrFactory<KioskExternalUpdater> weak_factory_;
143 148
144 DISALLOW_COPY_AND_ASSIGN(KioskExternalUpdater); 149 DISALLOW_COPY_AND_ASSIGN(KioskExternalUpdater);
145 }; 150 };
146 151
147 } // namespace chromeos 152 } // namespace chromeos
148 153
149 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_EXTERNAL_UPDATER_H_ 154 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_EXTERNAL_UPDATER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698