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

Side by Side Diff: chrome/browser/ui/omnibox/chrome_omnibox_client.cc

Issue 2216713002: Use BookmarkModelFactory::GetForBrowserContext everywhere (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bookmarks
Patch Set: Replace in .mm files Created 4 years, 4 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/ui/omnibox/chrome_omnibox_client.h" 5 #include "chrome/browser/ui/omnibox/chrome_omnibox_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 bool ChromeOmniboxClient::IsHomePage(const std::string& url) const { 183 bool ChromeOmniboxClient::IsHomePage(const std::string& url) const {
184 return url == profile_->GetPrefs()->GetString(prefs::kHomePage); 184 return url == profile_->GetPrefs()->GetString(prefs::kHomePage);
185 } 185 }
186 186
187 const SessionID& ChromeOmniboxClient::GetSessionID() const { 187 const SessionID& ChromeOmniboxClient::GetSessionID() const {
188 return SessionTabHelper::FromWebContents( 188 return SessionTabHelper::FromWebContents(
189 controller_->GetWebContents())->session_id(); 189 controller_->GetWebContents())->session_id();
190 } 190 }
191 191
192 bookmarks::BookmarkModel* ChromeOmniboxClient::GetBookmarkModel() { 192 bookmarks::BookmarkModel* ChromeOmniboxClient::GetBookmarkModel() {
193 return BookmarkModelFactory::GetForProfile(profile_); 193 return BookmarkModelFactory::GetForBrowserContext(profile_);
194 } 194 }
195 195
196 TemplateURLService* ChromeOmniboxClient::GetTemplateURLService() { 196 TemplateURLService* ChromeOmniboxClient::GetTemplateURLService() {
197 return TemplateURLServiceFactory::GetForProfile(profile_); 197 return TemplateURLServiceFactory::GetForProfile(profile_);
198 } 198 }
199 199
200 const AutocompleteSchemeClassifier& 200 const AutocompleteSchemeClassifier&
201 ChromeOmniboxClient::GetSchemeClassifier() const { 201 ChromeOmniboxClient::GetSchemeClassifier() const {
202 return scheme_classifier_; 202 return scheme_classifier_;
203 } 203 }
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 InstantSearchPrerenderer::GetForProfile(profile_); 451 InstantSearchPrerenderer::GetForProfile(profile_);
452 if (prerenderer) 452 if (prerenderer)
453 prerenderer->Prerender(suggestion); 453 prerenderer->Prerender(suggestion);
454 } 454 }
455 455
456 void ChromeOmniboxClient::OnBitmapFetched(const BitmapFetchedCallback& callback, 456 void ChromeOmniboxClient::OnBitmapFetched(const BitmapFetchedCallback& callback,
457 const SkBitmap& bitmap) { 457 const SkBitmap& bitmap) {
458 request_id_ = BitmapFetcherService::REQUEST_ID_INVALID; 458 request_id_ = BitmapFetcherService::REQUEST_ID_INVALID;
459 callback.Run(bitmap); 459 callback.Run(bitmap);
460 } 460 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/view_id_util_browsertest.mm ('k') | chrome/browser/ui/omnibox/omnibox_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698