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

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

Issue 10683005: Remove two deprecated methods from base::Version (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 8 years, 5 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 | « chrome/app/client_util.cc ('k') | chrome/browser/enumerate_modules_model_win.cc » ('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 "chrome/browser/chrome_browser_main_win.h" 5 #include "chrome/browser/chrome_browser_main_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 } 289 }
290 // We don't hide icons so we shouldn't do anything special to show them 290 // We don't hide icons so we shouldn't do anything special to show them
291 return chrome::RESULT_CODE_UNSUPPORTED_PARAM; 291 return chrome::RESULT_CODE_UNSUPPORTED_PARAM;
292 } 292 }
293 293
294 // static 294 // static
295 bool ChromeBrowserMainPartsWin::CheckMachineLevelInstall() { 295 bool ChromeBrowserMainPartsWin::CheckMachineLevelInstall() {
296 // TODO(tommi): Check if using the default distribution is always the right 296 // TODO(tommi): Check if using the default distribution is always the right
297 // thing to do. 297 // thing to do.
298 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); 298 BrowserDistribution* dist = BrowserDistribution::GetDistribution();
299 scoped_ptr<Version> version(InstallUtil::GetChromeVersion(dist, true)); 299 Version version;
300 if (version.get()) { 300 InstallUtil::GetChromeVersion(dist, true, &version);
301 if (version.IsValid()) {
301 FilePath exe_path; 302 FilePath exe_path;
302 PathService::Get(base::DIR_EXE, &exe_path); 303 PathService::Get(base::DIR_EXE, &exe_path);
303 std::wstring exe = exe_path.value(); 304 std::wstring exe = exe_path.value();
304 FilePath user_exe_path(installer::GetChromeInstallPath(false, dist)); 305 FilePath user_exe_path(installer::GetChromeInstallPath(false, dist));
305 if (FilePath::CompareEqualIgnoreCase(exe, user_exe_path.value())) { 306 if (FilePath::CompareEqualIgnoreCase(exe, user_exe_path.value())) {
306 const string16 text = 307 const string16 text =
307 l10n_util::GetStringUTF16(IDS_MACHINE_LEVEL_INSTALL_CONFLICT); 308 l10n_util::GetStringUTF16(IDS_MACHINE_LEVEL_INSTALL_CONFLICT);
308 const string16 caption = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); 309 const string16 caption = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
309 const UINT flags = MB_OK | MB_ICONERROR | MB_TOPMOST; 310 const UINT flags = MB_OK | MB_ICONERROR | MB_TOPMOST;
310 ui::MessageBox(NULL, text, caption, flags); 311 ui::MessageBox(NULL, text, caption, flags);
(...skipping 28 matching lines...) Expand all
339 if (resource_id) 340 if (resource_id)
340 return l10n_util::GetStringUTF16(resource_id); 341 return l10n_util::GetStringUTF16(resource_id);
341 return string16(); 342 return string16();
342 } 343 }
343 344
344 // static 345 // static
345 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { 346 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() {
346 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); 347 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ());
347 installer::SetTranslationDelegate(&delegate); 348 installer::SetTranslationDelegate(&delegate);
348 } 349 }
OLDNEW
« no previous file with comments | « chrome/app/client_util.cc ('k') | chrome/browser/enumerate_modules_model_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698