|
Use stub impl when libcros fails to load
Previous behavior would either:
a. Successfully load libcros. CrosLibrary::EnsureLoaded() returns true. Calls to libcros succeed.
b. Fail to load libcros. CrosLibrary::EnsureLoaded() returns false. Login is blocked. Calls to libcros fail (crash) if not protected and login is skipped for debugging.
c. Load a stub implementation if --stub-cros is specified. CrosLibrary::EnsureLoaded() returns true. Calls to libcros fail (crash).
Problems with this behavior:
1. CrosLibrary::EnsureLoaded() would be used incorrectly to protect calls to libcros outside of CrosLibrary non-stub implementations.
2. CrosLibrary non-stub implementations would still be called if libcros failed to load, so all calls to libcros in the non-stub implementations needed to be protected.
New behavior:
a. Successfully load libcros. CrosLibrary::libcros_loaded() returns true. Calls to libcros succeed.
b. Fail to load libcros. CrosLibrary::libcros_loaded() returns false. Stub implementation is used instead. load_error_string() specifies an error and login is blocked.
c. Load a stub implementation if --stub-cros is specified. CrosLibrary::libcros_loaded() returns false. Stub implementation is used.
BUG= chromium-os:20350
TEST=Test chrome for chromeos on linux and chromeos, with and without --stub-cros
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=101876
Total comments: 11
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+270 lines, -297 lines) |
Patch |
|
M |
chrome/browser/chromeos/cros/brightness_library.cc
|
View
|
1
2
|
2 chunks |
+6 lines, -9 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chromeos/cros/burn_library.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chromeos/cros/burn_library.cc
|
View
|
|
5 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chromeos/cros/cros_library.cc
|
View
|
1
2
3
|
2 chunks |
+9 lines, -4 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chromeos/cros/cryptohome_library.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chromeos/cros/cryptohome_library.cc
|
View
|
|
13 chunks |
+112 lines, -97 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chromeos/cros/login_library.h
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chromeos/cros/login_library.cc
|
View
|
1
2
3
|
5 chunks |
+43 lines, -32 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chromeos/cros/mock_cryptohome_library.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chromeos/cros/mock_login_library.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chromeos/cros/mock_mount_library.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chromeos/cros/mount_library.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chromeos/cros/mount_library.cc
|
View
|
1
2
|
9 chunks |
+42 lines, -78 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chromeos/cros/network_library.cc
|
View
|
1
2
3
|
1 chunk |
+0 lines, -7 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chromeos/cros/power_library.cc
|
View
|
1
2
3
|
3 chunks |
+7 lines, -13 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chromeos/cros/screen_lock_library.cc
|
View
|
|
1 chunk |
+3 lines, -4 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chromeos/cros/speech_synthesis_library.cc
|
View
|
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chromeos/cros/update_library.cc
|
View
|
|
2 chunks |
+9 lines, -16 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chromeos/status/power_menu_button.cc
|
View
|
1
2
3
|
3 chunks |
+15 lines, -26 lines |
0 comments
|
Download
|
Total messages: 8 (0 generated)
|