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

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

Issue 2622883002: Remove BrowserDistribution::Type. (Closed)
Patch Set: fdoray comments Created 3 years, 11 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
« no previous file with comments | « no previous file | chrome/common/metrics_constants_util_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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/profile_resetter/profile_resetter.h" 5 #include "chrome/browser/profile_resetter/profile_resetter.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "chrome/installer/util/shell_util.h" 46 #include "chrome/installer/util/shell_util.h"
47 47
48 namespace { 48 namespace {
49 49
50 void ResetShortcutsOnFileThread() { 50 void ResetShortcutsOnFileThread() {
51 DCHECK_CURRENTLY_ON(content::BrowserThread::FILE); 51 DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
52 // Get full path of chrome. 52 // Get full path of chrome.
53 base::FilePath chrome_exe; 53 base::FilePath chrome_exe;
54 if (!PathService::Get(base::FILE_EXE, &chrome_exe)) 54 if (!PathService::Get(base::FILE_EXE, &chrome_exe))
55 return; 55 return;
56 BrowserDistribution* dist = BrowserDistribution::GetSpecificDistribution( 56 BrowserDistribution* dist = BrowserDistribution::GetDistribution();
57 BrowserDistribution::CHROME_BROWSER);
58 for (int location = ShellUtil::SHORTCUT_LOCATION_FIRST; 57 for (int location = ShellUtil::SHORTCUT_LOCATION_FIRST;
59 location < ShellUtil::NUM_SHORTCUT_LOCATIONS; ++location) { 58 location < ShellUtil::NUM_SHORTCUT_LOCATIONS; ++location) {
60 ShellUtil::ShortcutListMaybeRemoveUnknownArgs( 59 ShellUtil::ShortcutListMaybeRemoveUnknownArgs(
61 static_cast<ShellUtil::ShortcutLocation>(location), 60 static_cast<ShellUtil::ShortcutLocation>(location),
62 dist, 61 dist,
63 ShellUtil::CURRENT_USER, 62 ShellUtil::CURRENT_USER,
64 chrome_exe, 63 chrome_exe,
65 true, 64 true,
66 NULL, 65 NULL,
67 NULL); 66 NULL);
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 } 339 }
341 340
342 std::vector<ShortcutCommand> GetChromeLaunchShortcuts( 341 std::vector<ShortcutCommand> GetChromeLaunchShortcuts(
343 const scoped_refptr<SharedCancellationFlag>& cancel) { 342 const scoped_refptr<SharedCancellationFlag>& cancel) {
344 DCHECK_CURRENTLY_ON(content::BrowserThread::FILE); 343 DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
345 #if defined(OS_WIN) 344 #if defined(OS_WIN)
346 // Get full path of chrome. 345 // Get full path of chrome.
347 base::FilePath chrome_exe; 346 base::FilePath chrome_exe;
348 if (!PathService::Get(base::FILE_EXE, &chrome_exe)) 347 if (!PathService::Get(base::FILE_EXE, &chrome_exe))
349 return std::vector<ShortcutCommand>(); 348 return std::vector<ShortcutCommand>();
350 BrowserDistribution* dist = BrowserDistribution::GetSpecificDistribution( 349 BrowserDistribution* dist = BrowserDistribution::GetDistribution();
351 BrowserDistribution::CHROME_BROWSER);
352 std::vector<ShortcutCommand> shortcuts; 350 std::vector<ShortcutCommand> shortcuts;
353 for (int location = ShellUtil::SHORTCUT_LOCATION_FIRST; 351 for (int location = ShellUtil::SHORTCUT_LOCATION_FIRST;
354 location < ShellUtil::NUM_SHORTCUT_LOCATIONS; ++location) { 352 location < ShellUtil::NUM_SHORTCUT_LOCATIONS; ++location) {
355 if (cancel.get() && cancel->data.IsSet()) 353 if (cancel.get() && cancel->data.IsSet())
356 break; 354 break;
357 ShellUtil::ShortcutListMaybeRemoveUnknownArgs( 355 ShellUtil::ShortcutListMaybeRemoveUnknownArgs(
358 static_cast<ShellUtil::ShortcutLocation>(location), 356 static_cast<ShellUtil::ShortcutLocation>(location),
359 dist, 357 dist,
360 ShellUtil::CURRENT_USER, 358 ShellUtil::CURRENT_USER,
361 chrome_exe, 359 chrome_exe,
362 false, 360 false,
363 cancel, 361 cancel,
364 &shortcuts); 362 &shortcuts);
365 } 363 }
366 return shortcuts; 364 return shortcuts;
367 #else 365 #else
368 return std::vector<ShortcutCommand>(); 366 return std::vector<ShortcutCommand>();
369 #endif 367 #endif
370 } 368 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/metrics_constants_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698