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

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: Add tags to DefaultPrinterSelection policy. Created 5 years, 2 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 100d848e5eae710d43db00bf82eb9b629e6818f0..b782f4ea3d1543fc1b8edb23ba6fdb842778570c 100644
--- a/chrome/browser/resources/print_preview/data/app_state.js
+++ b/chrome/browser/resources/print_preview/data/app_state.js
@@ -149,10 +149,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);
@@ -167,17 +165,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] = '';
- }
- }
},
/**
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/resources/print_preview/data/destination_store.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698