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

Side by Side Diff: chrome/installer/util/l10n_string_util.cc

Issue 6317016: Change UTF8ToUTF16 to accept const StringPiece&. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 11 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/common/service_process_util.cc ('k') | chrome/renderer/localized_error.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // This file defines specific implementation of BrowserDistribution class for 5 // This file defines specific implementation of BrowserDistribution class for
6 // Google Chrome. 6 // Google Chrome.
7 7
8 #include <algorithm>
9
8 #include <atlbase.h> 10 #include <atlbase.h>
9 11
10 #include "base/logging.h" 12 #include "base/logging.h"
11 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
12 #include "base/string_util.h" 14 #include "base/string_util.h"
13 #include "chrome/installer/util/language_selector.h" 15 #include "chrome/installer/util/language_selector.h"
14 16
15 namespace { 17 namespace {
16 18
17 const installer::LanguageSelector& GetLanguageSelector() { 19 const installer::LanguageSelector& GetLanguageSelector() {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 DWORD count = static_cast<DWORD>(url_path.size() * 3); 71 DWORD count = static_cast<DWORD>(url_path.size() * 3);
70 scoped_array<wchar_t> url_canon(new wchar_t[count]); 72 scoped_array<wchar_t> url_canon(new wchar_t[count]);
71 HRESULT hr = ::UrlCanonicalizeW(url_path.c_str(), url_canon.get(), 73 HRESULT hr = ::UrlCanonicalizeW(url_path.c_str(), url_canon.get(),
72 &count, URL_ESCAPE_UNSAFE); 74 &count, URL_ESCAPE_UNSAFE);
73 if (SUCCEEDED(hr)) 75 if (SUCCEEDED(hr))
74 return std::wstring(url_canon.get()); 76 return std::wstring(url_canon.get());
75 return url_path; 77 return url_path;
76 } 78 }
77 79
78 } // namespace installer 80 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/common/service_process_util.cc ('k') | chrome/renderer/localized_error.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698