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

Side by Side Diff: chrome/browser/policy/policy_helpers.cc

Issue 2478573004: Convert GURL::{host,path} to GURL::{host_piece,path_piece} for ==. (Closed)
Patch Set: rebase to #431874 Created 4 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/policy/policy_helpers.h" 5 #include "chrome/browser/policy/policy_helpers.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "net/base/net_errors.h" 8 #include "net/base/net_errors.h"
9 #include "url/gurl.h" 9 #include "url/gurl.h"
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 *block = true; 42 *block = true;
43 return true; 43 return true;
44 #else 44 #else
45 static const char kServiceLoginAuth[] = "/ServiceLoginAuth"; 45 static const char kServiceLoginAuth[] = "/ServiceLoginAuth";
46 46
47 *block = false; 47 *block = false;
48 // Additionally whitelist /ServiceLoginAuth. 48 // Additionally whitelist /ServiceLoginAuth.
49 if (url.GetOrigin() != GaiaUrls::GetInstance()->gaia_url().GetOrigin()) 49 if (url.GetOrigin() != GaiaUrls::GetInstance()->gaia_url().GetOrigin())
50 return false; 50 return false;
51 51
52 return url.path() == kServiceLoginAuth; 52 return url.path_piece() == kServiceLoginAuth;
53 #endif 53 #endif
54 } 54 }
55 55
56 } // namespace policy 56 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698