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

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

Issue 2019373002: Fix page transition qualifiers not masked out (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added one more occurrence. Created 4 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/tab_contents/navigation_metrics_recorder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_preview_dialog_controller.h" 5 #include "chrome/browser/printing/print_preview_dialog_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 329
330 if (contents == preview_dialog) { 330 if (contents == preview_dialog) {
331 // Preview dialog navigated. 331 // Preview dialog navigated.
332 if (details) { 332 if (details) {
333 ui::PageTransition transition_type = 333 ui::PageTransition transition_type =
334 details->entry->GetTransitionType(); 334 details->entry->GetTransitionType();
335 content::NavigationType nav_type = details->type; 335 content::NavigationType nav_type = details->type;
336 336
337 // New |preview_dialog| is created. Don't update/erase map entry. 337 // New |preview_dialog| is created. Don't update/erase map entry.
338 if (waiting_for_new_preview_page_ && 338 if (waiting_for_new_preview_page_ &&
339 transition_type == ui::PAGE_TRANSITION_AUTO_TOPLEVEL && 339 ui::PageTransitionCoreTypeIs(transition_type,
340 ui::PAGE_TRANSITION_AUTO_TOPLEVEL) &&
340 nav_type == content::NAVIGATION_TYPE_NEW_PAGE) { 341 nav_type == content::NAVIGATION_TYPE_NEW_PAGE) {
341 waiting_for_new_preview_page_ = false; 342 waiting_for_new_preview_page_ = false;
342 SaveInitiatorTitle(preview_dialog); 343 SaveInitiatorTitle(preview_dialog);
343 return; 344 return;
344 } 345 }
345 346
346 // Cloud print sign-in causes a reload. 347 // Cloud print sign-in causes a reload.
347 if (!waiting_for_new_preview_page_ && 348 if (!waiting_for_new_preview_page_ &&
348 transition_type == ui::PAGE_TRANSITION_RELOAD && 349 ui::PageTransitionCoreTypeIs(transition_type,
350 ui::PAGE_TRANSITION_RELOAD) &&
349 nav_type == content::NAVIGATION_TYPE_EXISTING_PAGE && 351 nav_type == content::NAVIGATION_TYPE_EXISTING_PAGE &&
350 IsPrintPreviewURL(details->previous_url)) { 352 IsPrintPreviewURL(details->previous_url)) {
351 return; 353 return;
352 } 354 }
353 } 355 }
354 NOTREACHED(); 356 NOTREACHED();
355 return; 357 return;
356 } 358 }
357 359
358 RemoveInitiator(contents); 360 RemoveInitiator(contents);
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 if (initiator) { 486 if (initiator) {
485 RemoveObservers(initiator); 487 RemoveObservers(initiator);
486 PrintViewManager::FromWebContents(initiator)->PrintPreviewDone(); 488 PrintViewManager::FromWebContents(initiator)->PrintPreviewDone();
487 } 489 }
488 490
489 preview_dialog_map_.erase(preview_dialog); 491 preview_dialog_map_.erase(preview_dialog);
490 RemoveObservers(preview_dialog); 492 RemoveObservers(preview_dialog);
491 } 493 }
492 494
493 } // namespace printing 495 } // namespace printing
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/tab_contents/navigation_metrics_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698