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

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

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 case INSTALL_SOURCE_INLINE: 177 case INSTALL_SOURCE_INLINE:
178 install_source = kInlineInstallSource; 178 install_source = kInlineInstallSource;
179 break; 179 break;
180 case INSTALL_SOURCE_APP_LAUNCHER: 180 case INSTALL_SOURCE_APP_LAUNCHER:
181 install_source = kAppLauncherInstallSource; 181 install_source = kAppLauncherInstallSource;
182 break; 182 break;
183 case INSTALL_SOURCE_OTHER: 183 case INSTALL_SOURCE_OTHER:
184 install_source = kDefaultInstallSource; 184 install_source = kDefaultInstallSource;
185 } 185 }
186 186
187 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 187 base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
188 if (cmd_line->HasSwitch(switches::kAppsGalleryDownloadURL)) { 188 if (cmd_line->HasSwitch(switches::kAppsGalleryDownloadURL)) {
189 std::string download_url = 189 std::string download_url =
190 cmd_line->GetSwitchValueASCII(switches::kAppsGalleryDownloadURL); 190 cmd_line->GetSwitchValueASCII(switches::kAppsGalleryDownloadURL);
191 return GURL(base::StringPrintf(download_url.c_str(), 191 return GURL(base::StringPrintf(download_url.c_str(),
192 extension_id.c_str())); 192 extension_id.c_str()));
193 } 193 }
194 std::vector<std::string> params; 194 std::vector<std::string> params;
195 params.push_back("id=" + extension_id); 195 params.push_back("id=" + extension_id);
196 if (!install_source.empty()) 196 if (!install_source.empty())
197 params.push_back("installsource=" + install_source); 197 params.push_back("installsource=" + install_source);
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 1, 737 1,
738 kMaxSizeKb, 738 kMaxSizeKb,
739 kNumBuckets); 739 kNumBuckets);
740 } 740 }
741 UMA_HISTOGRAM_BOOLEAN( 741 UMA_HISTOGRAM_BOOLEAN(
742 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", 742 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown",
743 total_bytes <= 0); 743 total_bytes <= 0);
744 } 744 }
745 745
746 } // namespace extensions 746 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/updater/extension_updater_unittest.cc ('k') | chrome/browser/extensions/webstore_installer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698