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

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

Issue 2542503002: [Offline pages] Fixing OfflinePageUtis::EqualsIgnoringFragment (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | chrome/browser/android/offline_pages/offline_page_utils_unittest.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 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 callback)); 160 callback));
161 } 161 }
162 162
163 // static 163 // static
164 bool OfflinePageUtils::EqualsIgnoringFragment(const GURL& lhs, 164 bool OfflinePageUtils::EqualsIgnoringFragment(const GURL& lhs,
165 const GURL& rhs) { 165 const GURL& rhs) {
166 GURL::Replacements remove_params; 166 GURL::Replacements remove_params;
167 remove_params.ClearRef(); 167 remove_params.ClearRef();
168 168
169 GURL lhs_stripped = lhs.ReplaceComponents(remove_params); 169 GURL lhs_stripped = lhs.ReplaceComponents(remove_params);
170 GURL rhs_stripped = lhs.ReplaceComponents(remove_params); 170 GURL rhs_stripped = rhs.ReplaceComponents(remove_params);
171 171
172 return lhs_stripped == rhs_stripped; 172 return lhs_stripped == rhs_stripped;
173 } 173 }
174 174
175 } // namespace offline_pages 175 } // namespace offline_pages
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/offline_pages/offline_page_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698