| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/printing/print_dialog_cloud.h" | 5 #include "chrome/browser/printing/print_dialog_cloud.h" | 
| 6 #include "chrome/browser/printing/print_dialog_cloud_internal.h" | 6 #include "chrome/browser/printing/print_dialog_cloud_internal.h" | 
| 7 | 7 | 
| 8 #include "base/base64.h" | 8 #include "base/base64.h" | 
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" | 
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" | 
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 526       job_title = browser->GetSelectedTabContents()->GetTitle(); | 526       job_title = browser->GetSelectedTabContents()->GetTitle(); | 
| 527     profile = browser->GetProfile(); | 527     profile = browser->GetProfile(); | 
| 528   } else { | 528   } else { | 
| 529     profile = ProfileManager::GetDefaultProfile(); | 529     profile = ProfileManager::GetDefaultProfile(); | 
| 530   } | 530   } | 
| 531   DCHECK(profile); | 531   DCHECK(profile); | 
| 532   PrefService* pref_service = profile->GetPrefs(); | 532   PrefService* pref_service = profile->GetPrefs(); | 
| 533   DCHECK(pref_service); | 533   DCHECK(pref_service); | 
| 534   if (!pref_service->FindPreference(prefs::kCloudPrintDialogWidth)) { | 534   if (!pref_service->FindPreference(prefs::kCloudPrintDialogWidth)) { | 
| 535     pref_service->RegisterIntegerPref(prefs::kCloudPrintDialogWidth, | 535     pref_service->RegisterIntegerPref(prefs::kCloudPrintDialogWidth, | 
| 536                                       kDefaultWidth); | 536                                       kDefaultWidth, | 
|  | 537                                       false /* don't sync pref */); | 
| 537   } | 538   } | 
| 538   if (!pref_service->FindPreference(prefs::kCloudPrintDialogHeight)) { | 539   if (!pref_service->FindPreference(prefs::kCloudPrintDialogHeight)) { | 
| 539     pref_service->RegisterIntegerPref(prefs::kCloudPrintDialogHeight, | 540     pref_service->RegisterIntegerPref(prefs::kCloudPrintDialogHeight, | 
| 540                                       kDefaultHeight); | 541                                       kDefaultHeight, | 
|  | 542                                       false /* don't sync pref */); | 
| 541   } | 543   } | 
| 542 | 544 | 
| 543   int width = pref_service->GetInteger(prefs::kCloudPrintDialogWidth); | 545   int width = pref_service->GetInteger(prefs::kCloudPrintDialogWidth); | 
| 544   int height = pref_service->GetInteger(prefs::kCloudPrintDialogHeight); | 546   int height = pref_service->GetInteger(prefs::kCloudPrintDialogHeight); | 
| 545 | 547 | 
| 546   HtmlDialogUIDelegate* dialog_delegate = | 548   HtmlDialogUIDelegate* dialog_delegate = | 
| 547       new internal_cloud_print_helpers::CloudPrintHtmlDialogDelegate( | 549       new internal_cloud_print_helpers::CloudPrintHtmlDialogDelegate( | 
| 548           path_to_file, width, height, std::string(), job_title, file_type, | 550           path_to_file, width, height, std::string(), job_title, file_type, | 
| 549           modal); | 551           modal); | 
| 550   if (modal) { | 552   if (modal) { | 
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 613                                                    print_job_title, | 615                                                    print_job_title, | 
| 614                                                    file_type, | 616                                                    file_type, | 
| 615                                                    false); | 617                                                    false); | 
| 616       return true; | 618       return true; | 
| 617     } | 619     } | 
| 618   } | 620   } | 
| 619   return false; | 621   return false; | 
| 620 } | 622 } | 
| 621 | 623 | 
| 622 }  // end namespace | 624 }  // end namespace | 
| OLD | NEW | 
|---|