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

Side by Side Diff: chrome/browser/ui/toolbar/back_forward_menu_model.cc

Issue 839193002: Move ServiceAccessType into //components/keyed_service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on android Created 5 years, 11 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 (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/ui/toolbar/back_forward_menu_model.h" 5 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 242
243 void BackForwardMenuModel::FetchFavicon(NavigationEntry* entry) { 243 void BackForwardMenuModel::FetchFavicon(NavigationEntry* entry) {
244 // If the favicon has already been requested for this menu, don't do 244 // If the favicon has already been requested for this menu, don't do
245 // anything. 245 // anything.
246 if (requested_favicons_.find(entry->GetUniqueID()) != 246 if (requested_favicons_.find(entry->GetUniqueID()) !=
247 requested_favicons_.end()) { 247 requested_favicons_.end()) {
248 return; 248 return;
249 } 249 }
250 requested_favicons_.insert(entry->GetUniqueID()); 250 requested_favicons_.insert(entry->GetUniqueID());
251 FaviconService* favicon_service = FaviconServiceFactory::GetForProfile( 251 FaviconService* favicon_service = FaviconServiceFactory::GetForProfile(
252 browser_->profile(), Profile::EXPLICIT_ACCESS); 252 browser_->profile(), ServiceAccessType::EXPLICIT_ACCESS);
253 if (!favicon_service) 253 if (!favicon_service)
254 return; 254 return;
255 255
256 favicon_service->GetFaviconImageForPageURL( 256 favicon_service->GetFaviconImageForPageURL(
257 entry->GetURL(), 257 entry->GetURL(),
258 base::Bind(&BackForwardMenuModel::OnFavIconDataAvailable, 258 base::Bind(&BackForwardMenuModel::OnFavIconDataAvailable,
259 base::Unretained(this), 259 base::Unretained(this),
260 entry->GetUniqueID()), 260 entry->GetUniqueID()),
261 &cancelable_task_tracker_); 261 &cancelable_task_tracker_);
262 } 262 }
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 metric_string += "ForwardMenu_"; 472 metric_string += "ForwardMenu_";
473 else 473 else
474 metric_string += "BackMenu_"; 474 metric_string += "BackMenu_";
475 metric_string += action; 475 metric_string += action;
476 if (index != -1) { 476 if (index != -1) {
477 // +1 is for historical reasons (indices used to start at 1). 477 // +1 is for historical reasons (indices used to start at 1).
478 metric_string += base::IntToString(index + 1); 478 metric_string += base::IntToString(index + 1);
479 } 479 }
480 return metric_string; 480 return metric_string;
481 } 481 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698