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

Side by Side Diff: chrome/browser/first_run/first_run_win.cc

Issue 3750001: base: Move SplitString functions into the base namespace and update the callers. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: brett review, reverted changes in o3d due to it's using an old base revision Created 10 years, 2 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/first_run/first_run.h" 5 #include "chrome/browser/first_run/first_run.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 10
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 407
408 std::string EncodeImportParams(int browser_type, int options, 408 std::string EncodeImportParams(int browser_type, int options,
409 int skip_first_run_ui, HWND window) { 409 int skip_first_run_ui, HWND window) {
410 return StringPrintf("%d@%d@%d@%d", browser_type, options, skip_first_run_ui, 410 return StringPrintf("%d@%d@%d@%d", browser_type, options, skip_first_run_ui,
411 window); 411 window);
412 } 412 }
413 413
414 bool DecodeImportParams(const std::string& encoded, int* browser_type, 414 bool DecodeImportParams(const std::string& encoded, int* browser_type,
415 int* options, int* skip_first_run_ui, HWND* window) { 415 int* options, int* skip_first_run_ui, HWND* window) {
416 std::vector<std::string> parts; 416 std::vector<std::string> parts;
417 SplitString(encoded, '@', &parts); 417 base::SplitString(encoded, '@', &parts);
418 if (parts.size() != 4) 418 if (parts.size() != 4)
419 return false; 419 return false;
420 420
421 if (!base::StringToInt(parts[0], browser_type)) 421 if (!base::StringToInt(parts[0], browser_type))
422 return false; 422 return false;
423 423
424 if (!base::StringToInt(parts[1], options)) 424 if (!base::StringToInt(parts[1], options))
425 return false; 425 return false;
426 426
427 if (!base::StringToInt(parts[2], skip_first_run_ui)) 427 if (!base::StringToInt(parts[2], skip_first_run_ui))
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 852
853 Upgrade::TryResult Upgrade::ShowTryChromeDialog(size_t version) { 853 Upgrade::TryResult Upgrade::ShowTryChromeDialog(size_t version) {
854 if (version > 10000) { 854 if (version > 10000) {
855 // This is a test value. We want to make sure we exercise 855 // This is a test value. We want to make sure we exercise
856 // returning this early. See EarlyReturnTest test harness. 856 // returning this early. See EarlyReturnTest test harness.
857 return Upgrade::TD_NOT_NOW; 857 return Upgrade::TD_NOT_NOW;
858 } 858 }
859 TryChromeDialog td(version); 859 TryChromeDialog td(version);
860 return td.ShowModal(); 860 return td.ShowModal();
861 } 861 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_updater_unittest.cc ('k') | chrome/browser/history/snippet.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698