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

Side by Side Diff: chrome/browser/apps/shortcut_manager.cc

Issue 819133004: 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/apps/shortcut_manager.h" 5 #include "chrome/browser/apps/shortcut_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 const base::FilePath& profile_path) { 147 const base::FilePath& profile_path) {
148 if (profile_path != profile_->GetPath()) 148 if (profile_path != profile_->GetPath())
149 return; 149 return;
150 content::BrowserThread::PostTask( 150 content::BrowserThread::PostTask(
151 content::BrowserThread::FILE, FROM_HERE, 151 content::BrowserThread::FILE, FROM_HERE,
152 base::Bind(&web_app::internals::DeleteAllShortcutsForProfile, 152 base::Bind(&web_app::internals::DeleteAllShortcutsForProfile,
153 profile_path)); 153 profile_path));
154 } 154 }
155 155
156 void AppShortcutManager::UpdateShortcutsForAllAppsIfNeeded() { 156 void AppShortcutManager::UpdateShortcutsForAllAppsIfNeeded() {
157 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType)) 157 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType))
158 return; 158 return;
159 159
160 int last_version = prefs_->GetInteger(prefs::kAppShortcutsVersion); 160 int last_version = prefs_->GetInteger(prefs::kAppShortcutsVersion);
161 if (last_version >= kCurrentAppShortcutsVersion) 161 if (last_version >= kCurrentAppShortcutsVersion)
162 return; 162 return;
163 163
164 content::BrowserThread::PostDelayedTask( 164 content::BrowserThread::PostDelayedTask(
165 content::BrowserThread::UI, 165 content::BrowserThread::UI,
166 FROM_HERE, 166 FROM_HERE,
167 base::Bind(&web_app::UpdateShortcutsForAllApps, 167 base::Bind(&web_app::UpdateShortcutsForAllApps,
168 profile_, 168 profile_,
169 base::Bind(&SetCurrentAppShortcutsVersion, prefs_)), 169 base::Bind(&SetCurrentAppShortcutsVersion, prefs_)),
170 base::TimeDelta::FromSeconds(kUpdateShortcutsForAllAppsDelay)); 170 base::TimeDelta::FromSeconds(kUpdateShortcutsForAllAppsDelay));
171 } 171 }
OLDNEW
« no previous file with comments | « chrome/browser/apps/guest_view/web_view_browsertest.cc ('k') | chrome/browser/apps/speech_recognition_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698