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

Side by Side Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 320523002: Add FILE_MISSING in PpapiThread::LoadResult for UMA reporting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/ppapi_plugin/ppapi_thread.h ('k') | tools/metrics/histograms/histograms.xml » ('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) 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/ppapi_plugin/ppapi_thread.h" 5 #include "content/ppapi_plugin/ppapi_thread.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/cpu.h" 10 #include "base/cpu.h"
11 #include "base/debug/crash_logging.h" 11 #include "base/debug/crash_logging.h"
12 #include "base/file_util.h"
12 #include "base/logging.h" 13 #include "base/logging.h"
13 #include "base/metrics/histogram.h" 14 #include "base/metrics/histogram.h"
14 #include "base/metrics/sparse_histogram.h" 15 #include "base/metrics/sparse_histogram.h"
15 #include "base/rand_util.h" 16 #include "base/rand_util.h"
16 #include "base/strings/stringprintf.h" 17 #include "base/strings/stringprintf.h"
17 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
18 #include "base/threading/platform_thread.h" 19 #include "base/threading/platform_thread.h"
19 #include "base/time/time.h" 20 #include "base/time/time.h"
20 #include "content/child/browser_font_resource_trusted.h" 21 #include "content/child/browser_font_resource_trusted.h"
21 #include "content/child/child_process.h" 22 #include "content/child/child_process.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 269
269 // If the plugin isn't internal then load it from |path|. 270 // If the plugin isn't internal then load it from |path|.
270 base::ScopedNativeLibrary library; 271 base::ScopedNativeLibrary library;
271 if (plugin_entry_points_.initialize_module == NULL) { 272 if (plugin_entry_points_.initialize_module == NULL) {
272 // Load the plugin from the specified library. 273 // Load the plugin from the specified library.
273 base::NativeLibraryLoadError error; 274 base::NativeLibraryLoadError error;
274 library.Reset(base::LoadNativeLibrary(path, &error)); 275 library.Reset(base::LoadNativeLibrary(path, &error));
275 if (!library.is_valid()) { 276 if (!library.is_valid()) {
276 LOG(ERROR) << "Failed to load Pepper module from " << path.value() 277 LOG(ERROR) << "Failed to load Pepper module from " << path.value()
277 << " (error: " << error.ToString() << ")"; 278 << " (error: " << error.ToString() << ")";
279 if (!base::PathExists(path)) {
280 ReportLoadResult(path, FILE_MISSING);
281 return;
282 }
278 ReportLoadResult(path, LOAD_FAILED); 283 ReportLoadResult(path, LOAD_FAILED);
279 // Report detailed reason for load failure. 284 // Report detailed reason for load failure.
280 ReportLoadErrorCode(path, error); 285 ReportLoadErrorCode(path, error);
281 return; 286 return;
282 } 287 }
283 288
284 // Get the GetInterface function (required). 289 // Get the GetInterface function (required).
285 plugin_entry_points_.get_interface = 290 plugin_entry_points_.get_interface =
286 reinterpret_cast<PP_GetInterface_Func>( 291 reinterpret_cast<PP_GetInterface_Func>(
287 library.GetFunctionPointer("PPP_GetInterface")); 292 library.GetFunctionPointer("PPP_GetInterface"));
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 std::string("Plugin.Ppapi") + (is_broker_ ? "Broker" : "Plugin") + 536 std::string("Plugin.Ppapi") + (is_broker_ ? "Broker" : "Plugin") +
532 "LoadErrorCode_" + path.BaseName().MaybeAsASCII(); 537 "LoadErrorCode_" + path.BaseName().MaybeAsASCII();
533 538
534 // For sparse histograms, we can use the macro, as it does not incorporate a 539 // For sparse histograms, we can use the macro, as it does not incorporate a
535 // static. 540 // static.
536 UMA_HISTOGRAM_SPARSE_SLOWLY(histogram_name, error.code); 541 UMA_HISTOGRAM_SPARSE_SLOWLY(histogram_name, error.code);
537 #endif 542 #endif
538 } 543 }
539 544
540 } // namespace content 545 } // namespace content
OLDNEW
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698