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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_util.cc

Issue 171012: Use 'icu::' namespace explicitly (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/history/snippet.cc ('k') | chrome/browser/spellcheck_worditerator.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/safe_browsing/safe_browsing_util.h" 5 #include "chrome/browser/safe_browsing/safe_browsing_util.h"
6 6
7 #include "base/hmac.h" 7 #include "base/hmac.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/sha2.h" 9 #include "base/sha2.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 while (!chunks->front().hosts.empty()) { 186 while (!chunks->front().hosts.empty()) {
187 chunks->front().hosts.front().entry->Destroy(); 187 chunks->front().hosts.front().entry->Destroy();
188 chunks->front().hosts.pop_front(); 188 chunks->front().hosts.pop_front();
189 } 189 }
190 chunks->pop_front(); 190 chunks->pop_front();
191 } 191 }
192 } 192 }
193 193
194 GURL GeneratePhishingReportUrl(const std::string& report_page, 194 GURL GeneratePhishingReportUrl(const std::string& report_page,
195 const std::string& url_to_report) { 195 const std::string& url_to_report) {
196 Locale locale = Locale::getDefault(); 196 icu::Locale locale = icu::Locale::getDefault();
197 const char* lang = locale.getLanguage(); 197 const char* lang = locale.getLanguage();
198 if (!lang) 198 if (!lang)
199 lang = "en"; // fallback 199 lang = "en"; // fallback
200 const std::string continue_esc = 200 const std::string continue_esc =
201 EscapeQueryParamValue(StringPrintf(kContinueUrlFormat, lang)); 201 EscapeQueryParamValue(StringPrintf(kContinueUrlFormat, lang));
202 const std::string current_esc = EscapeQueryParamValue(url_to_report); 202 const std::string current_esc = EscapeQueryParamValue(url_to_report);
203 const std::string format = report_page + kReportParams; 203 const std::string format = report_page + kReportParams;
204 GURL report_url(StringPrintf(format.c_str(), 204 GURL report_url(StringPrintf(format.c_str(),
205 continue_esc.c_str(), 205 continue_esc.c_str(),
206 current_esc.c_str())); 206 current_esc.c_str()));
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 630
631 // Validate that the next entry is wholly contained inside of |data_|. 631 // Validate that the next entry is wholly contained inside of |data_|.
632 const char* end = data_.get() + size_; 632 const char* end = data_.get() + size_;
633 if (next + SBEntry::kMinSize <= end && next + next_entry->Size() <= end) { 633 if (next + SBEntry::kMinSize <= end && next + next_entry->Size() <= end) {
634 *entry = next_entry; 634 *entry = next_entry;
635 return true; 635 return true;
636 } 636 }
637 637
638 return false; 638 return false;
639 } 639 }
OLDNEW
« no previous file with comments | « chrome/browser/history/snippet.cc ('k') | chrome/browser/spellcheck_worditerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698