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

Side by Side Diff: chrome/browser/bookmarks/bookmark_model_factory.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 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/bookmarks/bookmark_model_factory.h" 5 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/deferred_sequenced_task_runner.h" 8 #include "base/deferred_sequenced_task_runner.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 bookmark_model->Load(profile->GetPrefs(), 63 bookmark_model->Load(profile->GetPrefs(),
64 profile->GetPrefs()->GetString(prefs::kAcceptLanguages), 64 profile->GetPrefs()->GetString(prefs::kAcceptLanguages),
65 profile->GetPath(), 65 profile->GetPath(),
66 StartupTaskRunnerServiceFactory::GetForProfile(profile) 66 StartupTaskRunnerServiceFactory::GetForProfile(profile)
67 ->GetBookmarkTaskRunner(), 67 ->GetBookmarkTaskRunner(),
68 content::BrowserThread::GetMessageLoopProxyForThread( 68 content::BrowserThread::GetMessageLoopProxyForThread(
69 content::BrowserThread::UI)); 69 content::BrowserThread::UI));
70 bool register_bookmark_undo_service_as_observer = true; 70 bool register_bookmark_undo_service_as_observer = true;
71 #if !defined(OS_IOS) && !defined(OS_ANDROID) 71 #if !defined(OS_IOS) && !defined(OS_ANDROID)
72 register_bookmark_undo_service_as_observer = 72 register_bookmark_undo_service_as_observer =
73 CommandLine::ForCurrentProcess()->HasSwitch( 73 base::CommandLine::ForCurrentProcess()->HasSwitch(
74 switches::kEnableBookmarkUndo); 74 switches::kEnableBookmarkUndo);
75 #endif // !defined(OS_IOS) 75 #endif // !defined(OS_IOS)
76 if (register_bookmark_undo_service_as_observer) { 76 if (register_bookmark_undo_service_as_observer) {
77 bookmark_model->AddObserver( 77 bookmark_model->AddObserver(
78 BookmarkUndoServiceFactory::GetForProfile(profile)); 78 BookmarkUndoServiceFactory::GetForProfile(profile));
79 } 79 }
80 return bookmark_model; 80 return bookmark_model;
81 } 81 }
82 82
83 void BookmarkModelFactory::RegisterProfilePrefs( 83 void BookmarkModelFactory::RegisterProfilePrefs(
(...skipping 11 matching lines...) Expand all
95 } 95 }
96 96
97 content::BrowserContext* BookmarkModelFactory::GetBrowserContextToUse( 97 content::BrowserContext* BookmarkModelFactory::GetBrowserContextToUse(
98 content::BrowserContext* context) const { 98 content::BrowserContext* context) const {
99 return chrome::GetBrowserContextRedirectedInIncognito(context); 99 return chrome::GetBrowserContextRedirectedInIncognito(context);
100 } 100 }
101 101
102 bool BookmarkModelFactory::ServiceIsNULLWhileTesting() const { 102 bool BookmarkModelFactory::ServiceIsNULLWhileTesting() const {
103 return true; 103 return true;
104 } 104 }
OLDNEW
« no previous file with comments | « chrome/browser/background/background_mode_manager_win.cc ('k') | chrome/browser/bookmarks/enhanced_bookmarks_features.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698