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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_helper.cc

Issue 839193002: Move ServiceAccessType into //components/keyed_service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on android Created 5 years, 11 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
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/sync/one_click_signin_helper.h" 5 #include "chrome/browser/ui/sync/one_click_signin_helper.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 content::RenderFrameHost* render_frame_host, 452 content::RenderFrameHost* render_frame_host,
453 const GURL& url, 453 const GURL& url,
454 ui::PageTransition transition_type) { 454 ui::PageTransition transition_type) {
455 // Return early if this is not top-level navigation. 455 // Return early if this is not top-level navigation.
456 if (render_frame_host->GetParent()) 456 if (render_frame_host->GetParent())
457 return; 457 return;
458 458
459 content::NavigationController* nc = &web_contents()->GetController(); 459 content::NavigationController* nc = &web_contents()->GetController();
460 HistoryService* hs = HistoryServiceFactory::GetForProfile( 460 HistoryService* hs = HistoryServiceFactory::GetForProfile(
461 Profile::FromBrowserContext(web_contents()->GetBrowserContext()), 461 Profile::FromBrowserContext(web_contents()->GetBrowserContext()),
462 Profile::IMPLICIT_ACCESS); 462 ServiceAccessType::IMPLICIT_ACCESS);
463 463
464 // Have to wait until something else gets added to history before removal. 464 // Have to wait until something else gets added to history before removal.
465 if (history_index_to_remove_ < nc->GetLastCommittedEntryIndex()) { 465 if (history_index_to_remove_ < nc->GetLastCommittedEntryIndex()) {
466 content::NavigationEntry* entry = 466 content::NavigationEntry* entry =
467 nc->GetEntryAtIndex(history_index_to_remove_); 467 nc->GetEntryAtIndex(history_index_to_remove_);
468 if (signin::IsContinueUrlForWebBasedSigninFlow(entry->GetURL())) { 468 if (signin::IsContinueUrlForWebBasedSigninFlow(entry->GetURL())) {
469 hs->DeleteURL(entry->GetURL()); 469 hs->DeleteURL(entry->GetURL());
470 nc->RemoveEntryAtIndex(history_index_to_remove_); 470 nc->RemoveEntryAtIndex(history_index_to_remove_);
471 delete this; // Success. 471 delete this; // Success.
472 } 472 }
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1501 // If the web contents is showing a blank page and not about to be closed, 1501 // If the web contents is showing a blank page and not about to be closed,
1502 // redirect to the NTP or apps page. 1502 // redirect to the NTP or apps page.
1503 if (signin::IsContinueUrlForWebBasedSigninFlow(current_url) && 1503 if (signin::IsContinueUrlForWebBasedSigninFlow(current_url) &&
1504 !signin::IsAutoCloseEnabledInURL(original_continue_url_)) { 1504 !signin::IsAutoCloseEnabledInURL(original_continue_url_)) {
1505 RedirectToNtpOrAppsPage( 1505 RedirectToNtpOrAppsPage(
1506 web_contents(), 1506 web_contents(),
1507 signin::GetSourceForPromoURL(original_continue_url_)); 1507 signin::GetSourceForPromoURL(original_continue_url_));
1508 } 1508 }
1509 } 1509 }
1510 } 1510 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698