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

Unified Diff: chrome/browser/printing/print_dialog_cloud.cc

Issue 7616011: Fix call to GetDefaultBrowser in print cloud because we are no longer guaranteed to have a Defaul... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_dialog_cloud.cc
===================================================================
--- chrome/browser/printing/print_dialog_cloud.cc (revision 96347)
+++ chrome/browser/printing/print_dialog_cloud.cc (working copy)
@@ -11,6 +11,7 @@
#include "base/json/json_reader.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
+#include "chrome/browser/browser_process_impl.h"
#include "chrome/browser/debugger/devtools_window.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/printing/cloud_print/cloud_print_url.h"
@@ -535,7 +536,10 @@
job_title = browser->GetSelectedTabContents()->GetTitle();
profile = browser->GetProfile();
} else {
- profile = ProfileManager::GetDefaultProfile();
+ std::vector<Profile*> loaded_profiles =
+ g_browser_process->profile_manager()->GetLoadedProfiles();
+ DCHECK_GT(loaded_profiles.size(), 0U);
+ profile = loaded_profiles[0];
}
DCHECK(profile);
PrefService* pref_service = profile->GetPrefs();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698