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

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

Issue 8552002: net: Move UnescapeRule into the net namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "webkit/glue/window_open_disposition.h" 52 #include "webkit/glue/window_open_disposition.h"
53 53
54 namespace { 54 namespace {
55 55
56 // The URL prefixes used by the NTP to signal when the web store or an app 56 // The URL prefixes used by the NTP to signal when the web store or an app
57 // has launched so we can record the proper histogram. 57 // has launched so we can record the proper histogram.
58 const char* kPingLaunchAppByID = "record-app-launch-by-id"; 58 const char* kPingLaunchAppByID = "record-app-launch-by-id";
59 const char* kPingLaunchWebStore = "record-webstore-launch"; 59 const char* kPingLaunchWebStore = "record-webstore-launch";
60 const char* kPingLaunchAppByURL = "record-app-launch-by-url"; 60 const char* kPingLaunchAppByURL = "record-app-launch-by-url";
61 61
62 const UnescapeRule::Type kUnescapeRules = 62 const net::UnescapeRule::Type kUnescapeRules =
63 UnescapeRule::NORMAL | UnescapeRule::URL_SPECIAL_CHARS; 63 net::UnescapeRule::NORMAL | net::UnescapeRule::URL_SPECIAL_CHARS;
64 64
65 extension_misc::AppLaunchBucket ParseLaunchSource( 65 extension_misc::AppLaunchBucket ParseLaunchSource(
66 const std::string& launch_source) { 66 const std::string& launch_source) {
67 int bucket_num = extension_misc::APP_LAUNCH_BUCKET_INVALID; 67 int bucket_num = extension_misc::APP_LAUNCH_BUCKET_INVALID;
68 base::StringToInt(launch_source, &bucket_num); 68 base::StringToInt(launch_source, &bucket_num);
69 extension_misc::AppLaunchBucket bucket = 69 extension_misc::AppLaunchBucket bucket =
70 static_cast<extension_misc::AppLaunchBucket>(bucket_num); 70 static_cast<extension_misc::AppLaunchBucket>(bucket_num);
71 CHECK(bucket < extension_misc::APP_LAUNCH_BUCKET_BOUNDARY); 71 CHECK(bucket < extension_misc::APP_LAUNCH_BUCKET_BOUNDARY);
72 return bucket; 72 return bucket;
73 } 73 }
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 1049
1050 void AppLauncherHandler::UninstallDefaultApps() { 1050 void AppLauncherHandler::UninstallDefaultApps() {
1051 AppsPromo* apps_promo = extension_service_->apps_promo(); 1051 AppsPromo* apps_promo = extension_service_->apps_promo();
1052 const ExtensionIdSet& app_ids = apps_promo->old_default_apps(); 1052 const ExtensionIdSet& app_ids = apps_promo->old_default_apps();
1053 for (ExtensionIdSet::const_iterator iter = app_ids.begin(); 1053 for (ExtensionIdSet::const_iterator iter = app_ids.begin();
1054 iter != app_ids.end(); ++iter) { 1054 iter != app_ids.end(); ++iter) {
1055 if (extension_service_->GetExtensionById(*iter, true)) 1055 if (extension_service_->GetExtensionById(*iter, true))
1056 extension_service_->UninstallExtension(*iter, false, NULL); 1056 extension_service_->UninstallExtension(*iter, false, NULL);
1057 } 1057 }
1058 } 1058 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/fileicon_source.cc ('k') | chrome/common/extensions/extension_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698