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

Unified Diff: chrome/browser/resources/print_preview/data/app_state.js

Issue 1368013004: Define Print Preview default printer selection policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/print_preview/data/app_state.js
diff --git a/chrome/browser/resources/print_preview/data/app_state.js b/chrome/browser/resources/print_preview/data/app_state.js
index a221f7a5e722def026dccc0d24378d85a7a88464..2136cb6456f154a68187973f70169656df9d0af5 100644
--- a/chrome/browser/resources/print_preview/data/app_state.js
+++ b/chrome/browser/resources/print_preview/data/app_state.js
@@ -148,10 +148,8 @@ cr.define('print_preview', function() {
* layer.
* @param {?string} serializedAppStateStr Serialized string representation
* of the app state.
- * @param {?string} systemDefaultDestinationId ID of the system default
- * destination.
*/
- init: function(serializedAppStateStr, systemDefaultDestinationId) {
+ init: function(serializedAppStateStr) {
if (serializedAppStateStr) {
try {
var state = JSON.parse(serializedAppStateStr);
@@ -166,17 +164,6 @@ cr.define('print_preview', function() {
// Set some state defaults.
this.state_[AppState.Field.IS_GCP_PROMO_DISMISSED] = false;
}
- // Default to system destination, if no destination was selected.
- if (!this.state_[AppState.Field.SELECTED_DESTINATION_ID] ||
- !this.state_[AppState.Field.SELECTED_DESTINATION_ORIGIN]) {
- if (systemDefaultDestinationId) {
- this.state_[AppState.Field.SELECTED_DESTINATION_ID] =
- systemDefaultDestinationId;
- this.state_[AppState.Field.SELECTED_DESTINATION_ORIGIN] =
- print_preview.Destination.Origin.LOCAL;
- this.state_[AppState.Field.SELECTED_DESTINATION_ACCOUNT] = '';
- }
- }
},
/**

Powered by Google App Engine
This is Rietveld 408576698