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

Side by Side Diff: chrome/browser/ui/webui/print_preview/print_preview_handler.cc

Issue 66993003: Most references to GetActiveEntry removed from chrome/browser/ui. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updates from nasko comments Created 7 years, 1 month 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/ui/webui/print_preview/print_preview_handler.h" 5 #include "chrome/browser/ui/webui/print_preview/print_preview_handler.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 bool display_header_footer = false; 620 bool display_header_footer = false;
621 if (!settings->GetBoolean(printing::kSettingHeaderFooterEnabled, 621 if (!settings->GetBoolean(printing::kSettingHeaderFooterEnabled,
622 &display_header_footer)) { 622 &display_header_footer)) {
623 NOTREACHED(); 623 NOTREACHED();
624 } 624 }
625 if (display_header_footer) { 625 if (display_header_footer) {
626 settings->SetString(printing::kSettingHeaderFooterTitle, 626 settings->SetString(printing::kSettingHeaderFooterTitle,
627 initiator->GetTitle()); 627 initiator->GetTitle());
628 std::string url; 628 std::string url;
629 content::NavigationEntry* entry = 629 content::NavigationEntry* entry =
630 initiator->GetController().GetActiveEntry(); 630 initiator->GetController().GetLastCommittedEntry();
Charlie Reis 2013/11/12 01:09:29 Aha! That's a real bug in Chrome today. If you h
jww 2013/11/12 22:32:50 Awesome!
631 if (entry) 631 if (entry)
632 url = entry->GetVirtualURL().spec(); 632 url = entry->GetVirtualURL().spec();
633 settings->SetString(printing::kSettingHeaderFooterURL, url); 633 settings->SetString(printing::kSettingHeaderFooterURL, url);
634 } 634 }
635 635
636 bool generate_draft_data = false; 636 bool generate_draft_data = false;
637 bool success = settings->GetBoolean(printing::kSettingGenerateDraftData, 637 bool success = settings->GetBoolean(printing::kSettingGenerateDraftData,
638 &generate_draft_data); 638 &generate_draft_data);
639 DCHECK(success); 639 DCHECK(success);
640 640
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
1326 void PrintPreviewHandler::LocalPrinterCacheFlushed() { 1326 void PrintPreviewHandler::LocalPrinterCacheFlushed() {
1327 } 1327 }
1328 1328
1329 void PrintPreviewHandler::StopPrivetPrinterSearch() { 1329 void PrintPreviewHandler::StopPrivetPrinterSearch() {
1330 printer_lister_.reset(); 1330 printer_lister_.reset();
1331 service_discovery_client_ = NULL; 1331 service_discovery_client_ = NULL;
1332 web_ui()->CallJavascriptFunction("onPrivetPrinterSearchDone"); 1332 web_ui()->CallJavascriptFunction("onPrivetPrinterSearchDone");
1333 } 1333 }
1334 1334
1335 #endif 1335 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698