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

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

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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 | « chrome/browser/jumplist_updater_win.cc ('k') | chrome/browser/lifetime/application_lifetime.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/jumplist_win.h" 5 #include "chrome/browser/jumplist_win.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "ui/gfx/image/image_family.h" 45 #include "ui/gfx/image/image_family.h"
46 #include "url/gurl.h" 46 #include "url/gurl.h"
47 47
48 using content::BrowserThread; 48 using content::BrowserThread;
49 49
50 namespace { 50 namespace {
51 51
52 // Append the common switches to each shell link. 52 // Append the common switches to each shell link.
53 void AppendCommonSwitches(ShellLinkItem* shell_link) { 53 void AppendCommonSwitches(ShellLinkItem* shell_link) {
54 const char* kSwitchNames[] = { switches::kUserDataDir }; 54 const char* kSwitchNames[] = { switches::kUserDataDir };
55 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 55 const base::CommandLine& command_line =
56 *base::CommandLine::ForCurrentProcess();
56 shell_link->GetCommandLine()->CopySwitchesFrom(command_line, 57 shell_link->GetCommandLine()->CopySwitchesFrom(command_line,
57 kSwitchNames, 58 kSwitchNames,
58 arraysize(kSwitchNames)); 59 arraysize(kSwitchNames));
59 } 60 }
60 61
61 // Create a ShellLinkItem preloaded with common switches. 62 // Create a ShellLinkItem preloaded with common switches.
62 scoped_refptr<ShellLinkItem> CreateShellLink() { 63 scoped_refptr<ShellLinkItem> CreateShellLink() {
63 scoped_refptr<ShellLinkItem> link(new ShellLinkItem); 64 scoped_refptr<ShellLinkItem> link(new ShellLinkItem);
64 AppendCommonSwitches(link.get()); 65 AppendCommonSwitches(link.get());
65 return link; 66 return link;
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 link->set_icon_data(avatar.AsBitmap()); 601 link->set_icon_data(avatar.AsBitmap());
601 new_profile_switcher.push_back(link); 602 new_profile_switcher.push_back(link);
602 } 603 }
603 } 604 }
604 605
605 { 606 {
606 base::AutoLock auto_lock(list_lock_); 607 base::AutoLock auto_lock(list_lock_);
607 new_profile_switcher.swap(profile_switcher_); 608 new_profile_switcher.swap(profile_switcher_);
608 } 609 }
609 } 610 }
OLDNEW
« no previous file with comments | « chrome/browser/jumplist_updater_win.cc ('k') | chrome/browser/lifetime/application_lifetime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698