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

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

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fix. And rebase Created 9 years, 7 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) 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
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 PrefService::UNSYNCABLE_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 PrefService::UNSYNCABLE_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
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
OLDNEW
« no previous file with comments | « chrome/browser/printing/cloud_print/cloud_print_url.cc ('k') | chrome/browser/profiles/profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698