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

Side by Side Diff: chrome/browser/ui/app_list/extension_app_model_builder.cc

Issue 883603002: Rename StreamlinedHostedApps to NewBookmarkApps in the code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments and variables 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/app_list/extension_app_model_builder.h" 5 #include "chrome/browser/ui/app_list/extension_app_model_builder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 BuildModel(); 72 BuildModel();
73 } 73 }
74 74
75 void ExtensionAppModelBuilder::InitializePrefChangeRegistrars() { 75 void ExtensionAppModelBuilder::InitializePrefChangeRegistrars() {
76 profile_pref_change_registrar_.Init(profile_->GetPrefs()); 76 profile_pref_change_registrar_.Init(profile_->GetPrefs());
77 profile_pref_change_registrar_.Add( 77 profile_pref_change_registrar_.Add(
78 prefs::kHideWebStoreIcon, 78 prefs::kHideWebStoreIcon,
79 base::Bind(&ExtensionAppModelBuilder::OnProfilePreferenceChanged, 79 base::Bind(&ExtensionAppModelBuilder::OnProfilePreferenceChanged,
80 base::Unretained(this))); 80 base::Unretained(this)));
81 81
82 if (!extensions::util::IsStreamlinedHostedAppsEnabled()) 82 if (!extensions::util::IsNewBookmarkAppsEnabled())
83 return; 83 return;
84 84
85 // TODO(calamity): analyze the performance impact of doing this every 85 // TODO(calamity): analyze the performance impact of doing this every
86 // extension pref change. 86 // extension pref change.
87 extensions::ExtensionsBrowserClient* client = 87 extensions::ExtensionsBrowserClient* client =
88 extensions::ExtensionsBrowserClient::Get(); 88 extensions::ExtensionsBrowserClient::Get();
89 extension_pref_change_registrar_.Init( 89 extension_pref_change_registrar_.Init(
90 client->GetPrefServiceForContext(profile_)); 90 client->GetPrefServiceForContext(profile_));
91 extension_pref_change_registrar_.Add( 91 extension_pref_change_registrar_.Add(
92 extensions::pref_names::kExtensions, 92 extensions::pref_names::kExtensions,
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 app_list::AppListItem* item = item_list->item_at(idx + 1); 325 app_list::AppListItem* item = item_list->item_at(idx + 1);
326 if (item->GetItemType() == ExtensionAppItem::kItemType) { 326 if (item->GetItemType() == ExtensionAppItem::kItemType) {
327 next = static_cast<ExtensionAppItem*>(item); 327 next = static_cast<ExtensionAppItem*>(item);
328 break; 328 break;
329 } 329 }
330 } 330 }
331 // item->Move will call set_position, overriding the item's position. 331 // item->Move will call set_position, overriding the item's position.
332 if (prev || next) 332 if (prev || next)
333 static_cast<ExtensionAppItem*>(item)->Move(prev, next); 333 static_cast<ExtensionAppItem*>(item)->Move(prev, next);
334 } 334 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698