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

Side by Side Diff: chrome/browser/printing/print_dialog_cloud.cc

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 7 years, 12 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 const int kDefaultWidth = 912; 525 const int kDefaultWidth = 912;
526 const int kDefaultHeight = 633; 526 const int kDefaultHeight = 633;
527 if (!browser_context) { 527 if (!browser_context) {
528 *width = kDefaultWidth; 528 *width = kDefaultWidth;
529 *height = kDefaultHeight; 529 *height = kDefaultHeight;
530 return; 530 return;
531 } 531 }
532 532
533 Profile* profile = Profile::FromBrowserContext(browser_context); 533 Profile* profile = Profile::FromBrowserContext(browser_context);
534 if (!profile->GetPrefs()->FindPreference(prefs::kCloudPrintDialogWidth)) { 534 if (!profile->GetPrefs()->FindPreference(prefs::kCloudPrintDialogWidth)) {
535 profile->GetPrefs()->RegisterIntegerPref(prefs::kCloudPrintDialogWidth, 535 profile->GetPrefs()->RegisterIntegerPref(
536 kDefaultWidth, 536 prefs::kCloudPrintDialogWidth,
537 PrefService::UNSYNCABLE_PREF); 537 kDefaultWidth,
538 PrefServiceSyncable::UNSYNCABLE_PREF);
538 } 539 }
539 if (!profile->GetPrefs()->FindPreference(prefs::kCloudPrintDialogHeight)) { 540 if (!profile->GetPrefs()->FindPreference(prefs::kCloudPrintDialogHeight)) {
540 profile->GetPrefs()->RegisterIntegerPref(prefs::kCloudPrintDialogHeight, 541 profile->GetPrefs()->RegisterIntegerPref(
541 kDefaultHeight, 542 prefs::kCloudPrintDialogHeight,
542 PrefService::UNSYNCABLE_PREF); 543 kDefaultHeight,
544 PrefServiceSyncable::UNSYNCABLE_PREF);
543 } 545 }
544 546
545 *width = profile->GetPrefs()->GetInteger(prefs::kCloudPrintDialogWidth); 547 *width = profile->GetPrefs()->GetInteger(prefs::kCloudPrintDialogWidth);
546 *height = profile->GetPrefs()->GetInteger(prefs::kCloudPrintDialogHeight); 548 *height = profile->GetPrefs()->GetInteger(prefs::kCloudPrintDialogHeight);
547 } 549 }
548 550
549 void CloudPrintWebDialogDelegate::Init(content::BrowserContext* browser_context, 551 void CloudPrintWebDialogDelegate::Init(content::BrowserContext* browser_context,
550 const std::string& json_arguments) { 552 const std::string& json_arguments) {
551 // This information is needed to show the dialog HTML content. 553 // This information is needed to show the dialog HTML content.
552 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 554 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 print_job_print_ticket, 834 print_job_print_ticket,
833 file_type, 835 file_type,
834 delete_on_close); 836 delete_on_close);
835 return true; 837 return true;
836 } 838 }
837 } 839 }
838 return false; 840 return false;
839 } 841 }
840 842
841 } // end namespace 843 } // end namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698