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

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

Issue 10891013: Make GpuDataManager thread safe. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 "chrome/browser/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 // silently exit because of missing code in the above test. 395 // silently exit because of missing code in the above test.
396 CHECK(profile) << "Cannot get default profile."; 396 CHECK(profile) << "Cannot get default profile.";
397 #endif 397 #endif
398 398
399 return NULL; 399 return NULL;
400 } 400 }
401 401
402 // Load GPU Blacklist, collect preliminary gpu info, and compute preliminary 402 // Load GPU Blacklist, collect preliminary gpu info, and compute preliminary
403 // gpu feature flags. 403 // gpu feature flags.
404 void InitializeGpuDataManager(const CommandLine& parsed_command_line) { 404 void InitializeGpuDataManager(const CommandLine& parsed_command_line) {
405 content::GpuDataManager::GetInstance(); 405 content::GpuDataManager::GetInstance()->InitializeGpuInfo();
406 if (parsed_command_line.HasSwitch(switches::kSkipGpuDataLoading) || 406 if (parsed_command_line.HasSwitch(switches::kSkipGpuDataLoading) ||
407 parsed_command_line.HasSwitch(switches::kIgnoreGpuBlacklist)) { 407 parsed_command_line.HasSwitch(switches::kIgnoreGpuBlacklist)) {
408 return; 408 return;
409 } 409 }
410 410
411 const base::StringPiece gpu_blacklist_json( 411 const base::StringPiece gpu_blacklist_json(
412 ResourceBundle::GetSharedInstance().GetRawDataResource( 412 ResourceBundle::GetSharedInstance().GetRawDataResource(
413 IDR_GPU_BLACKLIST, ui::SCALE_FACTOR_NONE)); 413 IDR_GPU_BLACKLIST, ui::SCALE_FACTOR_NONE));
414 GpuBlacklist* gpu_blacklist = GpuBlacklist::GetInstance(); 414 GpuBlacklist* gpu_blacklist = GpuBlacklist::GetInstance();
415 bool succeed = gpu_blacklist->LoadGpuBlacklist( 415 bool succeed = gpu_blacklist->LoadGpuBlacklist(
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1563 if (base::win::GetVersion() <= base::win::VERSION_XP) 1563 if (base::win::GetVersion() <= base::win::VERSION_XP)
1564 uma_name += "_XP"; 1564 uma_name += "_XP";
1565 1565
1566 uma_name += "_PreRead_"; 1566 uma_name += "_PreRead_";
1567 uma_name += pre_read_percentage; 1567 uma_name += pre_read_percentage;
1568 AddPreReadHistogramTime(uma_name.c_str(), time); 1568 AddPreReadHistogramTime(uma_name.c_str(), time);
1569 } 1569 }
1570 #endif 1570 #endif
1571 #endif 1571 #endif
1572 } 1572 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698