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

Side by Side Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.cc

Issue 7124008: Fix identification of webstore extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
« 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/webui/ntp/app_launcher_handler.h" 5 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "webkit/glue/window_open_disposition.h" 43 #include "webkit/glue/window_open_disposition.h"
44 44
45 namespace { 45 namespace {
46 46
47 // The URL prefixes used by the NTP to signal when the web store or an app 47 // The URL prefixes used by the NTP to signal when the web store or an app
48 // has launched so we can record the proper histogram. 48 // has launched so we can record the proper histogram.
49 const char* kPingLaunchAppByID = "record-app-launch-by-id"; 49 const char* kPingLaunchAppByID = "record-app-launch-by-id";
50 const char* kPingLaunchWebStore = "record-webstore-launch"; 50 const char* kPingLaunchWebStore = "record-webstore-launch";
51 const char* kPingLaunchAppByURL = "record-app-launch-by-url"; 51 const char* kPingLaunchAppByURL = "record-app-launch-by-url";
52 52
53 const char* kChromeWebStoreUrl = "https://chrome.google.com/webstore"; 53 const char* kChromeWebStoreUrl = "https://chrome.google.com/webstore/";
54 54
55 const UnescapeRule::Type kUnescapeRules = 55 const UnescapeRule::Type kUnescapeRules =
56 UnescapeRule::NORMAL | UnescapeRule::URL_SPECIAL_CHARS; 56 UnescapeRule::NORMAL | UnescapeRule::URL_SPECIAL_CHARS;
57 57
58 extension_misc::AppLaunchBucket ParseLaunchSource( 58 extension_misc::AppLaunchBucket ParseLaunchSource(
59 const std::string& launch_source) { 59 const std::string& launch_source) {
60 int bucket_num = extension_misc::APP_LAUNCH_BUCKET_INVALID; 60 int bucket_num = extension_misc::APP_LAUNCH_BUCKET_INVALID;
61 base::StringToInt(launch_source, &bucket_num); 61 base::StringToInt(launch_source, &bucket_num);
62 extension_misc::AppLaunchBucket bucket = 62 extension_misc::AppLaunchBucket bucket =
63 static_cast<extension_misc::AppLaunchBucket>(bucket_num); 63 static_cast<extension_misc::AppLaunchBucket>(bucket_num);
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 655
656 void AppLauncherHandler::UninstallDefaultApps() { 656 void AppLauncherHandler::UninstallDefaultApps() {
657 AppsPromo* apps_promo = extensions_service_->apps_promo(); 657 AppsPromo* apps_promo = extensions_service_->apps_promo();
658 const ExtensionIdSet& app_ids = apps_promo->old_default_apps(); 658 const ExtensionIdSet& app_ids = apps_promo->old_default_apps();
659 for (ExtensionIdSet::const_iterator iter = app_ids.begin(); 659 for (ExtensionIdSet::const_iterator iter = app_ids.begin();
660 iter != app_ids.end(); ++iter) { 660 iter != app_ids.end(); ++iter) {
661 if (extensions_service_->GetExtensionById(*iter, true)) 661 if (extensions_service_->GetExtensionById(*iter, true))
662 extensions_service_->UninstallExtension(*iter, false, NULL); 662 extensions_service_->UninstallExtension(*iter, false, NULL);
663 } 663 }
664 } 664 }
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