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

Side by Side Diff: chrome/browser/first_run/upgrade_util_win.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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/first_run/upgrade_util.h" 5 #include "chrome/browser/first_run/upgrade_util.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <psapi.h> 8 #include <psapi.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 10
11 #include <algorithm> 11 #include <algorithm>
12 #include <string> 12 #include <string>
13 13
14 #include "base/base_paths.h" 14 #include "base/base_paths.h"
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "base/environment.h" 16 #include "base/environment.h"
17 #include "base/files/file_path.h" 17 #include "base/files/file_path.h"
18 #include "base/files/file_util.h" 18 #include "base/files/file_util.h"
19 #include "base/logging.h" 19 #include "base/logging.h"
20 #include "base/macros.h" 20 #include "base/macros.h"
21 #include "base/path_service.h" 21 #include "base/path_service.h"
22 #include "base/prefs/pref_service.h"
23 #include "base/process/launch.h" 22 #include "base/process/launch.h"
24 #include "base/process/process_handle.h" 23 #include "base/process/process_handle.h"
25 #include "base/strings/string_number_conversions.h" 24 #include "base/strings/string_number_conversions.h"
26 #include "base/strings/string_util.h" 25 #include "base/strings/string_util.h"
27 #include "base/strings/stringprintf.h" 26 #include "base/strings/stringprintf.h"
28 #include "base/win/registry.h" 27 #include "base/win/registry.h"
29 #include "base/win/scoped_comptr.h" 28 #include "base/win/scoped_comptr.h"
30 #include "base/win/windows_version.h" 29 #include "base/win/windows_version.h"
31 #include "chrome/browser/browser_process.h" 30 #include "chrome/browser/browser_process.h"
32 #include "chrome/browser/first_run/upgrade_util_win.h" 31 #include "chrome/browser/first_run/upgrade_util_win.h"
33 #include "chrome/browser/shell_integration.h" 32 #include "chrome/browser/shell_integration.h"
34 #include "chrome/common/chrome_constants.h" 33 #include "chrome/common/chrome_constants.h"
35 #include "chrome/common/chrome_switches.h" 34 #include "chrome/common/chrome_switches.h"
36 #include "chrome/common/pref_names.h" 35 #include "chrome/common/pref_names.h"
37 #include "chrome/installer/util/browser_distribution.h" 36 #include "chrome/installer/util/browser_distribution.h"
38 #include "chrome/installer/util/google_update_constants.h" 37 #include "chrome/installer/util/google_update_constants.h"
39 #include "chrome/installer/util/install_util.h" 38 #include "chrome/installer/util/install_util.h"
40 #include "chrome/installer/util/shell_util.h" 39 #include "chrome/installer/util/shell_util.h"
41 #include "chrome/installer/util/util_constants.h" 40 #include "chrome/installer/util/util_constants.h"
41 #include "components/prefs/pref_service.h"
42 #include "ui/base/ui_base_switches.h" 42 #include "ui/base/ui_base_switches.h"
43 43
44 #if defined(GOOGLE_CHROME_BUILD) 44 #if defined(GOOGLE_CHROME_BUILD)
45 #include "google_update/google_update_idl.h" 45 #include "google_update/google_update_idl.h"
46 #endif 46 #endif
47 47
48 namespace { 48 namespace {
49 49
50 bool GetNewerChromeFile(base::FilePath* path) { 50 bool GetNewerChromeFile(base::FilePath* path) {
51 if (!PathService::Get(base::DIR_EXE, path)) 51 if (!PathService::Get(base::DIR_EXE, path))
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 return false; 217 return false;
218 // At this point the chrome.exe has been swapped with the new one. 218 // At this point the chrome.exe has been swapped with the new one.
219 if (!RelaunchChromeBrowser(command_line)) { 219 if (!RelaunchChromeBrowser(command_line)) {
220 // The re-launch fails. Feel free to panic now. 220 // The re-launch fails. Feel free to panic now.
221 NOTREACHED(); 221 NOTREACHED();
222 } 222 }
223 return true; 223 return true;
224 } 224 }
225 225
226 } // namespace upgrade_util 226 } // namespace upgrade_util
OLDNEW
« no previous file with comments | « chrome/browser/first_run/first_run_internal_posix.cc ('k') | chrome/browser/font_family_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698