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

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

Issue 11194020: Creates GCP promo for ChromeOS users with no cloud printers. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge with trunk. Created 8 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/destination_store.js
diff --git a/chrome/browser/resources/print_preview/data/destination_store.js b/chrome/browser/resources/print_preview/data/destination_store.js
index be43e58830798b92cf57c3b70cf15ca9ad367dc5..970bc5df4e7d448cac3b4b42e285a046db0506a1 100644
--- a/chrome/browser/resources/print_preview/data/destination_store.js
+++ b/chrome/browser/resources/print_preview/data/destination_store.js
@@ -143,14 +143,6 @@ cr.define('print_preview', function() {
};
/**
- * Number of built-in print destinations. This includes the "Save as PDF"
- * destination.
- * @type {number}
- * @const
- */
- DestinationStore.BUILT_IN_DESTINATION_COUNT = 1;
-
- /**
* Delay in milliseconds before the destination store ignores the initial
* destination ID and just selects any printer (since the initial destination
* was not found).
@@ -283,6 +275,18 @@ cr.define('print_preview', function() {
}
},
+ /**
+ * @return {boolean} Whether only default cloud destinations have been
+ * loaded.
+ */
+ hasOnlyDefaultCloudDestinations: function() {
+ return this.destinations_.every(function(dest) {
+ return dest.isLocal ||
+ dest.id == print_preview.Destination.GooglePromotedId.DOCS ||
+ dest.id == print_preview.Destination.GooglePromotedId.FEDEX;
+ });
+ },
+
/** @param {!print_preview.Destination} Destination to select. */
selectDestination: function(destination) {
this.selectedDestination_ = destination;
« no previous file with comments | « chrome/browser/resources/print_preview/data/app_state.js ('k') | chrome/browser/resources/print_preview/metrics.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698