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

Side by Side Diff: examples/ui/tile/tile_app.cc

Issue 2022983003: Roll base to 5e00da80f6adb7082d1c0e88d3274cf87cc43bc5 and tonic to f7acabb8fa6c91124486a41194eac3cd… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 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
« no previous file with comments | « examples/native_run_app/native_run_app.cc ('k') | gin/modules/file_module_provider.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/strings/string_split.h" 5 #include "base/strings/string_split.h"
6 #include "examples/ui/tile/tile_app.h" 6 #include "examples/ui/tile/tile_app.h"
7 #include "examples/ui/tile/tile_view.h" 7 #include "examples/ui/tile/tile_view.h"
8 #include "mojo/public/cpp/application/connect.h" 8 #include "mojo/public/cpp/application/connect.h"
9 #include "url/url_parse.h" 9 #include "url/url_parse.h"
10 10
(...skipping 24 matching lines...) Expand all
35 url::Component query = parsed.query; 35 url::Component query = parsed.query;
36 36
37 for (;;) { 37 for (;;) {
38 url::Component key, value; 38 url::Component key, value;
39 if (!url::ExtractQueryKeyValue(connection_url.c_str(), &query, &key, 39 if (!url::ExtractQueryKeyValue(connection_url.c_str(), &query, &key,
40 &value)) 40 &value))
41 break; 41 break;
42 std::string key_str(connection_url, key.begin, key.len); 42 std::string key_str(connection_url, key.begin, key.len);
43 std::string value_str(connection_url, value.begin, value.len); 43 std::string value_str(connection_url, value.begin, value.len);
44 if (key_str == "views") { 44 if (key_str == "views") {
45 base::SplitString(value_str, ',', &params->view_urls); 45 params->view_urls = base::SplitString(
46 value_str, ",", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
46 } else if (key_str == "vm") { 47 } else if (key_str == "vm") {
47 if (value_str == "any") 48 if (value_str == "any")
48 params->version_mode = TileParams::VersionMode::kAny; 49 params->version_mode = TileParams::VersionMode::kAny;
49 else if (value_str == "exact") 50 else if (value_str == "exact")
50 params->version_mode = TileParams::VersionMode::kExact; 51 params->version_mode = TileParams::VersionMode::kExact;
51 else 52 else
52 return false; 53 return false;
53 } else if (key_str == "cm") { 54 } else if (key_str == "cm") {
54 if (value_str == "merge") 55 if (value_str == "merge")
55 params->combinator_mode = TileParams::CombinatorMode::kMerge; 56 params->combinator_mode = TileParams::CombinatorMode::kMerge;
(...skipping 14 matching lines...) Expand all
70 return false; 71 return false;
71 } else { 72 } else {
72 return false; 73 return false;
73 } 74 }
74 } 75 }
75 76
76 return !params->view_urls.empty(); 77 return !params->view_urls.empty();
77 } 78 }
78 79
79 } // namespace examples 80 } // namespace examples
OLDNEW
« no previous file with comments | « examples/native_run_app/native_run_app.cc ('k') | gin/modules/file_module_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698