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/ui/tab_helpers.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 6 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ui/tab_helpers.h" 5 #include "chrome/browser/ui/tab_helpers.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/content_settings/chrome_content_settings_client.h" 9 #include "chrome/browser/content_settings/chrome_content_settings_client.h"
10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 #if defined(ENABLE_PRINTING) && !defined(OS_ANDROID) 207 #if defined(ENABLE_PRINTING) && !defined(OS_ANDROID)
208 #if defined(ENABLE_PRINT_PREVIEW) 208 #if defined(ENABLE_PRINT_PREVIEW)
209 printing::PrintViewManager::CreateForWebContents(web_contents); 209 printing::PrintViewManager::CreateForWebContents(web_contents);
210 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents); 210 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents);
211 #else 211 #else
212 printing::PrintViewManagerBasic::CreateForWebContents(web_contents); 212 printing::PrintViewManagerBasic::CreateForWebContents(web_contents);
213 #endif // defined(ENABLE_PRINT_PREVIEW) 213 #endif // defined(ENABLE_PRINT_PREVIEW)
214 #endif // defined(ENABLE_PRINTING) && !defined(OS_ANDROID) 214 #endif // defined(ENABLE_PRINTING) && !defined(OS_ANDROID)
215 215
216 if (CommandLine::ForCurrentProcess()->HasSwitch( 216 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
217 switches::kEnableDomDistiller)) { 217 switches::kEnableDomDistiller)) {
218 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( 218 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents(
219 web_contents); 219 web_contents);
220 } 220 }
221 221
222 #if defined(ENABLE_ONE_CLICK_SIGNIN) 222 #if defined(ENABLE_ONE_CLICK_SIGNIN)
223 // If this is not an incognito window, setup to handle one-click login. 223 // If this is not an incognito window, setup to handle one-click login.
224 // We don't want to check that the profile is already connected at this time 224 // We don't want to check that the profile is already connected at this time
225 // because the connected state may change while this tab is open. Having a 225 // because the connected state may change while this tab is open. Having a
226 // one-click signin helper attached does not cause problems if the profile 226 // one-click signin helper attached does not cause problems if the profile
227 // happens to be already connected. 227 // happens to be already connected.
228 if (switches::IsEnableWebBasedSignin() && 228 if (switches::IsEnableWebBasedSignin() &&
229 OneClickSigninHelper::CanOffer(web_contents, 229 OneClickSigninHelper::CanOffer(web_contents,
230 OneClickSigninHelper::CAN_OFFER_FOR_ALL, 230 OneClickSigninHelper::CAN_OFFER_FOR_ALL,
231 std::string(), 231 std::string(),
232 NULL)) { 232 NULL)) {
233 OneClickSigninHelper::CreateForWebContents(web_contents); 233 OneClickSigninHelper::CreateForWebContents(web_contents);
234 } 234 }
235 #endif 235 #endif
236 236
237 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( 237 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile(
238 web_contents->GetBrowserContext())) { 238 web_contents->GetBrowserContext())) {
239 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( 239 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents(
240 web_contents); 240 web_contents);
241 } 241 }
242 } 242 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_contents/core_tab_helper.cc ('k') | chrome/browser/ui/toolbar/toolbar_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698