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

Side by Side Diff: content/public/common/url_utils.cc

Issue 803813003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/public/test/browser_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/public/common/url_utils.h" 5 #include "content/public/common/url_utils.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 22 matching lines...) Expand all
33 for (int i = 0; GetSavableSchemes()[i] != NULL; ++i) { 33 for (int i = 0; GetSavableSchemes()[i] != NULL; ++i) {
34 if (url.SchemeIs(GetSavableSchemes()[i])) 34 if (url.SchemeIs(GetSavableSchemes()[i]))
35 return true; 35 return true;
36 } 36 }
37 return false; 37 return false;
38 } 38 }
39 39
40 #if defined(OS_ANDROID) 40 #if defined(OS_ANDROID)
41 void SetMaxURLChars(size_t max_chars) { 41 void SetMaxURLChars(size_t max_chars) {
42 // Check that it is not used by a multiprocesses embedder 42 // Check that it is not used by a multiprocesses embedder
43 CommandLine* cmd = CommandLine::ForCurrentProcess(); 43 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
44 CHECK(cmd->HasSwitch(switches::kSingleProcess)); 44 CHECK(cmd->HasSwitch(switches::kSingleProcess));
45 g_max_url_size = max_chars; 45 g_max_url_size = max_chars;
46 } 46 }
47 #endif 47 #endif
48 48
49 size_t GetMaxURLChars() { 49 size_t GetMaxURLChars() {
50 return g_max_url_size; 50 return g_max_url_size;
51 } 51 }
52 52
53 } // namespace content 53 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/public/test/browser_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698