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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 872433006: Disconnect one click sign in code. The code itself will be removed in followup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix merge Created 5 years, 10 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 | « chrome/browser/about_flags.cc ('k') | chrome/browser/first_run/first_run.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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 798
799 std::string ChromeContentBrowserClient::GetStoragePartitionIdForSite( 799 std::string ChromeContentBrowserClient::GetStoragePartitionIdForSite(
800 content::BrowserContext* browser_context, 800 content::BrowserContext* browser_context,
801 const GURL& site) { 801 const GURL& site) {
802 std::string partition_id; 802 std::string partition_id;
803 803
804 // The partition ID for webview guest processes is the string value of its 804 // The partition ID for webview guest processes is the string value of its
805 // SiteInstance URL - "chrome-guest://app_id/persist?partition". 805 // SiteInstance URL - "chrome-guest://app_id/persist?partition".
806 if (site.SchemeIs(content::kGuestScheme)) { 806 if (site.SchemeIs(content::kGuestScheme)) {
807 partition_id = site.spec(); 807 partition_id = site.spec();
808 } else if (site.GetOrigin().spec() == kChromeUIChromeSigninURL && 808 } else if (site.GetOrigin().spec() == kChromeUIChromeSigninURL) {
809 !switches::IsEnableWebviewBasedSignin()) {
810 // Chrome signin page has an embedded iframe of extension and web content, 809 // Chrome signin page has an embedded iframe of extension and web content,
811 // thus it must be isolated from other webUI pages. 810 // thus it must be isolated from other webUI pages.
812 partition_id = site.GetOrigin().spec(); 811 partition_id = site.GetOrigin().spec();
813 } 812 }
814 813
815 DCHECK(IsValidStoragePartitionId(browser_context, partition_id)); 814 DCHECK(IsValidStoragePartitionId(browser_context, partition_id));
816 return partition_id; 815 return partition_id;
817 } 816 }
818 817
819 bool ChromeContentBrowserClient::IsValidStoragePartitionId( 818 bool ChromeContentBrowserClient::IsValidStoragePartitionId(
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 // the |partition_domain|. The |in_memory| and |partition_name| are only 862 // the |partition_domain|. The |in_memory| and |partition_name| are only
864 // used in guest schemes so they are cleared here. 863 // used in guest schemes so they are cleared here.
865 *partition_domain = site.host(); 864 *partition_domain = site.host();
866 *in_memory = false; 865 *in_memory = false;
867 partition_name->clear(); 866 partition_name->clear();
868 } 867 }
869 success = true; 868 success = true;
870 } 869 }
871 #endif 870 #endif
872 871
873 if (!success && (site.GetOrigin().spec() == kChromeUIChromeSigninURL) && 872 if (!success && (site.GetOrigin().spec() == kChromeUIChromeSigninURL)) {
874 !switches::IsEnableWebviewBasedSignin()) {
875 // Chrome signin page has an embedded iframe of extension and web content, 873 // Chrome signin page has an embedded iframe of extension and web content,
876 // thus it must be isolated from other webUI pages. 874 // thus it must be isolated from other webUI pages.
877 *partition_domain = chrome::kChromeUIChromeSigninHost; 875 *partition_domain = chrome::kChromeUIChromeSigninHost;
878 } 876 }
879 877
880 // Assert that if |can_be_default| is false, the code above must have found a 878 // Assert that if |can_be_default| is false, the code above must have found a
881 // non-default partition. If this fails, the caller has a serious logic 879 // non-default partition. If this fails, the caller has a serious logic
882 // error about which StoragePartition they expect to be in and it is not 880 // error about which StoragePartition they expect to be in and it is not
883 // safe to continue. 881 // safe to continue.
884 CHECK(can_be_default || !partition_domain->empty()); 882 CHECK(can_be_default || !partition_domain->empty());
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
1463 switches::kEnableNaCl, 1461 switches::kEnableNaCl,
1464 #if !defined(DISABLE_NACL) 1462 #if !defined(DISABLE_NACL)
1465 switches::kEnableNaClDebug, 1463 switches::kEnableNaClDebug,
1466 switches::kEnableNaClNonSfiMode, 1464 switches::kEnableNaClNonSfiMode,
1467 #endif 1465 #endif
1468 switches::kEnableNetBenchmarking, 1466 switches::kEnableNetBenchmarking,
1469 switches::kEnableNewBookmarkApps, 1467 switches::kEnableNewBookmarkApps,
1470 switches::kEnableOutOfProcessPdf, 1468 switches::kEnableOutOfProcessPdf,
1471 switches::kEnablePluginPlaceholderShadowDom, 1469 switches::kEnablePluginPlaceholderShadowDom,
1472 switches::kEnableShowModalDialog, 1470 switches::kEnableShowModalDialog,
1473 switches::kEnableWebBasedSignin,
1474 switches::kJavaScriptHarmony, 1471 switches::kJavaScriptHarmony,
1475 switches::kMessageLoopHistogrammer, 1472 switches::kMessageLoopHistogrammer,
1476 switches::kPlaybackMode, 1473 switches::kPlaybackMode,
1477 switches::kPpapiFlashArgs, 1474 switches::kPpapiFlashArgs,
1478 switches::kPpapiFlashPath, 1475 switches::kPpapiFlashPath,
1479 switches::kPpapiFlashVersion, 1476 switches::kPpapiFlashVersion,
1480 switches::kProfilingAtStart, 1477 switches::kProfilingAtStart,
1481 switches::kProfilingFile, 1478 switches::kProfilingFile,
1482 switches::kProfilingFlush, 1479 switches::kProfilingFlush,
1483 switches::kRecordMode, 1480 switches::kRecordMode,
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after
2637 switches::kDisableWebRtcEncryption, 2634 switches::kDisableWebRtcEncryption,
2638 }; 2635 };
2639 to_command_line->CopySwitchesFrom(from_command_line, 2636 to_command_line->CopySwitchesFrom(from_command_line,
2640 kWebRtcDevSwitchNames, 2637 kWebRtcDevSwitchNames,
2641 arraysize(kWebRtcDevSwitchNames)); 2638 arraysize(kWebRtcDevSwitchNames));
2642 } 2639 }
2643 } 2640 }
2644 #endif // defined(ENABLE_WEBRTC) 2641 #endif // defined(ENABLE_WEBRTC)
2645 2642
2646 } // namespace chrome 2643 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/first_run/first_run.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698