OLD | NEW |
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 "chrome/browser/extensions/install_signer.h" | 5 #include "chrome/browser/extensions/install_signer.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 }; | 286 }; |
287 | 287 |
288 // static | 288 // static |
289 ExtensionIdSet InstallSigner::GetForcedNotFromWebstore() { | 289 ExtensionIdSet InstallSigner::GetForcedNotFromWebstore() { |
290 std::string value = | 290 std::string value = |
291 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 291 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
292 switches::kExtensionsNotWebstore); | 292 switches::kExtensionsNotWebstore); |
293 if (value.empty()) | 293 if (value.empty()) |
294 return ExtensionIdSet(); | 294 return ExtensionIdSet(); |
295 | 295 |
296 std::vector<std::string> ids; | 296 std::vector<std::string> ids = base::SplitString( |
297 base::SplitString(value, ',', &ids); | 297 value, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
298 return ExtensionIdSet(ids.begin(), ids.end()); | 298 return ExtensionIdSet(ids.begin(), ids.end()); |
299 } | 299 } |
300 | 300 |
301 namespace { | 301 namespace { |
302 | 302 |
303 static int g_request_count = 0; | 303 static int g_request_count = 0; |
304 | 304 |
305 base::LazyInstance<base::TimeTicks> g_last_request_time = | 305 base::LazyInstance<base::TimeTicks> g_last_request_time = |
306 LAZY_INSTANCE_INITIALIZER; | 306 LAZY_INSTANCE_INITIALIZER; |
307 | 307 |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 if (!verified) | 501 if (!verified) |
502 result.reset(); | 502 result.reset(); |
503 } | 503 } |
504 | 504 |
505 if (!callback_.is_null()) | 505 if (!callback_.is_null()) |
506 callback_.Run(result.Pass()); | 506 callback_.Run(result.Pass()); |
507 } | 507 } |
508 | 508 |
509 | 509 |
510 } // namespace extensions | 510 } // namespace extensions |
OLD | NEW |