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

Side by Side Diff: chrome/browser/extensions/webstore_installer.cc

Issue 297263003: Optimize promotion of ephemeral apps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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
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/extensions/webstore_installer.h" 5 #include "chrome/browser/extensions/webstore_installer.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 396
397 default: 397 default:
398 NOTREACHED(); 398 NOTREACHED();
399 } 399 }
400 } 400 }
401 401
402 void WebstoreInstaller::OnExtensionWillBeInstalled( 402 void WebstoreInstaller::OnExtensionWillBeInstalled(
403 content::BrowserContext* browser_context, 403 content::BrowserContext* browser_context,
404 const Extension* extension, 404 const Extension* extension,
405 bool is_update, 405 bool is_update,
406 bool from_ephemeral,
406 const std::string& old_name) { 407 const std::string& old_name) {
407 CHECK(profile_->IsSameProfile(Profile::FromBrowserContext(browser_context))); 408 CHECK(profile_->IsSameProfile(Profile::FromBrowserContext(browser_context)));
408 if (pending_modules_.empty()) 409 if (pending_modules_.empty())
409 return; 410 return;
410 SharedModuleInfo::ImportInfo info = pending_modules_.front(); 411 SharedModuleInfo::ImportInfo info = pending_modules_.front();
411 if (extension->id() != info.extension_id) 412 if (extension->id() != info.extension_id)
412 return; 413 return;
413 pending_modules_.pop_front(); 414 pending_modules_.pop_front();
414 415
415 if (pending_modules_.empty()) { 416 if (pending_modules_.empty()) {
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 1, 750 1,
750 kMaxSizeKb, 751 kMaxSizeKb,
751 kNumBuckets); 752 kNumBuckets);
752 } 753 }
753 UMA_HISTOGRAM_BOOLEAN( 754 UMA_HISTOGRAM_BOOLEAN(
754 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", 755 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown",
755 total_bytes <= 0); 756 total_bytes <= 0);
756 } 757 }
757 758
758 } // namespace extensions 759 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_installer.h ('k') | chrome/browser/extensions/webstore_standalone_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698