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

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

Issue 11092064: Use blocking worker pool for sync file operations in Pepper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « content/browser/renderer_host/pepper/pepper_file_message_filter.cc ('k') | no next file » | 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) 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"
11 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
12 #include "base/metrics/stats_counters.h" 11 #include "base/metrics/stats_counters.h"
13 #include "base/string16.h" 12 #include "base/string16.h"
14 #include "base/string_number_conversions.h" 13 #include "base/string_number_conversions.h"
15 #include "base/string_util.h" 14 #include "base/string_util.h"
16 #include "base/sys_info.h" 15 #include "base/sys_info.h"
17 #include "base/time.h" 16 #include "base/time.h"
18 #include "base/utf_string_conversions.h" 17 #include "base/utf_string_conversions.h"
19 #include "content/browser/browser_plugin/browser_plugin_embedder.h" 18 #include "content/browser/browser_plugin/browser_plugin_embedder.h"
20 #include "content/browser/browser_plugin/browser_plugin_guest.h" 19 #include "content/browser/browser_plugin/browser_plugin_guest.h"
(...skipping 2317 matching lines...) Expand 10 before | Expand all | Expand 10 after
2338 if (color_chooser_ && 2337 if (color_chooser_ &&
2339 color_chooser_id == color_chooser_->identifier()) 2338 color_chooser_id == color_chooser_->identifier())
2340 color_chooser_->SetSelectedColor(color); 2339 color_chooser_->SetSelectedColor(color);
2341 } 2340 }
2342 2341
2343 void WebContentsImpl::OnPepperPluginHung(int plugin_child_id, 2342 void WebContentsImpl::OnPepperPluginHung(int plugin_child_id,
2344 const FilePath& path, 2343 const FilePath& path,
2345 bool is_hung) { 2344 bool is_hung) {
2346 UMA_HISTOGRAM_COUNTS("Pepper.PluginHung", 1); 2345 UMA_HISTOGRAM_COUNTS("Pepper.PluginHung", 1);
2347 2346
2348 // Determine how often hangs happen when using worker pool versus
2349 // FILE thread. kFieldTrialName needs to match the value in
2350 // pepper_file_message_filter.cc, but plumbing that through would be
2351 // disruptive for temporary code.
2352 // TODO(shess): Remove once the workpool is proven superior.
2353 // http://crbug.com/153383
2354 static const char* const kFieldTrialName = "FlapperIOThread";
2355 static const bool hung_trial_exists =
2356 base::FieldTrialList::TrialExists(kFieldTrialName);
2357 if (hung_trial_exists) {
2358 UMA_HISTOGRAM_COUNTS(base::FieldTrial::MakeName("Pepper.PluginHung",
2359 kFieldTrialName), 1);
2360 }
2361
2362 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 2347 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
2363 PluginHungStatusChanged(plugin_child_id, path, is_hung)); 2348 PluginHungStatusChanged(plugin_child_id, path, is_hung));
2364 } 2349 }
2365 2350
2366 // This exists for render views that don't have a WebUI, but do have WebUI 2351 // This exists for render views that don't have a WebUI, but do have WebUI
2367 // bindings enabled. 2352 // bindings enabled.
2368 void WebContentsImpl::OnWebUISend(const GURL& source_url, 2353 void WebContentsImpl::OnWebUISend(const GURL& source_url,
2369 const std::string& name, 2354 const std::string& name,
2370 const base::ListValue& args) { 2355 const base::ListValue& args) {
2371 if (delegate_) 2356 if (delegate_)
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
3415 } 3400 }
3416 } 3401 }
3417 3402
3418 content::BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { 3403 content::BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() {
3419 return browser_plugin_guest_.get(); 3404 return browser_plugin_guest_.get();
3420 } 3405 }
3421 3406
3422 content::BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { 3407 content::BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() {
3423 return browser_plugin_embedder_.get(); 3408 return browser_plugin_embedder_.get();
3424 } 3409 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/pepper/pepper_file_message_filter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698