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

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

Issue 2086163002: Arc++: Fix a regression issue that some Chrome app could not load its icon when login at first time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 NOTREACHED(); 145 NOTREACHED();
146 return; 146 return;
147 } 147 }
148 148
149 if (!extensions::ui_util::ShouldDisplayInAppLauncher(extension, profile())) 149 if (!extensions::ui_util::ShouldDisplayInAppLauncher(extension, profile()))
150 return; 150 return;
151 151
152 DVLOG(2) << service() << ": OnAppInstalled: " << app_id.substr(0, 8); 152 DVLOG(2) << service() << ": OnAppInstalled: " << app_id.substr(0, 8);
153 ExtensionAppItem* existing_item = GetExtensionAppItem(app_id); 153 ExtensionAppItem* existing_item = GetExtensionAppItem(app_id);
154 if (existing_item) { 154 if (existing_item) {
155 existing_item->UpdateIcon(); 155 existing_item->Reload();
156 if (service()) 156 if (service())
157 service()->UpdateItem(existing_item); 157 service()->UpdateItem(existing_item);
158 return; 158 return;
159 } 159 }
160 160
161 InsertApp(CreateAppItem(app_id, "", gfx::ImageSkia(), 161 InsertApp(CreateAppItem(app_id, "", gfx::ImageSkia(),
162 extension->is_platform_app())); 162 extension->is_platform_app()));
163 } 163 }
164 164
165 void ExtensionAppModelBuilder::OnAppUpdated( 165 void ExtensionAppModelBuilder::OnAppUpdated(
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 app_list::AppListItem* item = item_list->item_at(idx + 1); 270 app_list::AppListItem* item = item_list->item_at(idx + 1);
271 if (item->GetItemType() == ExtensionAppItem::kItemType) { 271 if (item->GetItemType() == ExtensionAppItem::kItemType) {
272 next = static_cast<ExtensionAppItem*>(item); 272 next = static_cast<ExtensionAppItem*>(item);
273 break; 273 break;
274 } 274 }
275 } 275 }
276 // item->Move will call set_position, overriding the item's position. 276 // item->Move will call set_position, overriding the item's position.
277 if (prev || next) 277 if (prev || next)
278 static_cast<ExtensionAppItem*>(item)->Move(prev, next); 278 static_cast<ExtensionAppItem*>(item)->Move(prev, next);
279 } 279 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698