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

Side by Side Diff: chrome/browser/ui/browser_commands.cc

Issue 112913004: Update some uses of UTF conversions in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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/ui/browser_browsertest.cc ('k') | chrome/browser/ui/browser_focus_uitest.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/ui/browser_commands.h" 5 #include "chrome/browser/ui/browser_commands.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 print_view_manager->PrintToDestination(); 804 print_view_manager->PrintToDestination();
805 #endif 805 #endif
806 } 806 }
807 807
808 void EmailPageLocation(Browser* browser) { 808 void EmailPageLocation(Browser* browser) {
809 content::RecordAction(UserMetricsAction("EmailPageLocation")); 809 content::RecordAction(UserMetricsAction("EmailPageLocation"));
810 WebContents* wc = browser->tab_strip_model()->GetActiveWebContents(); 810 WebContents* wc = browser->tab_strip_model()->GetActiveWebContents();
811 DCHECK(wc); 811 DCHECK(wc);
812 812
813 std::string title = net::EscapeQueryParamValue( 813 std::string title = net::EscapeQueryParamValue(
814 UTF16ToUTF8(wc->GetTitle()), false); 814 base::UTF16ToUTF8(wc->GetTitle()), false);
815 std::string page_url = net::EscapeQueryParamValue(wc->GetURL().spec(), false); 815 std::string page_url = net::EscapeQueryParamValue(wc->GetURL().spec(), false);
816 std::string mailto = std::string("mailto:?subject=Fwd:%20") + 816 std::string mailto = std::string("mailto:?subject=Fwd:%20") +
817 title + "&body=%0A%0A" + page_url; 817 title + "&body=%0A%0A" + page_url;
818 platform_util::OpenExternal(browser->profile(), GURL(mailto)); 818 platform_util::OpenExternal(browser->profile(), GURL(mailto));
819 } 819 }
820 820
821 bool CanEmailPageLocation(const Browser* browser) { 821 bool CanEmailPageLocation(const Browser* browser) {
822 return browser->toolbar_model()->ShouldDisplayURL() && 822 return browser->toolbar_model()->ShouldDisplayURL() &&
823 browser->tab_strip_model()->GetActiveWebContents()->GetURL().is_valid(); 823 browser->tab_strip_model()->GetActiveWebContents()->GetURL().is_valid();
824 } 824 }
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
1163 Browser::TYPE_POPUP, app_name, gfx::Rect(), browser->profile(), 1163 Browser::TYPE_POPUP, app_name, gfx::Rect(), browser->profile(),
1164 browser->host_desktop_type())); 1164 browser->host_desktop_type()));
1165 app_browser->tab_strip_model()->AppendWebContents(contents, true); 1165 app_browser->tab_strip_model()->AppendWebContents(contents, true);
1166 1166
1167 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; 1167 contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
1168 contents->GetRenderViewHost()->SyncRendererPrefs(); 1168 contents->GetRenderViewHost()->SyncRendererPrefs();
1169 app_browser->window()->Show(); 1169 app_browser->window()->Show();
1170 } 1170 }
1171 1171
1172 } // namespace chrome 1172 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/browser_focus_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698