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

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

Issue 3935001: Rename CommandLine::ARGUMENTS_ONLY to NO_PROGRAM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 2 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <windows.h> 7 #include <windows.h>
8 #include <shobjidl.h> 8 #include <shobjidl.h>
9 #include <propkey.h> 9 #include <propkey.h>
10 #include <propvarutil.h> 10 #include <propvarutil.h>
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 reinterpret_cast<void**>(&removed)); 414 reinterpret_cast<void**>(&removed));
415 if (FAILED(result)) 415 if (FAILED(result))
416 return false; 416 return false;
417 417
418 // Retrieve the absolute path to "chrome.exe". 418 // Retrieve the absolute path to "chrome.exe".
419 std::wstring chrome_path; 419 std::wstring chrome_path;
420 if (!PathService::Get(base::FILE_EXE, &chrome_path)) 420 if (!PathService::Get(base::FILE_EXE, &chrome_path))
421 return false; 421 return false;
422 422
423 // Retrieve the command-line switches of this process. 423 // Retrieve the command-line switches of this process.
424 CommandLine command_line(CommandLine::ARGUMENTS_ONLY); 424 CommandLine command_line(CommandLine::NO_PROGRAM);
425 FilePath user_data_dir = CommandLine::ForCurrentProcess()-> 425 FilePath user_data_dir = CommandLine::ForCurrentProcess()->
426 GetSwitchValuePath(switches::kUserDataDir); 426 GetSwitchValuePath(switches::kUserDataDir);
427 if (!user_data_dir.empty()) 427 if (!user_data_dir.empty())
428 command_line.AppendSwitchPath(switches::kUserDataDir, user_data_dir); 428 command_line.AppendSwitchPath(switches::kUserDataDir, user_data_dir);
429 429
430 std::wstring chrome_switches = command_line.command_line_string(); 430 std::wstring chrome_switches = command_line.command_line_string();
431 431
432 // We allocate 60% of the given JumpList slots to "most-visited" items 432 // We allocate 60% of the given JumpList slots to "most-visited" items
433 // and 40% to "recently-closed" items, respectively. 433 // and 40% to "recently-closed" items, respectively.
434 // Nevertheless, if there are not so many items in |recently_closed_pages|, 434 // Nevertheless, if there are not so many items in |recently_closed_pages|,
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 // the file thread. 772 // the file thread.
773 BrowserThread::PostTask( 773 BrowserThread::PostTask(
774 BrowserThread::FILE, FROM_HERE, 774 BrowserThread::FILE, FROM_HERE,
775 new JumpListUpdateTask(app_id_.c_str(), icon_dir_, most_visited_pages_, 775 new JumpListUpdateTask(app_id_.c_str(), icon_dir_, most_visited_pages_,
776 recently_closed_pages_)); 776 recently_closed_pages_));
777 777
778 // Delete all items in these lists since we don't need these lists any longer. 778 // Delete all items in these lists since we don't need these lists any longer.
779 most_visited_pages_.clear(); 779 most_visited_pages_.clear();
780 recently_closed_pages_.clear(); 780 recently_closed_pages_.clear();
781 } 781 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extensions_service_unittest.cc ('k') | chrome/browser/prefs/command_line_pref_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698