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

Side by Side Diff: app/clipboard/clipboard_util_win.cc

Issue 830002: win: string_util.h -> utf_string_conversions.h fix. (Closed)
Patch Set: Don't remove utf_string_conversions.h from string_util.h just yet Created 10 years, 9 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
« no previous file with comments | « no previous file | app/clipboard/clipboard_win.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/clipboard/clipboard_util_win.h" 5 #include "app/clipboard/clipboard_util_win.h"
6 6
7 #include <shellapi.h> 7 #include <shellapi.h>
8 #include <shlwapi.h> 8 #include <shlwapi.h>
9 #include <wininet.h> 9 #include <wininet.h>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/scoped_handle.h" 13 #include "base/scoped_handle.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "base/utf_string_conversions.h"
15 16
16 namespace { 17 namespace {
17 18
18 bool GetUrlFromHDrop(IDataObject* data_object, std::wstring* url, 19 bool GetUrlFromHDrop(IDataObject* data_object, std::wstring* url,
19 std::wstring* title) { 20 std::wstring* title) {
20 DCHECK(data_object && url && title); 21 DCHECK(data_object && url && title);
21 22
22 STGMEDIUM medium; 23 STGMEDIUM medium;
23 if (FAILED(data_object->GetData(ClipboardUtil::GetCFHDropFormat(), &medium))) 24 if (FAILED(data_object->GetData(ClipboardUtil::GetCFHDropFormat(), &medium)))
24 return false; 25 return false;
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 size_t tag_end = cf_html.rfind("<!--EndFragment", std::string::npos); 519 size_t tag_end = cf_html.rfind("<!--EndFragment", std::string::npos);
519 fragment_end = cf_html.rfind('<', tag_end); 520 fragment_end = cf_html.rfind('<', tag_end);
520 } 521 }
521 if (fragment_start != std::string::npos && 522 if (fragment_start != std::string::npos &&
522 fragment_end != std::string::npos) { 523 fragment_end != std::string::npos) {
523 *html = cf_html.substr(fragment_start, fragment_end - fragment_start); 524 *html = cf_html.substr(fragment_start, fragment_end - fragment_start);
524 TrimWhitespace(*html, TRIM_ALL, html); 525 TrimWhitespace(*html, TRIM_ALL, html);
525 } 526 }
526 } 527 }
527 } 528 }
OLDNEW
« no previous file with comments | « no previous file | app/clipboard/clipboard_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698