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

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

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

Powered by Google App Engine
This is Rietveld 408576698