| OLD | NEW | 
|     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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   383 #if defined(OS_WIN) |   383 #if defined(OS_WIN) | 
|   384 #if defined(USE_AURA) |   384 #if defined(USE_AURA) | 
|   385   // TODO(beng): |   385   // TODO(beng): | 
|   386   NOTIMPLEMENTED(); |   386   NOTIMPLEMENTED(); | 
|   387 #else |   387 #else | 
|   388   // Ideally, we should be able to run w/o access to disk.  For now, we |   388   // Ideally, we should be able to run w/o access to disk.  For now, we | 
|   389   // prompt the user to pick a different user-data-dir and restart chrome |   389   // prompt the user to pick a different user-data-dir and restart chrome | 
|   390   // with the new dir. |   390   // with the new dir. | 
|   391   // http://code.google.com/p/chromium/issues/detail?id=11510 |   391   // http://code.google.com/p/chromium/issues/detail?id=11510 | 
|   392   FilePath new_user_data_dir = browser::ShowUserDataDirDialog(user_data_dir); |   392   FilePath new_user_data_dir = browser::ShowUserDataDirDialog(user_data_dir); | 
|   393   if (!parameters.ui_task && browser_shutdown::delete_resources_on_shutdown) { |  | 
|   394     // Only delete the resources if we're not running tests. If we're running |  | 
|   395     // tests the resources need to be reused as many places in the UI cache |  | 
|   396     // ImageSkias from the ResourceBundle. |  | 
|   397     ResourceBundle::CleanupSharedInstance(); |  | 
|   398   } |  | 
|   399  |   393  | 
|   400   if (!new_user_data_dir.empty()) { |   394   if (!new_user_data_dir.empty()) { | 
|   401     // Because of the way CommandLine parses, it's sufficient to append a new |   395     // Because of the way CommandLine parses, it's sufficient to append a new | 
|   402     // --user-data-dir switch.  The last flag of the same name wins. |   396     // --user-data-dir switch.  The last flag of the same name wins. | 
|   403     // TODO(tc): It would be nice to remove the flag we don't want, but that |   397     // TODO(tc): It would be nice to remove the flag we don't want, but that | 
|   404     // sounds risky if we parse differently than CommandLineToArgvW. |   398     // sounds risky if we parse differently than CommandLineToArgvW. | 
|   405     CommandLine new_command_line = parameters.command_line; |   399     CommandLine new_command_line = parameters.command_line; | 
|   406     new_command_line.AppendSwitchPath(switches::kUserDataDir, |   400     new_command_line.AppendSwitchPath(switches::kUserDataDir, | 
|   407                                       new_user_data_dir); |   401                                       new_user_data_dir); | 
|   408     base::LaunchProcess(new_command_line, base::LaunchOptions(), NULL); |   402     base::LaunchProcess(new_command_line, base::LaunchOptions(), NULL); | 
| (...skipping 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2014     if (base::win::GetVersion() <= base::win::VERSION_XP) |  2008     if (base::win::GetVersion() <= base::win::VERSION_XP) | 
|  2015       uma_name += "_XP"; |  2009       uma_name += "_XP"; | 
|  2016  |  2010  | 
|  2017     uma_name += "_PreRead_"; |  2011     uma_name += "_PreRead_"; | 
|  2018     uma_name += pre_read_percentage; |  2012     uma_name += pre_read_percentage; | 
|  2019     AddPreReadHistogramTime(uma_name.c_str(), time); |  2013     AddPreReadHistogramTime(uma_name.c_str(), time); | 
|  2020   } |  2014   } | 
|  2021 #endif |  2015 #endif | 
|  2022 #endif |  2016 #endif | 
|  2023 } |  2017 } | 
| OLD | NEW |