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

Side by Side Diff: chrome/browser/chrome_plugin_host.cc

Issue 28046: Use string for Histogram names since these are all ASCII anyway wide-characte... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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/browser_shutdown.cc ('k') | chrome/browser/dom_ui/new_tab_ui.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/chrome_plugin_host.h" 5 #include "chrome/browser/chrome_plugin_host.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 LogInterceptHitTime(timer.Elapsed()); 117 LogInterceptHitTime(timer.Elapsed());
118 return new URLRequestInterceptJob(request, plugin_, cprequest.release()); 118 return new URLRequestInterceptJob(request, plugin_, cprequest.release());
119 } 119 }
120 120
121 private: 121 private:
122 bool IsHandledProtocol(const std::string& scheme) { 122 bool IsHandledProtocol(const std::string& scheme) {
123 return handled_protocols_.find(scheme) != handled_protocols_.end(); 123 return handled_protocols_.find(scheme) != handled_protocols_.end();
124 } 124 }
125 125
126 void LogInterceptHitTime(const TimeDelta& time) { 126 void LogInterceptHitTime(const TimeDelta& time) {
127 UMA_HISTOGRAM_TIMES(L"Gears.InterceptHit", time); 127 UMA_HISTOGRAM_TIMES("Gears.InterceptHit", time);
128 } 128 }
129 129
130 void LogInterceptMissTime(const TimeDelta& time) { 130 void LogInterceptMissTime(const TimeDelta& time) {
131 UMA_HISTOGRAM_TIMES(L"Gears.InterceptMiss", time); 131 UMA_HISTOGRAM_TIMES("Gears.InterceptMiss", time);
132 } 132 }
133 133
134 typedef std::set<std::string> HandledProtocolList; 134 typedef std::set<std::string> HandledProtocolList;
135 HandledProtocolList handled_protocols_; 135 HandledProtocolList handled_protocols_;
136 HandledProtocolList registered_protocols_; 136 HandledProtocolList registered_protocols_;
137 }; 137 };
138 138
139 // This class manages a network request made by the plugin, also acting as 139 // This class manages a network request made by the plugin, also acting as
140 // the URLRequest delegate. 140 // the URLRequest delegate.
141 // NOTE: All methods must be called on the IO thread. 141 // NOTE: All methods must be called on the IO thread.
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 void CPHandleCommand(int command, CPCommandInterface* data, 796 void CPHandleCommand(int command, CPCommandInterface* data,
797 CPBrowsingContext context) { 797 CPBrowsingContext context) {
798 // Sadly if we try and pass context through, we seem to break cl's little 798 // Sadly if we try and pass context through, we seem to break cl's little
799 // brain trying to compile the Tuple3 ctor. This cast works. 799 // brain trying to compile the Tuple3 ctor. This cast works.
800 int32 context_as_int32 = static_cast<int32>(context); 800 int32 context_as_int32 = static_cast<int32>(context);
801 // Plugins can only be accessed on the IO thread. 801 // Plugins can only be accessed on the IO thread.
802 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, 802 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE,
803 NewRunnableFunction(PluginCommandHandler::HandleCommand, 803 NewRunnableFunction(PluginCommandHandler::HandleCommand,
804 command, data, context_as_int32)); 804 command, data, context_as_int32));
805 } 805 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_shutdown.cc ('k') | chrome/browser/dom_ui/new_tab_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698