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

Side by Side Diff: chrome/browser/android/offline_pages/offline_page_utils.cc

Issue 2535023002: [Offline pages] Fixing OfflinePageUtis::EqualsIgnoringFragment (Closed)
Patch Set: Fixing a previews test Created 4 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/android/offline_pages/offline_page_utils.h" 5 #include "chrome/browser/android/offline_pages/offline_page_utils.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 callback)); 206 callback));
207 } 207 }
208 208
209 // static 209 // static
210 bool OfflinePageUtils::EqualsIgnoringFragment(const GURL& lhs, 210 bool OfflinePageUtils::EqualsIgnoringFragment(const GURL& lhs,
211 const GURL& rhs) { 211 const GURL& rhs) {
212 GURL::Replacements remove_params; 212 GURL::Replacements remove_params;
213 remove_params.ClearRef(); 213 remove_params.ClearRef();
214 214
215 GURL lhs_stripped = lhs.ReplaceComponents(remove_params); 215 GURL lhs_stripped = lhs.ReplaceComponents(remove_params);
216 GURL rhs_stripped = lhs.ReplaceComponents(remove_params); 216 GURL rhs_stripped = rhs.ReplaceComponents(remove_params);
217 217
218 return lhs_stripped == rhs_stripped; 218 return lhs_stripped == rhs_stripped;
219 } 219 }
220 220
221 } // namespace offline_pages 221 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698