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

Side by Side Diff: chrome/browser/extensions/updater/extension_updater_unittest.cc

Issue 1101173004: Switch remaining functions from SchemeIsSecure() to SchemeIsCryptographic(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 <list> 5 #include <list>
6 #include <map> 6 #include <map>
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 RunUntilIdle(); 1304 RunUntilIdle();
1305 1305
1306 bool using_oauth2 = false; 1306 bool using_oauth2 = false;
1307 int expected_load_flags = kExpectedLoadFlags; 1307 int expected_load_flags = kExpectedLoadFlags;
1308 // Verify that the fetch has had its credentials properly incremented. 1308 // Verify that the fetch has had its credentials properly incremented.
1309 fetcher = factory.GetFetcherByID(ExtensionDownloader::kExtensionFetcherId); 1309 fetcher = factory.GetFetcherByID(ExtensionDownloader::kExtensionFetcherId);
1310 EXPECT_TRUE(fetcher != NULL && fetcher->delegate() != NULL); 1310 EXPECT_TRUE(fetcher != NULL && fetcher->delegate() != NULL);
1311 net::HttpRequestHeaders fetch_headers; 1311 net::HttpRequestHeaders fetch_headers;
1312 fetcher->GetExtraRequestHeaders(&fetch_headers); 1312 fetcher->GetExtraRequestHeaders(&fetch_headers);
1313 // If the download URL is not https, no credentials should be provided. 1313 // If the download URL is not https, no credentials should be provided.
1314 if (!test_url.SchemeIsSecure()) { 1314 if (!test_url.SchemeIsCryptographic()) {
1315 // No cookies. 1315 // No cookies.
1316 EXPECT_EQ(kExpectedLoadFlags, fetcher->GetLoadFlags()); 1316 EXPECT_EQ(kExpectedLoadFlags, fetcher->GetLoadFlags());
1317 // No Authorization header. 1317 // No Authorization header.
1318 EXPECT_FALSE(fetch_headers.HasHeader( 1318 EXPECT_FALSE(fetch_headers.HasHeader(
1319 net::HttpRequestHeaders::kAuthorization)); 1319 net::HttpRequestHeaders::kAuthorization));
1320 expected_load_flags = kExpectedLoadFlags; 1320 expected_load_flags = kExpectedLoadFlags;
1321 } else { 1321 } else {
1322 // HTTPS is in use, so credentials are allowed. 1322 // HTTPS is in use, so credentials are allowed.
1323 if (enable_oauth2 && test_url.DomainIs("google.com")) { 1323 if (enable_oauth2 && test_url.DomainIs("google.com")) {
1324 // If an IdentityProvider is present and the URL is a google.com 1324 // If an IdentityProvider is present and the URL is a google.com
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
2250 // -prodversionmin (shouldn't update if browser version too old) 2250 // -prodversionmin (shouldn't update if browser version too old)
2251 // -manifests & updates arriving out of order / interleaved 2251 // -manifests & updates arriving out of order / interleaved
2252 // -malformed update url (empty, file://, has query, has a # fragment, etc.) 2252 // -malformed update url (empty, file://, has query, has a # fragment, etc.)
2253 // -An extension gets uninstalled while updates are in progress (so it doesn't 2253 // -An extension gets uninstalled while updates are in progress (so it doesn't
2254 // "come back from the dead") 2254 // "come back from the dead")
2255 // -An extension gets manually updated to v3 while we're downloading v2 (ie 2255 // -An extension gets manually updated to v3 while we're downloading v2 (ie
2256 // you don't get downgraded accidentally) 2256 // you don't get downgraded accidentally)
2257 // -An update manifest mentions multiple updates 2257 // -An update manifest mentions multiple updates
2258 2258
2259 } // namespace extensions 2259 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_store_mac.cc » ('j') | net/cookies/canonical_cookie.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698