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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 11016016: Flapper field trial to use workerpool for sync file operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix group check for browser_tests. Created 8 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
11 #include "base/metrics/stats_counters.h" 12 #include "base/metrics/stats_counters.h"
12 #include "base/string16.h" 13 #include "base/string16.h"
13 #include "base/string_number_conversions.h" 14 #include "base/string_number_conversions.h"
14 #include "base/string_util.h" 15 #include "base/string_util.h"
15 #include "base/sys_info.h" 16 #include "base/sys_info.h"
16 #include "base/time.h" 17 #include "base/time.h"
17 #include "base/utf_string_conversions.h" 18 #include "base/utf_string_conversions.h"
18 #include "content/browser/browser_plugin/browser_plugin_embedder.h" 19 #include "content/browser/browser_plugin/browser_plugin_embedder.h"
19 #include "content/browser/browser_plugin/browser_plugin_guest.h" 20 #include "content/browser/browser_plugin/browser_plugin_guest.h"
(...skipping 2301 matching lines...) Expand 10 before | Expand all | Expand 10 after
2321 void WebContentsImpl::OnSetSelectedColorInColorChooser(int color_chooser_id, 2322 void WebContentsImpl::OnSetSelectedColorInColorChooser(int color_chooser_id,
2322 SkColor color) { 2323 SkColor color) {
2323 if (color_chooser_ && 2324 if (color_chooser_ &&
2324 color_chooser_id == color_chooser_->identifier()) 2325 color_chooser_id == color_chooser_->identifier())
2325 color_chooser_->SetSelectedColor(color); 2326 color_chooser_->SetSelectedColor(color);
2326 } 2327 }
2327 2328
2328 void WebContentsImpl::OnPepperPluginHung(int plugin_child_id, 2329 void WebContentsImpl::OnPepperPluginHung(int plugin_child_id,
2329 const FilePath& path, 2330 const FilePath& path,
2330 bool is_hung) { 2331 bool is_hung) {
2332 HISTOGRAM_COUNTS("Pepper.PluginHung", 1);
2333
2334 // TODO(shess): http://crbug.com/153383 debugging. Determine how
2335 // often hangs happen when using worker pool versus FILE thread.
2336 // kFieldTrialName needs to match the value in pepper_flash.cc, but
2337 // plumbing that through would be disruptive for temporary code.
2338 const char* const kFieldTrialName = "FlapperIOThread";
yzshen1 2012/10/02 23:33:44 static, please.
Scott Hess - ex-Googler 2012/10/02 23:42:31 OK. But I think it's already implicitly static, s
2339 static const bool hung_trial_exists =
2340 base::FieldTrialList::TrialExists(kFieldTrialName);
2341 if (hung_trial_exists) {
2342 HISTOGRAM_COUNTS(base::FieldTrial::MakeName("Pepper.PluginHung",
2343 kFieldTrialName), 1);
2344 }
2345
2331 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 2346 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
2332 PluginHungStatusChanged(plugin_child_id, path, is_hung)); 2347 PluginHungStatusChanged(plugin_child_id, path, is_hung));
2333 } 2348 }
2334 2349
2335 // This exists for render views that don't have a WebUI, but do have WebUI 2350 // This exists for render views that don't have a WebUI, but do have WebUI
2336 // bindings enabled. 2351 // bindings enabled.
2337 void WebContentsImpl::OnWebUISend(const GURL& source_url, 2352 void WebContentsImpl::OnWebUISend(const GURL& source_url,
2338 const std::string& name, 2353 const std::string& name,
2339 const base::ListValue& args) { 2354 const base::ListValue& args) {
2340 if (delegate_) 2355 if (delegate_)
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after
3390 } 3405 }
3391 } 3406 }
3392 3407
3393 content::BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { 3408 content::BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() {
3394 return browser_plugin_guest_.get(); 3409 return browser_plugin_guest_.get();
3395 } 3410 }
3396 3411
3397 content::BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { 3412 content::BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() {
3398 return browser_plugin_embedder_.get(); 3413 return browser_plugin_embedder_.get();
3399 } 3414 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698